Support » Plugin: Shortcode Exec PHP » [Plugin: Shortcode Exec PHP] Invalid argument error when edeitor uses shortcode TinyMCE button

  • Resolved cruxwireweb

    (@cruxwireweb)


    Hi-

    Can anyone figure this one out?

    I have two users on this new site I am setting up. One is administrator account and one is an editor account. Originally, both accounts could use the shortcode button in TinyMCE with no problem. However, when I added descriptions to my shortcodes (previously only one had a descrip), then the problem arose. When I use the admin account, the shortcode button in TinyMCE works fine, but when using the editor account, I get this error when the shortcode selection box pops up:

    Warning: Invalid argument supplied for foreach() in .../wp-admin/includes/plugin.php on line 1261

    This happens both in FF and Chrome.

    The code at error code location is the remove_menu_page function. In my functions.php, this is my only use of remove_menu_page:

    function delete_menu_items() {
    		if ( current_user_can( 'editor' )) {
    			remove_menu_page( 'link-manager.php' );
    			remove_menu_page( 'tools.php' );
    			remove_menu_page( 'wpcf7' );
    		}
    	}
    	add_action( 'admin_init', 'delete_menu_items' );

    My shortcode descriptions contain no punctuation other than commas and periods, and one has underscores referring to the title of other shortcodes, but no brackets.

    Interestingly, I’m getting the error message 3 times, but I have 8 shortcodes. However, no 3 shortcode descriptions share a notable characteristic.

    In the shortcode selection popup (for the editor), the selection drop-down menu does show up after the errors, and all 8 shortcodes are there. I’m able to insert a shortcode and it works.

    I’m using the _s theme.

    If an export of my shortcodes would be helpful, please let me know.

    Thanks,
    Kim

    http://wordpress.org/extend/plugins/shortcode-exec-php/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Shortcode Exec PHP] Invalid argument error when edeitor uses shortcode TinyMCE button’ is closed to new replies.