PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.2 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 All 106 releases
← All changes | src/UI/class-admin-bar.php +7 -4 3.16.3 → 3.24.2 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,15 +66,18 @@
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 - * Variable.
70 + * The result of calling get_queried_object().
71 71 *
72 - * @var \WP_Term|\WP_Post_Type|WP_Post|\WP_User|null
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
73 76 */
74 77 $queried_object = $GLOBALS['wp_the_query']->get_queried_object();
75 78
76 - if ( null === $queried_object || WP_Post::class !== get_class( $queried_object ) ) {
79 + if ( ! $queried_object instanceof WP_Post ) {
77 80 return;
78 81 }
79 82
80 83 /**