PluginProbe
Parse.ly / 3.8.4
Parse.ly v3.8.4
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
← All changes | src/UI/class-admin-bar.php +4 -7 3.23.63.8.4 View file →
@@ -59,9 +59,9 @@
59 59 }
60 60 }
61 61
62 62 /**
63 - * Adds the "Parse.ly Stats" button on the admin bar when the current object
63 + * Adds the `Parse.ly Stats` button on the admin bar when the current object
64 64 * is a post or a page.
65 65 *
66 66 * @param WP_Admin_Bar $admin_bar WP_Admin_Bar instance, passed by reference.
67 67 */
@@ -66,18 +66,15 @@
66 66 * @param WP_Admin_Bar $admin_bar WP_Admin_Bar instance, passed by reference.
67 67 */
68 68 public function admin_bar_parsely_stats_button( WP_Admin_Bar $admin_bar ): void {
69 69 /**
70 - * The result of calling get_queried_object().
70 + * Variable.
71 71 *
72 - * Although it shouldn't return false per the documentation, it can
73 - * happen in practice.
74 - *
75 - * @var \WP_Term|\WP_Post_Type|WP_Post|\WP_User|null|false
72 + * @var \WP_Term|\WP_Post_Type|WP_Post|\WP_User|null
76 73 */
77 74 $queried_object = $GLOBALS['wp_the_query']->get_queried_object();
78 75
79 - if ( ! $queried_object instanceof WP_Post ) {
76 + if ( null === $queried_object || WP_Post::class !== get_class( $queried_object ) ) {
80 77 return;
81 78 }
82 79
83 80 /**