Changeset 10507
- Timestamp:
- 12/09/2020 11:41:55 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r10408 r10507 1668 1668 * @global \WP_Post $post WordPress post object. 1669 1669 * 1670 * @param string|\WP_Post $plugin_slug The slug of the plugin to retrieve.1670 * @param int|string|\WP_Post $plugin_slug The slug of the plugin to retrieve. 1671 1671 * @return \WP_Post|bool 1672 1672 */ … … 1676 1676 if ( $plugin_slug instanceof \WP_Post ) { 1677 1677 return $plugin_slug; 1678 } 1679 1680 // Handle int $plugin_slug being passed. NOT numeric slugs 1681 if ( 1682 is_int( $plugin_slug ) && 1683 ( $post_obj = get_post( $plugin_slug ) ) && 1684 ( $post_obj->ID === $plugin_slug ) 1685 ) { 1686 $post = $post_obj; 1687 return $post_obj; 1678 1688 } 1679 1689
Note: See TracChangeset
for help on using the changeset viewer.