HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ubuntu-8gb-hel1-1 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.32
Disabled: NONE
Upload Files
File: /var/www/agighana.org_backup/Admin_Bar_Enabled.php
<?php
/**
 * Class Google\Site_Kit\Core\Admin_Bar\Admin_Bar_Enabled
 *
 * @package   Google\Site_Kit
 * @copyright 2021 Google LLC
 * @license   https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
 * @link      https://sitekit.withgoogle.com
 */

namespace Google\Site_Kit\Core\Admin_Bar;

use Google\Site_Kit\Core\Storage\Setting;

/**
 * Class handling the admin bar menu settings.
 *
 * @since 1.39.0
 * @access private
 * @ignore
 */
class Admin_Bar_Enabled extends Setting {

	/**
	 * The option_name for this setting.
	 */
	const OPTION = 'googlesitekit_admin_bar_menu_enabled';

	/**
	 * Gets the value of the setting.
	 *
	 * @since 1.39.0
	 *
	 * @return bool Value set for the option, or registered default if not set.
	 */
	public function get() {
		return (bool) parent::get();
	}

	/**
	 * Gets the expected value type.
	 *
	 * @since 1.39.0
	 *
	 * @return string The type name.
	 */
	protected function get_type() {
		return 'boolean';
	}

	/**
	 * Gets the default value.
	 *
	 * @since 1.39.0
	 *
	 * @return boolean The default value.
	 */
	protected function get_default() {
		return true;
	}

	/**
	 * Gets the callback for sanitizing the setting's value before saving.
	 *
	 * @since 1.39.0
	 *
	 * @return callable The callable sanitize callback.
	 */
	protected function get_sanitize_callback() {
		return 'boolval';
	}
}