: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @copyright Copyright (c) 2023, Code Atlantic LLC
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
// region Deprecated 1.7.0
* @deprecated 1.7.0 Use pum_load_popup
function popmake_enqueue_popup( $id ) {
* Looks to see if the specified setting exists, returns default if not
function popmake_get_option( $key = '', $default = false ) {
return pum_get_option( $key, $default );
* Retrieves all plugin settings
* @return array $settings
function popmake_get_settings() {
return pum_get_options();
* Renders the support page contents.
function pum_settings_page() {
PUM_Admin_Settings::page();
function popmake_get_label_singular( $string = '' ) {
function popmake_get_label_plural( $string = '' ) {
* Retrieve the array of plugin settings
function popmake_get_registered_settings() {
* 'Whitelisted' POPMAKE settings, filters are provided for each settings
* section to allow extensions and other plugins to add their own settings
'general' => apply_filters( 'popmake_settings_general', [] ),
'assets' => apply_filters( 'popmake_settings_assets', [] ),
/** Extension Settings */
'extensions' => apply_filters( 'popmake_settings_extensions', [] ),
'licenses' => apply_filters( 'popmake_settings_licenses', [] ),
'misc' => apply_filters( 'popmake_settings_misc', [] ),
return apply_filters( 'popmake_registered_settings', $popmake_settings );
* Determines whether the current admin page is an POPMAKE admin page.
* @deprecated 1.7.0 Use pum_is_admin_page instead.
* @return bool True if POPMAKE admin page.
function popmake_is_admin_page() {
return pum_is_admin_page();
* Determines whether the current admin page is an admin popup page.
function popmake_is_admin_popup_page() {
return pum_is_popup_editor();
* Determines whether the current admin page is an admin theme page.
* @deprecated 1.7.0 @see pum_is_popup_theme_editor
function popmake_is_admin_popup_theme_page() {
return pum_is_popup_theme_editor();
function popmake_output_pum_styles() {
* Retrieve a list of all published pages
* On large sites this can be expensive, so only load if on the settings page or $force is set to true
* @param bool $force Force the pages to be loaded even if not on settings
* @return array $pages_options An array of the pages
function popmake_get_pages( $force = false ) {
$pages_options = [ 0 => '' ]; // Blank option
if ( ( ! isset( $_GET['page'] ) || 'pum-settings' !== $_GET['page'] ) && ! $force ) {
foreach ( $pages as $page ) {
$pages_options[ $page->ID ] = $page->post_title;
* Returns the cookie fields used for cookie options.
* @deprecated 1.7.0 Use PUM_Cookies::instance()->cookie_fields() instead.
function pum_get_cookie_fields() {
return PUM_Cookies::instance()->cookie_fields();
* Returns an array of args for registering coo0kies.
* @deprecated 1.7.0 Use PUM_Cookies::instance()->cookie_fields() instead.
function pum_get_cookies() {
return PUM_Cookies::instance()->get_cookies();
* Returns the cookie fields used for trigger options.
* @deprecated v1.7.0 Use PUM_Triggers::instance()->cookie_fields() instead.
function pum_trigger_cookie_fields() {
return PUM_Triggers::instance()->cookie_fields();
* Returns the cookie field used for trigger options.
* @deprecated v1.7.0 Use PUM_Triggers::instance()->cookie_field() instead.
function pum_trigger_cookie_field() {
return PUM_Triggers::instance()->cookie_field();
* Returns an array of section labels for all triggers.
* @deprecated v1.7.0 Use PUM_Triggers::instance()->get_tabs() instead.
function pum_get_trigger_section_labels() {
return PUM_Triggers::instance()->get_tabs();
// region Deprecated 1.8.0
* Installs the default theme and updates the option.
function popmake_install_default_theme() {
$defaults = PUM_Admin_Themes::defaults();
$default_theme = @wp_insert_post(
'post_title' => __( 'Default Theme', 'popup-maker' ),
'post_status' => 'publish',
'post_type' => 'popup_theme',
'comment_status' => 'closed',
'_pum_built_in' => 'default-theme',
'_pum_default_theme' => true,
'popup_theme_settings' => $defaults,
'popup_theme_data_version' => 3,
update_option( 'popmake_default_theme', $default_theme );
* Checks if the db_ver is v1.4 compatible.
* v1.4 compatibility is db_ver 6 or higher.
function pum_is_v1_4_compatible() {
* Deletes the theme css transient forcing it to refresh.
* @deprecated 1.8.0 Use pum_reset_assets()
function pum_force_theme_css_refresh() {
function popmake_hex2rgb( $hex ) {
return PUM_Utils_CSS::hex2rgb( $hex, 'array' );
function popmake_get_rgba_value( $hex, $opacity = 100 ) {
return PUM_Utils_CSS::hex2rgba( $hex, $opacity );
function popmake_get_border_style( $thickness = 1, $style = 'solid', $color = '#cccccc' ) {
return PUM_Utils_CSS::border_style( $thickness, $style, $color );
function popmake_get_box_shadow_style( $horizontal = 0, $vertical = 0, $blur = 0, $spread = 0, $hex = '#000000', $opacity = 50, $inset = 'no' ) {
return PUM_Utils_CSS::box_shadow_style( $horizontal, $vertical, $blur, $spread, $hex, $opacity, $inset );
function popmake_get_text_shadow_style( $horizontal = 0, $vertical = 0, $blur = 0, $hex = '#000000', $opacity = 50 ) {
return PUM_Utils_CSS::text_shadow_style( $horizontal, $vertical, $blur, $hex, $opacity );
function pum_load_popup( $id ) {
PUM_Site_Popups::load_popup( $id );
* Retrieves a template part
* @deprecated 1.8.0 Use pum_get_template_part instead.
* @param null|string $name
function popmake_get_template_part( $slug, $name = null, $load = true ) {
return pum_get_template_part( $slug, $name );
return PUM_Utils_Template::locate_part( $slug, $name, false );
* Extensions (as well as the core plugin) can add items to the theme overlay
* configuration metabox via the `popmake_popup_theme_overlay_meta_box_fields` action.
function popmake_render_popup_theme_overlay_meta_box() {
if ( ! has_action( 'popmake_popup_theme_overlay_meta_box_fields' ) ) {
wp_nonce_field( basename( __FILE__ ), 'popmake_popup_theme_meta_box_nonce' ); ?>
<input type="hidden" name="popup_theme_defaults_set" value="true"/>
<div id="popmake_popup_theme_overlay_fields" class="popmake_meta_table_wrap">
<table class="form-table">
<?php do_action( 'popmake_popup_theme_overlay_meta_box_fields', $post->ID ); ?>
* Theme Container Metabox
* Extensions (as well as the core plugin) can add items to the theme container
* configuration metabox via the `popmake_popup_theme_container_meta_box_fields` action.
function popmake_render_popup_theme_container_meta_box() {
if ( ! has_action( 'popmake_popup_theme_container_meta_box_fields' ) ) {
<div id="popmake_popup_theme_container_fields" class="popmake_meta_table_wrap">
<table class="form-table">
<?php do_action( 'popmake_popup_theme_container_meta_box_fields', $post->ID ); ?>
* Extensions (as well as the core plugin) can add items to the popup close
* configuration metabox via the `popmake_popup_theme_close_meta_box_fields` action.
function popmake_render_popup_theme_close_meta_box() {
if ( ! has_action( 'popmake_popup_theme_close_meta_box_fields' ) ) {
<div id="popmake_popup_theme_close_fields" class="popmake_meta_table_wrap">
<table class="form-table">
<?php do_action( 'popmake_popup_theme_close_meta_box_fields', $post->ID ); ?>