/home/desid573/verdenaturopathy.com.au/wp-content/plugins/meta-box/inc/update
NameSizeModeActions
checker.php53160644editdlrm
notification.php68740644editdlrm
option.php18100644editdlrm
settings.php65090644editdlrm
Edit: /home/desid573/verdenaturopathy.com.au/wp-content/plugins/meta-box/inc/update/settings.php (6509B)
checker = $checker; $this->option = $option; } /** * Add hooks to create the settings page. */ public function init() { // Whether to enable Meta Box menu. Priority 1 makes sure it runs before adding Meta Box menu. $admin_menu_hook = $this->option->is_network_activated() ? 'network_admin_menu' : 'admin_menu'; add_action( $admin_menu_hook, array( $this, 'enable_menu' ), 1 ); } /** * Enable Meta Box menu when a premium extension is installed. */ public function enable_menu() { if ( ! $this->checker->has_extensions() ) { return; } // Enable Meta Box menu only in single site. if ( ! $this->option->is_network_activated() ) { add_filter( 'rwmb_admin_menu', '__return_true' ); } // Add submenu. Priority 90 makes it the last sub-menu item. $admin_menu_hook = $this->option->is_network_activated() ? 'network_admin_menu' : 'admin_menu'; add_action( $admin_menu_hook, array( $this, 'add_settings_page' ), 90 ); } /** * Add settings page. */ public function add_settings_page() { $parent = $this->option->is_network_activated() ? 'settings.php' : 'meta-box'; $capability = $this->option->is_network_activated() ? 'manage_network_options' : 'manage_options'; $title = $this->option->is_network_activated() ? esc_html__( 'Meta Box License', 'meta-box' ) : esc_html__( 'License', 'meta-box' ); $page_hook = add_submenu_page( $parent, $title, $title, $capability, 'meta-box-updater', array( $this, 'render' ) ); add_action( "load-{$page_hook}", array( $this, 'save' ) ); } /** * Render the content of settings page. */ public function render() { ?>

My Account page on metabox.io website. If you have not purchased any extension yet, please get a new license here.', 'meta-box' ) ), 'https://metabox.io/my-account/', 'https://metabox.io/pricing/' ); ?>

__( 'Your license key is invalid. Please update your license key or get a new one here.', 'meta-box' ), // Translators: %1$s - URL to the pricing page. 'error' => __( 'Your license key is invalid. Please update your license key or get a new one here.', 'meta-box' ), // Translators: %2$s - URL to the My Account page. 'expired' => __( 'Your license key is expired. Please renew your license.', 'meta-box' ), 'active' => __( 'Your license key is active.', 'meta-box' ), ); $status = $this->option->get_license_status(); $api_key = in_array( $status, array( 'expired', 'active' ), true ) ? '********************************' : $this->option->get( 'api_key' ); ?>

post( 'submit' ) ) { return; } check_admin_referer( 'meta-box' ); $option = $request->post( 'meta_box_updater', array() ); $option = (array) $option; $option['status'] = 'active'; $args = $option; $args['action'] = 'check_license'; $response = $this->checker->request( $args ); $status = isset( $response['status'] ) ? $response['status'] : 'invalid'; if ( false === $response ) { add_settings_error( '', 'mb-error', __( 'Something wrong with the connection to metabox.io. Please try again later.', 'meta-box' ) ); } elseif ( 'active' === $status ) { add_settings_error( '', 'mb-success', __( 'Your license is activated.', 'meta-box' ), 'updated' ); } elseif ( 'expired' === $status ) { // Translators: %s - URL to the My Account page. $message = __( 'License expired. Please renew on the My Account page on metabox.io website.', 'meta-box' ); $message = wp_kses_post( sprintf( $message, 'https://metabox.io/my-account/' ) ); add_settings_error( '', 'mb-expired', $message ); } else { // Translators: %1$s - URL to the My Account page, %2$s - URL to the pricing page. $message = __( 'Invalid license. Please check again or get a new license here.', 'meta-box' ); $message = wp_kses_post( sprintf( $message, 'https://metabox.io/my-account/', 'https://metabox.io/pricing/' ) ); add_settings_error( '', 'mb-invalid', $message ); } $option['status'] = $status; $admin_notices_hook = $this->option->is_network_activated() ? 'network_admin_notices' : 'admin_notices'; add_action( $admin_notices_hook, 'settings_errors' ); $this->option->update( $option ); } }