WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode Exec PHP
[resolved] Invalid argument error when edeitor uses shortcode TinyMCE button (2 posts)

  1. cruxwireweb
    Member
    Posted 2 years ago #

    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/

  2. Marcel Bokhorst
    Member
    Plugin Author

    Posted 2 years ago #

    I don't think this is a problem of Shortcode Exec PHP.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.