options = $options; } /** * Initializes the integration. * * This is the place to register hooks and filters. * * @return void */ public function register_hooks() { if ( $this->options->get( 'opengraph' ) === true ) { \add_action( 'wpseo_head', [ $this, 'call_wpseo_opengraph' ], 30 ); } if ( $this->options->get( 'twitter' ) === true && \apply_filters( 'wpseo_output_twitter_card', true ) !== false ) { \add_action( 'wpseo_head', [ $this, 'call_wpseo_twitter' ], 40 ); } } /** * Calls the old wpseo_opengraph action. * * @return void */ public function call_wpseo_opengraph() { \do_action_deprecated( 'wpseo_opengraph', [], '14.0', 'wpseo_frontend_presenters' ); } /** * Calls the old wpseo_twitter action. * * @return void */ public function call_wpseo_twitter() { \do_action_deprecated( 'wpseo_twitter', [], '14.0', 'wpseo_frontend_presenters' ); } }