WPBC_JS_IN_FOOTER ) ); // FixIn: 9.8.6.1.
wp_enqueue_script( 'wpbc_shortcode_popup', wpbc_plugin_url( '/includes/ui_modal__shortcodes/_out/wpbc_shortcode_popup.js' ), array( 'jquery' ), WP_BK_VERSION_NUM, array( 'in_footer' => WPBC_JS_IN_FOOTER ) ); // FixIn: 9.8.6.1.
wp_enqueue_script( 'wpbc-admin-support', wpbc_plugin_url( '/core/any/js/admin-support.js' ), array( 'jquery' ), WP_BK_VERSION_NUM, array( 'in_footer' => WPBC_JS_IN_FOOTER ) ); //Needed for ability to send dismiss //2024-03-13 // FixIn: 9.9.0.42.
if ( wpbc_can_i_load_on__edit_new_post_page() ) {
do_action( 'wpbc_enqueue_js_files', 'admin' );
}
}
}
add_action( 'admin_enqueue_scripts', 'wpbc_register_js__shortcode_config' );
//TODO: delete these code:
// =====================================================================================================================
// Load wp Templates
// =====================================================================================================================
/**
* On WordPress Init, define load of "WP Util, that support wp.template" and define Templates at Footer
* @return void
*/
function wpbc_templates__init_hook__shortcode_config(){
if ( wpbc_can_i_load_on_this_page__shortcode_config() ) {
// Load: WP Util, that support wp.template, based on underscore _.template system
wp_enqueue_script( 'wp-util' );
// Load: Templates
add_action( 'admin_footer', 'wpbc_templates__shortcode_config__write_templates', 10, 2 );
}
}
//add_action( 'init', 'wpbc_templates__init_hook__shortcode_config' ); // Define init hooks
/**
* Write all needed templates for shortcode config at the footer.
*/
function wpbc_templates__shortcode_config__write_templates(){
}
// =====================================================================================================================
// Info: E X A M P L E of Template Usage
// =====================================================================================================================
// * Template(s), that loaded in Footer defined in wpbc_templates__init_hook__shortcode_config()
// *
// * add_action( 'admin_footer', 'wpbc__template__shortcode_config_booking__EXAMPLE', 10, 2 );
// *
// *
// * Help doc for use templates:
// * 1. JavaScript: <# console.log( 'JS from template' ); #>
// * 2. Escaped data: {{ data.shortcode_config_2 }}
// * 2. Not escaped - HTML data: {{{ data.shortcode_config_2 }}}
// *
if ( 0 ) {
function wpbc__template__shortcode_config_booking__EXAMPLE(){
// Templates here
?>