daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Feb 17th, 2012 223 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function  jwl_tinycolor_css_callback_function() {
  2.         $options = get_option('jwl_tinycolor_css_field_id');
  3.         $items = array("Default", "Pink", "Green");
  4.         echo "<select id='tinycolor' name='jwl_tinycolor_css_field_id[tinycolor]'>";
  5.         foreach($items as $item) {
  6.                 $selected = ($options['tinycolor']==$item) ? 'selected="selected"' : '';
  7.                 echo "<option value='$item' $selected>$item</option>";
  8.         }
  9.         echo "</select>";
  10.  }
  11.  
  12.  
  13.  //$hello = get_option("$options['tinycolor']==$item");
  14.  function change_mce_colors() {
  15.         if (($options['tinycolor']==$item)=="Green") {
  16.                 $urlgreen = plugin_dir_url( __FILE__ ) . 'css/change_mce_green.css';  // Color Options
  17.         echo "<link rel='stylesheet' type='text/css' href='$urlgreen' />\n";  // Added for admin panel css styles
  18.         }
  19.         elseif (($options['tinycolor']==$item)=="Pink") {
  20.                 $urlpink = plugin_dir_url( __FILE__ ) . 'css/change_mce_pink.css';  // Color Options
  21.         echo "<link rel='stylesheet' type='text/css' href='$urlpink' />\n";  // Added for admin panel css styles
  22.         }
  23.         else {
  24.                 echo '';
  25.         }
  26.  }
  27.  add_action('admin_head', 'change_mce_colors');
RAW Paste Data
Top