=== modified file 'functions/metaboxes.php' --- functions/metaboxes.php 2017-10-16 15:09:37 +0000 +++ functions/metaboxes.php 2018-02-15 12:29:47 +0000 @@ -3,19 +3,19 @@ define('WYSIWYG_META_BOX_ID', 'dbt_press_links'); define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different define('WYSIWYG_META_KEY', 'dbt_press_links'); - + add_action('admin_init', 'wysiwyg_register_meta_box'); function wysiwyg_register_meta_box(){ add_meta_box(WYSIWYG_META_BOX_ID, __('Press release links', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post'); } - + function wysiwyg_render_meta_box(){ - + global $post; - + $meta_box_id = WYSIWYG_META_BOX_ID; $editor_id = WYSIWYG_EDITOR_ID; - + echo "
Add press release links here using the 'insert link' tool on the toolbar (new line for each link)
"; //Add CSS & jQuery goodness to make this work like the original WYSIWYG echo " @@ -25,26 +25,26 @@ #$meta_box_id #editorcontainer{background:#fff !important;} #$meta_box_id #$editor_id_fullscreen{display:none;} - + "; - + //Create The Editor $content = get_post_meta($post->ID, WYSIWYG_META_KEY, true); wp_editor($content, $editor_id); - + //Clear The Room! echo ""; } - + add_action('save_post', 'wysiwyg_save_meta'); function wysiwyg_save_meta(){ - + $editor_id = WYSIWYG_EDITOR_ID; $meta_key = WYSIWYG_META_KEY; - + if(isset($_REQUEST[$editor_id])) update_post_meta($_REQUEST['post_ID'], WYSIWYG_META_KEY, $_REQUEST[$editor_id]); - + } add_filter( 'dbt_press_contact', 'make_clickable', 9 ); @@ -122,8 +122,8 @@ //'type' => 'text' //) ) -); - +); + add_action('admin_menu', 'mytheme_add_box'); // Add meta box @@ -152,7 +152,7 @@ '- - -
-Enter the YouTube video 11 digit code here e.g from this url http://www.youtube.com/watch?v=D6z6hn6wZlg you need the 11 digits after ?v= i.e D6z6hn6wZlg
- -Enter the codes comma separated (no space) if you have more than one e.g: h384z7Ph0gU,5_4fXQcxFRs
-