: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Importer for easy-modal functions
* @copyright Copyright (c) 2023, Code Atlantic LLC
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
if ( ! function_exists( 'get_all_modals' ) ) {
function enqueue_modal( $id ) {
if ( ! is_array( $id ) ) {
EModal_Modals::enqueue_modal( $id );
EModal_Modals::enqueue_modal( $i );
if ( ! function_exists( 'emodal_get_option' ) ) {
function emodal_get_option( $key ) {
if ( function_exists( 'is_multisite' ) && is_multisite() && $blog_id ) {
return get_blog_option( $blog_id, $key );
return get_site_option( $key );
if ( ! function_exists( 'emodal_update_option' ) ) {
function emodal_update_option( $key, $value ) {
if ( function_exists( 'is_multisite' ) && is_multisite() && $blog_id ) {
return update_blog_option( $blog_id, $key, $value );
return update_site_option( $key, $value );
if ( ! function_exists( 'emodal_delete_option' ) ) {
function emodal_delete_option( $key ) {
if ( function_exists( 'is_multisite' ) && is_multisite() && $blog_id ) {
return delete_blog_option( $blog_id, $key );
return delete_site_option( $key );
if ( ! function_exists( 'emodal_get_license' ) ) {
function emodal_get_license( $key = null ) {
$license = emodal_get_option( EMCORE_SLUG . '-license' );
emodal_update_option( EMCORE_SLUG . '-license', $license );
return $license && $key ? emresolve( $license, $key ) : $license;
if ( ! function_exists( 'emresolve' ) ) {
function emresolve( array $a, $path, $default = null ) {
$p = strtok( $path, '.' );
if ( ! isset( $current[ $p ] ) ) {
$current = $current[ $p ];