Make WordPress Core


Ignore:
Timestamp:
10/27/2014 01:07:38 PM (10 years ago)
Author:
SergeyBiryukov
Message:

When using 'show_in_menu' as a default value for 'show_in_admin_bar' in register_post_type(), cast to boolean instead of requiring a strict match.

props ipm-frommen.
fixes #30092.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r29816 r30041  
    13531353    // If not set, default to the whether the full UI is shown.
    13541354    if ( null === $args->show_in_admin_bar )
    1355         $args->show_in_admin_bar = true === $args->show_in_menu;
     1355        $args->show_in_admin_bar = (bool) $args->show_in_menu;
    13561356
    13571357    // If not set, default to the setting for public.
Note: See TracChangeset for help on using the changeset viewer.