WordPress.org

Support

Support » How-To and Troubleshooting » Bug in add remove action ?

Bug in add remove action ?

  • paulwpxp

    @paulwp

    Font hero

    Is this a bug ?

    The order of action hooks for after_setup_theme seems wrong.

    Step to reproduce:

    1. Make a TwentyTwelve child theme.

    2. Put this function in

    function my_remove() {
      remove_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' );
    }
    add_action( 'after_setup_theme', 'my_remove', 11 );

    3. Refresh the admin page and notice the Apperance > Header is still active

    4. Change the priority from 11 to 9 and refresh, now the Header is gone.

    Expected: The priority 11 should work, 9 shoud not work
    What actually happened: The opposite.

    fresh WP3.5 + No plugin

    What’s wrong here ?

  • The topic ‘Bug in add remove action ?’ is closed to new replies.