__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Admin settings helper
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Astra
* @link https://wpastra.com/
* @since Astra 1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! class_exists( 'Astra_Admin_Helper' ) ) {
/**
* Admin Helper
*/
final class Astra_Admin_Helper {
/**
* Returns an option from the database for
* the admin settings page.
*
* @param string $key The option key.
* @param bool $network Whether to allow the network admin setting to be overridden on subsites.
* @return string Return the option value
*/
public static function get_admin_settings_option( $key, $network = false ) {
// Get the site-wide option if we're in the network admin.
if ( $network && is_multisite() ) {
$value = get_site_option( $key );
} else {
$value = get_option( $key );
}
return $value;
}
/**
* Updates an option from the admin settings page.
*
* @param string $key The option key.
* @param mixed $value The value to update.
* @param bool $network Whether to allow the network admin setting to be overridden on subsites.
* @return mixed
*/
public static function update_admin_settings_option( $key, $value, $network = false ) {
// Update the site-wide option since we're in the network admin.
if ( $network && is_multisite() ) {
update_site_option( $key, $value );
} else {
update_option( $key, $value );
}
}
/**
* Returns an option from the database for
* the admin settings page.
*
* @param string $key The option key.
* @param bool $network Whether to allow the network admin setting to be overridden on subsites.
* @return mixed
*/
public static function delete_admin_settings_option( $key, $network = false ) {
// Get the site-wide option if we're in the network admin.
if ( $network && is_multisite() ) {
$value = delete_site_option( $key );
} else {
$value = delete_option( $key );
}
return $value;
}
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| builder | Folder | 0750 |
|
|
| deprecated | Folder | 0750 |
|
|
| markup | Folder | 0750 |
|
|
| class-astra-admin-helper.php | File | 2.07 KB | 0640 |
|
| class-astra-admin-settings.php | File | 24.7 KB | 0640 |
|
| class-astra-attr.php | File | 2.64 KB | 0640 |
|
| class-astra-enqueue-scripts.php | File | 25.26 KB | 0640 |
|
| class-astra-icons.php | File | 12.08 KB | 0640 |
|
| class-astra-theme-options.php | File | 34.5 KB | 0640 |
|
| class-astra-walker-page.php | File | 4.6 KB | 0640 |
|
| class-astra-wp-editor-css.php | File | 64.12 KB | 0640 |
|
| class-gutenberg-editor-css.php | File | 78.8 KB | 0640 |
|
| class-theme-strings.php | File | 5.08 KB | 0640 |
|
| common-functions.php | File | 66.53 KB | 0640 |
|
| index.php | File | 111 B | 0640 |
|
| sidebar-manager.php | File | 2.2 KB | 0640 |
|
| theme-hooks.php | File | 8.94 KB | 0640 |
|