noptin_localize_optin_editor( array $state )
Function noptin editor localize.
Parameters Parameters
- $state
(array) (Required) the current editor state.
Return Return
(void)
Source Source
File: includes/functions.php
function noptin_localize_optin_editor( $state ) { $props = noptin_get_form_design_props(); $props[] = 'DisplayOncePerSession'; $props[] = 'timeDelayDuration'; $props[] = 'scrollDepthPercentage'; $props[] = 'cssClassOfClick'; $props[] = 'triggerPopup'; $props[] = 'slideDirection'; $params = array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'api_url' => get_home_url( null, 'wp-json/wp/v2/' ), 'nonce' => wp_create_nonce( 'noptin_admin_nonce' ), 'data' => $state, 'templates' => noptin_get_optin_templates(), 'color_themes' => array_flip( noptin_get_color_themes() ), 'design_props' => $props, 'field_props' => noptin_get_form_field_props(), ); $params = apply_filters( 'noptin_form_editor_params', $params ); wp_localize_script( 'noptin-optin-editor', 'noptinEditor', $params ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.5 | Introduced. |