Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Posts, Post Types: Remove redundant function calls in `get_body_class…
…()`. As part of a previous change to add support for post type templates, the `$wp_query->get_queried_object_id()` method ended up being called twice, in both the `is_singular()` and `is_page()` conditional branches. The `get_post()` function call was also unnecessary, as `$wp_query->get_queried_object()` is already called in the `is_singular()` branch above, which includes the `is_page()` branch too. This commit removes the redundant calls. The first `$wp_query->get_queried_object_id()` call is removed as well, since the post ID is already available via `$wp_query->get_queried_object()`. Follow-up to [10485], [10877], [12877], [13032], [21597], [38951]. Props mattkeys, spacedmonkey, oglekler. Fixes #43661. git-svn-id: https://develop.svn.wordpress.org/trunk@56424 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information