403Webshell
Server IP : 69.39.225.240  /  Your IP : 216.73.216.138
Web Server : Apache
System : Linux bronze7.serverhost.net 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : reademotions ( 1074)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/reademotions/www/wp-content/plugins/astra-addon/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/reademotions/www/wp-content/plugins/astra-addon/classes/class-astra-admin-helper.php
<?php
/**
 * Admin settings helper
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package     Astra Addon
 * @author      Brainstorm Force
 * @copyright   Copyright (c) 2020, Astra
 * @link        https://wpastra.com/
 * @since       Astra 1.0
 */

if ( ! class_exists( 'Astra_Admin_Helper' ) ) :

	/**
	 * Admin Helper
	 */
	// @codingStandardsIgnoreStart
	final class Astra_Admin_Helper { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound
		// @codingStandardsIgnoreEnd

		/**
		 * Returns an option from the database for
		 * the admin settings page.
		 *
		 * @since 1.0.0
		 * @since 1.5.1 Added $default parameter which can be passed to get_option|get_site_option functions.
		 *
		 * @param  string  $key     The option key.
		 * @param  boolean $network Whether to allow the network admin setting to be overridden on subsites.
		 * @param mixed   $default Default value to be passed to get_option|get_site_option functions.
		 * @return string           Return the option value
		 */
		public static function get_admin_settings_option( $key, $network = false, $default = false ) {

			// Get the site-wide option if we're in the network admin.
			if ( $network && is_multisite() ) {
				$value = get_site_option( $key, $default );
			} else {
				$value = get_option( $key, $default );
			}

			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;
		}
	}


endif;

Youez - 2016 - github.com/yon3zu
LinuXploit