Plugin Directory

Changeset 1745539


Ignore:
Timestamp:
10/12/2017 03:48:51 PM (8 years ago)
Author:
lepittenger
Message:

wraps tinymce button in conditional so it only loads in admin

Location:
lbdesign-button-shortcode/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lbdesign-button-shortcode/trunk/js/lbdesign-button-shortcode.js

    r1729472 r1745539  
    9292                author : 'Lauren Pittenger @ LBDesign',
    9393                authorurl : 'http://lbdesign.tv',
    94                 version : "1.3.1"
     94                version : "1.3.2"
    9595            };
    9696        }
  • lbdesign-button-shortcode/trunk/lbdesign-button-shortcode.php

    r1729472 r1745539  
    66* Author URI: http://laurenpittenger.com
    77* License: GPL
    8 * Version: 1.3.1
     8* Version: 1.3.2
    99*/
    1010
     
    6060function lbdesign_tinymce_buttons() {
    6161
    62     add_filter( 'mce_external_plugins', 'lbdesign_add_buttons' ); // hooks plugin to TinyMCE
    63     add_filter( 'mce_buttons', 'lbdesign_register_buttons' ); // used to show which buttons to show on TinyMCE
     62    if ( is_admin() && current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) ) {
     63      add_filter( 'mce_external_plugins', 'lbdesign_add_buttons' ); // hooks plugin to TinyMCE
     64      add_filter( 'mce_buttons', 'lbdesign_register_buttons' ); // used to show which buttons to show on TinyMCE
     65    }
    6466
    6567}
  • lbdesign-button-shortcode/trunk/readme.txt

    r1741757 r1745539  
    44Requires at least: 3.0.1
    55Tested up to: 4.8.2
    6 Stable tag: 1.3.1
     6Stable tag: 1.3.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 1.3.2 =
     53
     54* Adds a check so TinyMCE button only loads in admin
     55
    5256= 1.3.1 =
    5357
Note: See TracChangeset for help on using the changeset viewer.