WordPress.org

Forums

Bug in add remove action ? (1 post)

  1. paulwpxp
    Font hero
    Posted 3 years ago #

    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 ?

Topic Closed

This topic has been closed to new replies.

About this Topic