GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-gravityview-plugin-hooks-all-in-one-seo.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Add support for the All In One SEO plugin
4  *
5  * @file class-gravityview-plugin-hooks-all-in-one-seo.php
6  * @since 2.10.3
7  * @license GPL2+
8  * @author GravityView <[email protected]>
9  * @link http://gravityview.co
10  * @copyright Copyright 2021, Katz Web Services, Inc.
11  *
12  * @package GravityView
13  */
14 
15 /**
16  * @inheritDoc
17  * @since 2.10.3
18  */
20  /**
21  * @inheritDoc
22  * @since 2.10.3
23  */
24  protected $constant_name = 'AIOSEO_FILE';
25 
26  protected $style_handles = array(
27  'aioseo-app-style',
28  'aioseo-common',
29  'aioseo-post-settings-metabox',
30  'aioseo-vendors',
31  );
32 
33  /**
34  * @inheritDoc
35  * @since 2.10.3
36  */
37  protected $script_handles = array(
38  'aioseo-app',
39  'aioseo-common',
40  'aioseo-link-format',
41  'aioseo-post-settings-metabox',
42  'aioseo-vendors',
43  );
44 
45  /**
46  * @inheritDoc
47  * @since 2.17
48  */
49  protected function add_hooks() {
50  add_filter( 'pre_do_shortcode_tag', array( $this, 'skip_shortcode_processing' ), 10, 4 );
51  }
52 
53  /**
54  * Prevent AIO SEO from processing GV shortcode
55  *
56  * @since 2.10.3
57  *
58  * @see do_shortcode_tag();
59  *
60  * @param string $shortcode_tag Shortcode name
61  * @param false|string $return Short-circuit return value: false or the value to replace the shortcode with
62  *
63  * @return false|string
64  */
65  public function skip_shortcode_processing( $result, $shortcode_tag ) {
66  if ( 'gravityview' === $shortcode_tag && preg_match( '/AIOSEO/', json_encode( debug_backtrace() ) ) ) {
67  return '';
68  }
69 
70  return $result;
71  }
72 }
73 
skip_shortcode_processing( $result, $shortcode_tag)
Prevent AIO SEO from processing GV shortcode.
Abstract class that makes it easy for plugins and themes to register no-conflict scripts and styles...