Skip to content

Commit

Permalink
Fix code to disable admin menu on WP.com
Browse files Browse the repository at this point in the history
We need to add the `false` filter, not remove it (which does nothing).
  • Loading branch information
mjangda committed Oct 17, 2017
1 parent 119e01c commit 56b71ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wpcom-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
add_action( 'pre_amp_render_post', 'jetpack_amp_disable_the_content_filters' );

// Disable admin menu
remove_action( 'amp_options_menu_is_enabled', '__return_false' );
add_filter( 'amp_options_menu_is_enabled', '__return_false', 9999 );

function jetpack_amp_disable_the_content_filters( $post_id ) {
// Shortcode overrides.
Expand Down

0 comments on commit 56b71ba

Please sign in to comment.