HEX
Server: Apache/2.4.41
System: Linux mainweb 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: nationalmedicaregrp (1119)
PHP: 8.3.7
Disabled: exec,passthru,shell_exec,system,popen,proc_open,pcntl_exec
Upload Files
File: /home/holamediaagency/public_html/wp-content/plugins/wpseo-local/classes/schema/class-schema.php
<?php
/**
 * @package WPSEO_Local\Frontend\Schema
 */

/**
 * Class WPSEO_Local_JSON_LD.
 *
 * Manages the Schema.
 *
 * @property WPSEO_Schema_Context $context A value object with context variables.
 * @property array                $options Local SEO options.
 */
class WPSEO_Local_Schema {

	/**
	 * Stores the options for this plugin.
	 *
	 * @var array
	 */
	public $options = [];

	/**
	 * A value object with context variables.
	 *
	 * @var WPSEO_Schema_Context
	 */
	private $context;

	/**
	 * WPSEO_Local_JSON_LD constructor.
	 */
	public function __construct() {
		$this->options = get_option( 'wpseo_local' );

		add_filter( 'wpseo_schema_graph_pieces', [ $this, 'add_graph_piece' ], 11, 2 );
	}

	/**
	 * Adds the graph pieces to the Schema Graph.
	 *
	 * @param array                $pieces  Array of Graph pieces.
	 * @param WPSEO_Schema_Context $context A value object with context variables.
	 *
	 * @return array Array of Graph pieces.
	 */
	public function add_graph_piece( $pieces, WPSEO_Schema_Context $context ) {
		$this->context = $context;

		$pieces[] = new WPSEO_Local_Postal_Address( $context );
		$pieces[] = new WPSEO_Local_Postal_Address_Branch( $context );
		$pieces[] = new WPSEO_Local_Organization( $context );
		$pieces[] = new WPSEO_Local_Organization_Branch( $context );
		$pieces[] = new WPSEO_Local_Organization_List( $context );
		$pieces[] = new WPSEO_Local_Organization_List( $context );
		$pieces[] = new WPSEO_Local_Logo_Image_Object( $context );
		$pieces[] = new WPSEO_Local_Logo_Image_Object_Branch( $context );

		return $pieces;
	}

}