Esempio n. 1
0
}
if ($tadv_options['advlink'] == '1') {
    $plugins[] = 'advlink';
}
if ($tadv_options['advimage'] == '1') {
    $plugins[] = 'advimage';
}
if ($tadv_options['contextmenu'] == '1') {
    $plugins[] = 'contextmenu';
}
$buttons = array('Kitchen Sink' => 'wp_adv', 'Quote' => 'blockquote', 'Bold' => 'bold', 'Italic' => 'italic', 'Strikethrough' => 'strikethrough', 'Underline' => 'underline', 'Bullet List' => 'bullist', 'Numbered List' => 'numlist', 'Outdent' => 'outdent', 'Indent' => 'indent', 'Allign Left' => 'justifyleft', 'Center' => 'justifycenter', 'Alligh Right' => 'justifyright', 'Justify' => 'justifyfull', 'Cut' => 'cut', 'Copy' => 'copy', 'Paste' => 'paste', 'Link' => 'link', 'Remove Link' => 'unlink', 'Insert Image' => 'image', 'More Tag' => 'wp_more', 'Split Page' => 'wp_page', 'Search' => 'search', 'Replace' => 'replace', '<!--fontselect-->' => 'fontselect', '<!--fontsizeselect-->' => 'fontsizeselect', 'Help' => 'wp_help', 'Full Screen' => 'fullscreen', '<!--styleselect-->' => 'styleselect', '<!--formatselect-->' => 'formatselect', 'Text Color' => 'forecolor', 'Back Color' => 'backcolor', 'Paste as Text' => 'pastetext', 'Paste from Word' => 'pasteword', 'Remove Format' => 'removeformat', 'Clean Code' => 'cleanup', 'Check Spelling' => 'spellchecker', 'Character Map' => 'charmap', 'Print' => 'print', 'Undo' => 'undo', 'Redo' => 'redo', 'Table' => 'tablecontrols', 'Citation' => 'cite', 'Inserted Text' => 'ins', 'Deleted Text' => 'del', 'Abbreviation' => 'abbr', 'Acronym' => 'acronym', 'XHTML Attribs' => 'attribs', 'Layer' => 'layer', 'Advanced HR' => 'advhr', 'View HTML' => 'code', 'Hidden Chars' => 'visualchars', 'NB Space' => 'nonbreaking', 'Sub' => 'sub', 'Sup' => 'sup', 'Visual Aids' => 'visualaid', 'Insert Date' => 'insertdate', 'Insert Time' => 'inserttime', 'Anchor' => 'anchor', 'Style' => 'styleprops', 'Smilies' => 'emotions', 'Insert Movie' => 'media', 'IE Spell' => 'iespell');
if (function_exists('moxiecode_plugins_url')) {
    if (moxiecode_plugins_url('imagemanager')) {
        $buttons['MCFileManager'] = 'insertimage';
    }
    if (moxiecode_plugins_url('filemanager')) {
        $buttons['MCImageManager'] = 'insertfile';
    }
}
$tadv_allbtns = array_values($buttons);
$tadv_allbtns[] = 'separator';
$tadv_allbtns[] = '|';
if (get_option('tadv_plugins') != $plugins) {
    update_option('tadv_plugins', $plugins);
}
if (get_option('tadv_btns1') != $toolbar_1) {
    update_option('tadv_btns1', $toolbar_1);
}
if (get_option('tadv_btns2') != $toolbar_2) {
    update_option('tadv_btns2', $toolbar_2);
}
 function get_all_buttons()
 {
     if (!empty($this->all_buttons)) {
         return $this->all_buttons;
     }
     $buttons = array('bold' => 'Bold', 'italic' => 'Italic', 'underline' => 'Underline', 'strikethrough' => 'Strikethrough', 'alignleft' => 'Align Left', 'aligncenter' => 'Align Center', 'alignright' => 'Align Right', 'alignjustify' => 'Justify', 'styleselect' => '<!--styleselect-->', 'formatselect' => '<!--formatselect-->', 'fontselect' => '<!--fontselect-->', 'fontsizeselect' => '<!--fontsizeselect-->', 'cut' => 'Cut', 'copy' => 'Copy', 'paste' => 'Paste', 'bullist' => 'Bullet List', 'numlist' => 'Numbered List', 'outdent' => 'Outdent', 'indent' => 'Indent', 'blockquote' => 'Quote', 'undo' => 'Undo', 'redo' => 'Redo', 'removeformat' => 'Remove Formatting', 'subscript' => 'Subscript', 'superscript' => 'Superscript', 'hr' => 'Horizontal Rule', 'link' => 'Link', 'unlink' => 'Remove Link', 'image' => 'Edit Image', 'charmap' => 'Character Map', 'pastetext' => 'Paste as Text', 'print' => 'Print', 'anchor' => 'Insert Anchor', 'searchreplace' => 'Search/Replace', 'visualblocks' => 'Visual Blocks', 'code' => 'HTML code', 'fullscreen' => 'Full Screen', 'insertdatetime' => 'Insert Date/Time', 'media' => 'Insert Media', 'nonbreaking' => 'Non-Break Space', 'table' => 'Table', 'ltr' => 'Left to Right', 'rtl' => 'Right to Left', 'emoticons' => 'Emoticons', 'forecolor' => 'Text Color', 'backcolor' => 'Text Background', 'wp_adv' => 'Toolbar toggle', 'wp_help' => 'Help', 'wp_more' => 'More Tag', 'wp_page' => 'Page Break');
     if (function_exists('moxiecode_plugins_url')) {
         if (moxiecode_plugins_url('imagemanager')) {
             $buttons['insertimage'] = 'MC Image Manager';
         }
         if (moxiecode_plugins_url('filemanager')) {
             $buttons['insertfile'] = 'MC File Manager';
         }
     }
     // add/remove allowed buttons
     $buttons = apply_filters('tadv_allowed_buttons', $buttons);
     $this->all_buttons = $buttons;
     $this->buttons_filter = array_keys($buttons);
     return $buttons;
 }