speedphreak
Forum Replies Created
-
Forum: Plugins
In reply to: Adding additional and wrapping buttons in TinyMCE EditorFigured out the answer to my own question. Went through the TinyMCE docs some more and found this. Then found looked at this section of code in the /wp-includes/js/tinymce/tiny_mce_gzip.php file.
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright' ,'separator', 'link', 'unlink', 'image', 'wordpress', 'separator', 'undo', 'redo', 'code', 'wphelp', 'formatselect', 'fontselect', 'fontsizeselect'));
$mce_buttons = implode($mce_buttons, ',');
$mce_buttons_2 = apply_filters('mce_buttons_2', array());
$mce_buttons_2 = implode($mce_buttons_2, ',');
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
$mce_buttons_3 = implode($mce_buttons_3, ',');
$mce_browsers = apply_filters('mce_browsers', array('msie', 'gecko', 'opera'));
$mce_browsers = implode($mce_browsers, ',');
?>initArray = {
mode : "specific_textareas",
textarea_trigger : "title",
width : "100%",
theme : "advanced",
theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>",
theme_advanced_buttons2 : "<?php echo $mce_buttons_2; ?>",
theme_advanced_buttons3 : "<?php echo $mce_buttons_3; ?>",Saw where the $mce_buttons_n variable was getting set and played with it. Does exactly what the docs say. Allows you to specify the rows for the buttons. I’ll use this to modify my button layout.
If you looked at this to offer help, thanks! If you looked for a solution to a similar question, hope this helps.
Got it to work by changing the following code in wp-includes\classes.php from this
//only select past-dated posts, except if a logged in user is viewing a single: then, if they
//can edit the post, we let them through
if ($pagenow != ‘post.php’ && $pagenow != ‘edit.php’ && !($this->is_single && $user_ID))to this
//only select past-dated posts, except if a logged in user is viewing a single: then, if they
//can edit the post, we let them through
if ($pagenow != ‘post.php’ && $pagenow != ‘edit.php’ && !($this->is_single && $user_ID) && empty($q[‘cat’]))Looks like it’ll do the trick. Only problem I see is it’ll show all post for all categories. Not sure if that’s going to be a problem for me or not. If anyone has any better suggestions, please let me know. Thanks.