PluginProbe ʕ •ᴥ•ʔ
Rank Math SEO – AI SEO Tools to Dominate SEO Rankings / 1.0.271.1
Rank Math SEO – AI SEO Tools to Dominate SEO Rankings v1.0.271.1
1.0.272 1.0.271 1.0.271.1 1.0.270 1.0.269 trunk 1.0.216 1.0.217 1.0.218 1.0.219 1.0.220 1.0.221 1.0.222 1.0.223 1.0.224 1.0.225 1.0.226 1.0.227 1.0.227.1 1.0.228 1.0.229 1.0.230 1.0.231 1.0.232 1.0.233 1.0.234 1.0.234.1 1.0.235 1.0.236 1.0.237 1.0.238 1.0.239 1.0.240 1.0.241 1.0.242 1.0.243 1.0.244 1.0.245 1.0.246 1.0.247 1.0.248 1.0.249 1.0.250 1.0.251 1.0.251.1 1.0.252 1.0.252.1 1.0.253 1.0.254 1.0.255 1.0.256 1.0.257 1.0.258 1.0.259 1.0.259.1 1.0.260 1.0.261 1.0.262 1.0.263 1.0.264 1.0.264.1 1.0.265 1.0.266 1.0.266.1 1.0.267 1.0.268
seo-by-rank-math / includes / class-compatibility.php
seo-by-rank-math / includes Last commit date
3rdparty 4 weeks ago abilities 4 weeks ago admin 4 weeks ago cli 5 years ago frontend 1 month ago helpers 1 month ago metaboxes 2 years ago module 1 month ago modules 3 weeks ago opengraph 1 month ago replace-variables 1 month ago rest 3 weeks ago settings 1 month ago traits 1 month ago updates 1 month ago class-auto-updater.php 5 years ago class-cmb2.php 1 month ago class-common.php 6 months ago class-compatibility.php 1 year ago class-data-encryption.php 6 months ago class-defaults.php 6 years ago class-frontend-seo-score.php 1 month ago class-helper.php 11 months ago class-installer.php 1 month ago class-json-manager.php 1 year ago class-kb.php 7 months ago class-metadata.php 2 months ago class-post.php 1 year ago class-rewrite.php 6 months ago class-settings.php 1 year ago class-term.php 1 year ago class-thumbnail-overlay.php 1 year ago class-tracking.php 4 weeks ago class-update-email.php 1 month ago class-updates.php 4 months ago class-user.php 8 months ago index.php 7 years ago interface-runner.php 7 years ago template-tags.php 1 year ago
class-compatibility.php
104 lines
1 <?php
2 /**
3 * The compatibility functionality for 3rd party plugins.
4 *
5 * @since 0.9.0
6 * @package RankMath
7 * @subpackage RankMath\Core
8 * @author Rank Math <support@rankmath.com>
9 */
10
11 namespace RankMath;
12
13 use RankMath\Traits\Hooker;
14 use RankMath\Helpers\Str;
15
16 defined( 'ABSPATH' ) || exit;
17
18 /**
19 * Compatibility class.
20 */
21 class Compatibility {
22
23 use Hooker;
24
25 /**
26 * The Constructor.
27 */
28 public function __construct() {
29
30 if ( is_admin() ) {
31
32 if ( \defined( 'PIRATE_FORMS_VERSION' ) ) {
33 $this->action( 'admin_enqueue_scripts', 'pirate_forms_dequeue_scripts' );
34 }
35 }
36
37 $this->filter( 'rank_math/pre_simple_page_id', 'subscribe_to_comments_reloaded' );
38 $this->filter( 'genesis_detect_seo_plugins', 'disable_genesis_seo' );
39 }
40
41 /**
42 * Subscribe to comments reloaded page ID.
43 *
44 * @param int $page_id Change page id to real page.
45 * @return int
46 */
47 public function subscribe_to_comments_reloaded( $page_id ) {
48 if ( is_plugin_active( 'subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php' ) ) {
49 $page_permalink = get_option( 'subscribe_reloaded_manager_page', '/comment-subscriptions/' );
50 if ( function_exists( 'qtrans_convertURL' ) ) {
51 $page_permalink = qtrans_convertURL( $page_permalink );
52 }
53 if ( isset( $_SERVER['REQUEST_URI'] ) && ( strpos( sanitize_text_field( $_SERVER['REQUEST_URI'] ), $page_permalink ) !== false ) ) {
54 $this->action( 'rank_math/head', 'subscribe_to_comments_reloaded_remove_robots', 1 );
55 return get_queried_object_id();
56 }
57 }
58
59 return $page_id;
60 }
61
62 /**
63 * Remove robots for this plugin.
64 */
65 public function subscribe_to_comments_reloaded_remove_robots() {
66 remove_action( 'rank_math/frontend/robots', '__return_empty_array' );
67 }
68
69 /**
70 * Remove Pirate forms plugin scripts and styles from setting panels.
71 */
72 public function pirate_forms_dequeue_scripts() {
73
74 if ( ! wp_script_is( 'pirate_forms_pro_admin_scripts' ) ) {
75 return;
76 }
77
78 $screen = get_current_screen();
79 if (
80 ( ! Str::contains( 'rank-math', $screen->id ) && ! in_array( $screen->base, [ 'post', 'term', 'profile', 'user-edit' ], true ) ) ||
81 'pf_form' === $screen->id
82 ) {
83 return;
84 }
85
86 wp_dequeue_script( 'pirate_forms_pro_admin_scripts' );
87 wp_dequeue_style( 'pirate_forms_pro_admin_styles' );
88 }
89
90 /**
91 * Disable Genesis SEO functionality.
92 *
93 * @param array $value Array hold disable info.
94 *
95 * @return array
96 */
97 public function disable_genesis_seo( $value ) {
98 $value['classes'][] = '\RankMath\RankMath';
99 $value['functions'][] = 'rank_math';
100
101 return $value;
102 }
103 }
104