Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @author : Jegtheme
- */
- if ( ! defined( 'ABSPATH' ) ) {
- exit;
- }
- if ( ! class_exists( 'JNews_Schema' ) )
- {
- Class JNews_Schema
- {
- /**
- * @var JNews_Account_Handler
- */
- private static $instance;
- private $schema = array();
- /**
- * @return JNews_Account_Handler
- */
- public static function getInstance()
- {
- if (null === static::$instance) {
- static::$instance = new static();
- }
- return static::$instance;
- }
- public function __construct()
- {
- $this->setup_hook();
- }
- public function setup_hook()
- {
- add_action('wp_footer', array($this, 'build_schema'));
- }
- public function get_schema()
- {
- $this->schema['website_author'] = '';
- return apply_filters('jnews_main_schema', $this->schema);
- }
- public function build_schema()
- {
- echo "<script json></script>";
- }
- }
- JNews_Schema::getInstance();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement