*/ namespace RankMath\Admin; use RankMath\Traits\Ajax; use RankMath\Traits\Hooker; use MyThemeShop\Helpers\Arr; defined( 'ABSPATH' ) || exit; /** * Ask_Review class. */ class Ask_Review { use Hooker, Ajax; /** * Register hooks. */ public function hooks() { $this->ajax( 'already_reviewed', 'already_reviewed' ); $this->filter( 'rank_math/metabox/tabs', 'add_metabox_tab' ); } /** * Add rich snippet tab to the metabox. * * @param array $tabs Array of tabs. * * @return array */ public function add_metabox_tab( $tabs ) { Arr::insert( $tabs, [ 'askreview' => [ 'icon' => 'dashicons dashicons-heart', 'title' => '', 'desc' => '', 'file' => rank_math()->includes_dir() . 'metaboxes/ask-review.php', 'capability' => 'onpage_general', ], ], 11 ); return $tabs; } /** * Set "already reviewed" flag. */ public function already_reviewed() { update_option( 'rank_math_already_reviewed', current_time( 'timestamp' ) ); $this->success( 'success' ); } /** * Display tab content. */ public static function display() { ob_start(); ?>

that\'s awesome!
Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?', 'rank-math' ); ?>