0 && function_exists( 'get_headers' ) ) { $url = esc_url( $url ); $file_headers = @get_headers( $url ); $exists = $file_headers && $file_headers[0] != 'HTTP/1.1 404 Not Found'; $hadError = false; } echo '{ "exists": '. ($exists ? '1' : '0') . ($hadError ? ', "error" : 1 ' : '') . ' }'; die(); } // generate a nonce function ajax_action_generate_nonce() { echo wp_create_nonce( 'animate-tinymce' ); die(); } function enqueue_scripts() { wp_register_script( 'animate-tinymce-dialog-script', plugins_url( 'admin/shortcodes/dialog.js', __FILE__ ), array( 'jquery' ), ANIMATE_VERSION, true ); wp_enqueue_script( 'animate-tinymce-dialog-script' ); $plugin_data = array( 'url' => ANIMATE_URL, 'error_loading_details_for_shortcode' => __('Error loading details for shortcode', 'animate'), 'animation_style_label' => __('Animation Style','animate'), 'duration_label' => __('Duration','animate'), 'duration_help' => __('Animation duration in seconds. (e.g. 0.15)','animate'), 'delay_label' => __('Delay','animate'), 'delay_help' => __('Delay before the animation starts in seconds. (e.g. 0.5)','animate'), 'offset_label' => __('Offset','animate'), 'offset_help' => __('Distance to start the animation in pixels (related to the browser bottom). (e.g. 10)','animate'), 'iteration_label' => __('Iteration','animate'), 'iteration_help' => __('Number of times the animation is repeated. (e.g. 5)','animate'), 'animate_infinitely_label' => __('Animate Infinitely','animate'), 'custom_class_label' => __('Custom Class','animate'), 'custom_class_help' => __('Any CSS classes you want to add.','animate') ); wp_localize_script( 'animate-tinymce-dialog-script', 'animate_plugin_data', $plugin_data ); } // Output the HTML markup for the dialog box. function output_dialog_markup () { // URL to TinyMCE plugin folder $plugin_url = ANIMATE_URL . '/includes/shortcodes/'; ?> /* */ "; echo $code; } } }