Jetpack_RelatedPosts::__construct PHP Method

__construct() public method

Constructor for Jetpack_RelatedPosts.
public __construct ( integer $blog_id_local, integer $blog_id_wpcom ) : null
$blog_id_local integer
$blog_id_wpcom integer
return null
    public function __construct($blog_id_local, $blog_id_wpcom)
    {
        $this->_blog_id_local = $blog_id_local;
        $this->_blog_id_wpcom = $blog_id_wpcom;
        $this->_blog_charset = get_option('blog_charset');
        $this->_convert_charset = function_exists('iconv') && !preg_match('/^utf\\-?8$/i', $this->_blog_charset);
        add_action('admin_init', array($this, 'action_admin_init'));
        add_action('wp', array($this, 'action_frontend_init'));
        if (!class_exists('Jetpack_Media_Summary')) {
            jetpack_require_lib('class.media-summary');
        }
        // Add Related Posts to the REST API Post response.
        if (function_exists('register_rest_field')) {
            add_action('rest_api_init', array($this, 'rest_register_related_posts'));
        }
    }