public function enqueue_editor_scripts() { wp_enqueue_script('page'); wp_enqueue_script('editor'); add_thickbox(); wp_enqueue_script('media-upload'); wp_enqueue_script('word-count'); if (WPDD_Layouts::views_available()) { $deps = array('jquery', 'views-shortcodes-gui-script'); } else { $deps = array('jquery'); } wp_register_script('text_cell_js', WPDDL_RELPATH . '/inc/gui/editor/js/text-cell.js', $deps, WPDDL_VERSION, true); wp_enqueue_script('text_cell_js'); }
public function enqueue_editor_scripts() { // the Quicktags fallback implementation is contained into this script // It should be loaded from the icl_editor_addon_plugin.js script in common// // But is may not pack the method in older common versions, which also loaded it too late to use as a dependency // After a couple of join releases, remove the fallback from this script // And make it dependant of icl_editor-script // NOTE we still do not have a fallback for the Media Manager here... if (WPDD_Layouts::views_available()) { $deps = array('jquery', 'quicktags', 'wplink', 'views-shortcodes-gui-script'); } else { $deps = array('jquery', 'quicktags', 'wplink'); } wp_register_script('wp-content-template-editor', WPDDL_GUI_RELPATH . "editor/js/content-template-cell.js", $deps, null, true); wp_enqueue_script('wp-content-template-editor'); wp_localize_script('wp-content-template-editor', 'DDLayout_content_template_strings', array('current_post' => __('This cell will display the content of the post which uses the layout.', 'ddl-layouts'), 'this_post' => __('This cell will display the content of a specific post.', 'ddl-layouts'))); }