: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'options' => PUM_Triggers::instance()->dropdown_list(),
'popup_trigger_add_cookie' => [
'id' => 'popup_trigger_add_cookie',
'label' => __( 'Prevent popup from showing to visitor again using a cookie?', 'popup-maker' ),
'meta' => [ 'checked' => 'checked' ],
'popup_trigger_add_cookie_event' => [
'id' => 'popup_trigger_add_cookie_event',
'label' => __( 'Stop showing popup once visitor takes this action:', 'popup-maker' ),
'options' => PUM_Cookies::instance()->dropdown_list(),
'popup_trigger_add_cookie' => true,
'popup_trigger_add_cookie_info' => [
'id' => 'popup_trigger_add_cookie_info',
'content' => '<p>Learn more about <a href="https://docs.wppopupmaker.com/article/358-popup-settings-box-cookies-option-settings?utm_campaign=contextual-help&utm_medium=inline-doclink&utm_source=plugin-popup-editor&utm_content=new-trigger-cookie-info">how Popup Maker cookies work</a>.</p>',
content = PUM_Admin.forms.render(form_args, {});
print(PUM_Admin.templates.modal({
id: 'pum_trigger_add_type_modal',
title: '<?php _e( 'New Trigger', 'popup-maker' ); ?>',
save_button: pum_admin_vars.I10n.add || '<?php __( 'Add', 'popup-maker' ); ?>'
public static function conditions_editor() {
<script type="text/html" id="tmpl-pum-field-conditions">
<# print(PUM_Admin.conditions.template.editor({groups: data.value})); #>
<script type="text/html" id="tmpl-pum-condition-editor">
<div class="facet-builder <# if (data.groups && data.groups.length) { print('has-conditions'); } #>">
<?php _e( 'Conditions allow you to show your popup to a targeted segment of your sites users.', 'popup-maker' ); ?>
<?php printf( '%2$s<i class="dashicons dashicons-editor-help" title="%1$s"></i>%3$s', sprintf( __( 'Learn more about %s', 'popup-maker' ), __( 'Targeting Conditions', 'popup-maker' ) ), '<a href="https://docs.wppopupmaker.com/article/351-popup-settings-box-targeting-option-settings?utm_medium=inline-doclink&utm_campaign=contextual-help&utm_source=plugin-popup-editor&utm_content=targeting-option-settings" target="_blank">', '</a>' ); ?>
<li><?php _e( 'By default, this popup will be loaded on every page of your site for all users.', 'popup-maker' ); ?></li>
<li><?php _e( 'Target the popup to a specific segment by adding conditions below.', 'popup-maker' ); ?></li>
<li><?php printf( __( 'Click the %1$s button for any condition to check the opposite of the chosen condition. The button will turn red %2$s when active.', 'popup-maker' ), '<i style="font-size: 1em; width: 1em; height: 1em; line-height:1.5em;" class="dashicons dashicons-warning"></i>', '<i style="width: 1em; height: 1em; font-size: 1em; line-height:1.5em; color:#a00;" class="dashicons dashicons-warning"></i>' ); ?></li>
<section class="pum-alert-box" style="display:none"></section>
<div class="facet-groups condition-groups">
_.each(data.groups, function (group, group_ID) {
print(PUM_Admin.conditions.template.group({
<div class="no-facet-groups">
<label for="pum-first-condition"><?php _e( 'Choose a condition to target your popup to specific content or various other segments.', 'popup-maker' ); ?></label>
<div class="facet-target">
<button type="button" class="pum-not-operand dashicons-before dashicons-warning no-button" aria-label="<?php _e( 'Enable the Not Operand', 'popup-maker' ); ?>">
<input type="checkbox" id="pum-first-facet-operand" value="1"/>
<# print(PUM_Admin.conditions.template.selectbox({id: 'pum-first-condition', name: "", placeholder: "<?php _e( 'Choose a condition', 'popup-maker' ); ?>"})); #>
<script type="text/html" id="tmpl-pum-condition-group">
<div class="facet-group-wrap" data-index="{{data.index}}">
<section class="facet-group">
<# _.each(data.facets, function (facet) {
print(PUM_Admin.conditions.template.facet(facet));
<button type="button" class="add add-facet no-button" aria-label="<?php _ex( 'Add another OR condition', 'aria-label for add new OR condition button', 'popup-maker' ); ?>"><?php _e( 'or', 'popup-maker' ); ?></button>
<button type="button" class="add-facet no-button" aria-label="<?php _ex( 'Add another AND condition group', 'aria-label for add new AND condition button', 'popup-maker' ); ?>"><?php _e( 'and', 'popup-maker' ); ?></button>
<script type="text/html" id="tmpl-pum-condition-facet">
<div class="facet" data-index="{{data.index}}" data-target="{{data.target}}">
<i class="or"><?php _e( 'or', 'popup-maker' ); ?></i>
<div class="facet-col facet-target <# if (typeof data.not_operand !== 'undefined' && data.not_operand == '1') print('not-operand-checked'); #>">
<button type="button" class="pum-not-operand dashicons-before dashicons-warning no-button" aria-label="<?php _e( 'Enable the Not Operand', 'popup-maker' ); ?>">
<input type="checkbox" name="popup_settings[conditions][{{data.group}}][{{data.index}}][not_operand]" value="1"
<# if (typeof data.not_operand !== 'undefined') print(PUM_Admin.utils.checked(data.not_operand, true, true)); #> />
<# print(PUM_Admin.conditions.template.selectbox({index: data.index, group: data.group, value: data.target, placeholder: "<?php _e( 'Choose a condition', 'popup-maker' ); ?>"})); #>
<div class="facet-settings facet-col">
<# print(PUM_Admin.conditions.template.settings(data, data.settings)); #>
<div class="facet-actions">
<button type="button" class="remove remove-facet dashicons dashicons-dismiss no-button" aria-label="<?php _e( 'Remove Condition', 'popup-maker' ); ?>"></button>
public static function cookies_editor() {
<script type="text/html" id="tmpl-pum-field-cookies">
<# print(PUM_Admin.cookies.template.editor({cookies: data.value, name: data.name})); #>
<script type="text/html" id="tmpl-pum-cookie-editor">
<div class="pum-popup-cookie-editor <# if (data.cookies && data.cookies.length) { print('has-list-items'); } #>" data-field_name="{{data.name}}">
<button type="button" class="button button-primary pum-add-new no-button"><?php _e( 'Add New Cookie', 'popup-maker' ); ?></button>
<?php _e( 'Cookies control the repeat display of a popup.', 'popup-maker' ); ?>
<a href="<?php echo esc_url( 'https://docs.wppopupmaker.com/article/358-popup-settings-box-cookies-option-settings?utm_campaign=contextual-help&utm_medium=inline-doclink&utm_source=plugin-popup-editor&utm_content=cookies-option-settings' ); ?>"
target="_blank" class="pum-doclink dashicons dashicons-editor-help" title="<?php esc_attr_e( sprintf( __( 'Learn more about %s', 'popup-maker' ), __( 'Cookies', 'popup-maker' ) ) ); ?>"></a>
<table class="list-table form-table">
<th><?php _e( 'Event', 'popup-maker' ); ?></th>
<th><?php _e( 'Name', 'popup-maker' ); ?></th>
<th><?php _e( 'Settings', 'popup-maker' ); ?></th>
<th><?php _e( 'Actions', 'popup-maker' ); ?></th>
_.each(data.cookies, function (cookie, index) {
print(PUM_Admin.cookies.template.row({
settings: cookie.settings || {}
<!-- <div class="no-cookies no-list-items">-->
<!-- <div class="pum-field pum-field-select pum-field-select2">-->
<!-- <label for="pum-first-cookie">--><?php // _e( 'Choose when you want to set a cookie to get started.', 'popup-maker' ); ?><!--</label>-->
<!-- <# print(PUM_Admin.cookies.template.selectbox({id: 'pum-first-cookie', name: "", placeholder: "--><?php // _e( 'Select an event.', 'popup-maker' ); ?><!--"})); #>-->
<script type="text/html" id="tmpl-pum-cookie-row">
<tr data-index="{{data.index}}">
<td class="event-column">
<button type="button" class="edit no-button link-button" aria-label="<?php _e( 'Edit this cookie', 'popup-maker' ); ?>">{{PUM_Admin.cookies.getLabel(data.event)}}</button>
<input class="popup_cookies_field_event" type="hidden" name="{{data.name}}[{{data.index}}][event]" value="{{data.event}}"/>
<input class="popup_cookies_field_settings" type="hidden" name="{{data.name}}[{{data.index}}][settings]" value="{{JSON.stringify(data.settings)}}"/>
<code>{{data.settings.name}}</code>
<td class="settings-column">{{{PUM_Admin.cookies.getSettingsDesc(data.event, data.settings)}}}</td>
<td class="list-item-actions">
<button type="button" class="edit dashicons dashicons-edit no-button" aria-label="<?php _e( 'Edit this cookie', 'popup-maker' ); ?>"></button>
<button type="button" class="remove dashicons dashicons-no no-button" aria-label="<?php _e( 'Delete this cookie', 'popup-maker' ); ?>"></button>
<script type="text/html" id="tmpl-pum-cookie-add-event">
print(PUM_Admin.templates.modal({
id: 'pum_cookie_add_event_modal',
title: '<?php _e( 'When should your cookie be created?', 'popup-maker' ); ?>',
content: PUM_Admin.cookies.template.selectbox({id: 'popup_cookie_add_event', name: "", placeholder: "<?php _e( 'Select a cookie type.', 'popup-maker' ); ?>"}),
save_button: pum_admin_vars.I10n.add || '<?php __( 'Add', 'popup-maker' ); ?>'
<script type="text/html" id="tmpl-pum-field-cookie_key">
<button type="button" class="reset dashicons-before dashicons-image-rotate" title="<?php _e( 'Reset Cookie Key', 'popup-maker' ); ?>"></button>
<input type="text" placeholder="{{data.placeholder}}" class="{{data.size}}-text dashicons-before dashicons-image-rotate" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>