content_action = $content_action; } /** * Registers hooks with WordPress. * * @return void */ public function register_hooks() { \add_filter( 'wpseo_indexable_collector_add_indexation_actions', [ $this, 'add_index_action' ] ); } /** * Adds the Content_Action to the indexable collector. * * @param array $indexation_actions The current indexation actions. * @return array */ public function add_index_action( $indexation_actions ) { $indexation_actions[] = $this->content_action; return $indexation_actions; } }