HEX
Server: Apache
System: Linux web15f74.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: lucendi (859622)
PHP: 7.4.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/lucendi/www/wp-content/themes/divi/includes/builder/plugin-compat/wordpress-seo.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * Plugin compatibility for Yoast SEO
 *
 * @since 3.0.76 (builder version)
 * @link https://wordpress.org/plugins/wordpress-seo/
 */
class ET_Builder_Plugin_Compat_WordPress_SEO extends ET_Builder_Plugin_Compat_Base {
	/**
	 * Constructor
	 */
	public function __construct() {
		$this->plugin_id = 'wordpress-seo/wp-seo.php';
		$this->init_hooks();
	}

	/**
	 * Hook methods to WordPress
	 * Latest plugin version: 3.1.1
	 * @return void
	 */
	public function init_hooks() {
		// Bail if there's no version found
		if ( ! $this->get_plugin_version() ) {
			return;
		}

		add_filter( 'pre_get_posts', array( $this, 'maybe_load_builder_modules_early' ), 0 );
	}

	/**
	 * Checks to see if the current request is for a sitemap and if so, loads the builder's
	 * modules so that they are loaded before Yoast generates the sitemap.
	 * {@see 'pre_get_posts' (0) Must run before Yoast's callback which has priority of 1.}
	 *
	 * @param WP_Query $query
	 */
	public function maybe_load_builder_modules_early( $query ) {
		if ( ! $query->is_main_query() ) {
			return;
		}

		if ( ! get_query_var( 'xsl' ) && ! get_query_var( 'sitemap' ) ) {
			return;
		}

		remove_action( 'wp', 'et_builder_init_global_settings', 9 );
		remove_action( 'wp', 'et_builder_add_main_elements' );

		et_builder_init_global_settings();
		et_builder_add_main_elements();

		add_filter( 'wpseo_sitemap_content_before_parse_html_images', array( $this, 'do_shortcode' ) );
	}

	public function do_shortcode( $content ) {
		return apply_filters( 'the_content', $content );
	}
}

new ET_Builder_Plugin_Compat_WordPress_SEO;