Automattic\WooCommerce\Internal\Admin\ProductReviews
Reviews::__construct
Constructor.
Метод класса: Reviews{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Reviews = new Reviews(); $Reviews->__construct();
Код Reviews::__construct() Reviews:: construct WC 11.3.0
public function __construct() {
add_action( 'admin_menu', array( $this, 'add_reviews_page' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'load_javascript' ) );
// These ajax callbacks need a low priority to ensure they run before their WordPress core counterparts.
add_action( 'wp_ajax_edit-comment', array( $this, 'handle_edit_review' ), -1 );
add_action( 'wp_ajax_replyto-comment', array( $this, 'handle_reply_to_review' ), -1 );
add_filter( 'parent_file', array( $this, 'edit_review_parent_file' ) );
add_action( 'admin_notices', array( $this, 'display_notices' ) );
add_filter( 'set_screen_option_' . self::PER_PAGE_USER_OPTION_KEY, array( $this, 'set_reviews_per_page_option' ), 10, 3 );
// WordPress also uses the option key as a filter name. Bridge legacy callbacks first so the dedicated filter can override them.
add_filter( self::PER_PAGE_USER_OPTION_KEY, array( $this, 'apply_legacy_reviews_per_page_filter' ), 0 );
}