Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.217.137
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/custom-fonts/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/custom-fonts/classes/class-bsf-custom-fonts-white-label.php
<?php
/**
 * BSF Custom Fonts White Label
 *
 * @package Bsf_Custom_Fonts
 * @since 1.0.2
 */

if ( ! class_exists( 'Bsf_Custom_Fonts_White_Label' ) ) :

	/**
	 * Bsf_Custom_Fonts_White_Label
	 *
	 * @since 1.0.2
	 */
	class Bsf_Custom_Fonts_White_Label {

		/**
		 * Instance
		 *
		 * @since 1.0.2
		 * @var object Class Object.
		 * @access private
		 */
		private static $instance;

		/**
		 * Member Variable
		 *
		 * @since 1.0.2
		 * @var array branding
		 * @access private
		 */
		private static $branding;

		/**
		 * Initiator
		 *
		 * @since 1.0.2
		 * @return object initialized object of class.
		 */
		public static function set_instance() {
			if ( ! isset( self::$instance ) ) {
				self::$instance = new self;
			}
			return self::$instance;
		}

		/**
		 * Constructor
		 *
		 * @since 1.0.2
		 */
		public function __construct() {

			add_filter( 'all_plugins', array( $this, 'plugins_page' ) );
			add_filter( 'astra_addon_branding_options', __CLASS__ . '::settings' );
			add_action( 'astra_pro_white_label_add_form', __CLASS__ . '::add_white_lavel_form' );

			add_filter( 'bsf_custom_fonts_menu_title', array( $this, 'white_label_custom_fonts_title' ) );
			if ( is_admin() ) {
				// Display the link with the plugin meta.
				add_filter( 'plugin_row_meta', array( $this, 'plugin_links' ), 10, 4 );
			}
		}

		/**
		 * White labels the plugins page.
		 *
		 * @param array $plugins Plugins Array.
		 * @return array
		 */
		function plugins_page( $plugins ) {

			if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
				return $plugins;
			}

			if ( ! isset( $plugins[ BSF_CUSTOM_FONTS_BASE ] ) ) {
				return $plugins;
			}

			// Set White Labels.
			$name        = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'bsf-custom-fonts', 'name' );
			$description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'bsf-custom-fonts', 'description' );
			$author      = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author' );
			$author_uri  = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author_url' );

			if ( ! empty( $name ) ) {
				$plugins[ BSF_CUSTOM_FONTS_BASE ]['Name'] = $name;

				// Remove Plugin URI if Agency White Label name is set.
				$plugins[ BSF_CUSTOM_FONTS_BASE ]['PluginURI'] = '';
			}

			if ( ! empty( $description ) ) {
				$plugins[ BSF_CUSTOM_FONTS_BASE ]['Description'] = $description;
			}

			if ( ! empty( $author ) ) {
				$plugins[ BSF_CUSTOM_FONTS_BASE ]['Author'] = $author;
			}

			if ( ! empty( $author_uri ) ) {
				$plugins[ BSF_CUSTOM_FONTS_BASE ]['AuthorURI'] = $author_uri;
			}

			return $plugins;
		}

		/**
		 * White labels the Custom fonts menu title
		 *
		 * @since 1.0.2
		 * @param string $title  custom fonts menu title.
		 * @return string $title updated custom fonts menu title.
		 */
		function white_label_custom_fonts_title( $title ) {

			if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
				$name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'bsf-custom-fonts', 'name' );
				if ( ! empty( $name ) ) {
					$title = $name;
				}
			}
			return $title;
		}

		/**
		 * Remove a "view details" link from the plugin list table
		 *
		 * @since 1.0.2
		 *
		 * @param array  $plugin_meta  List of links.
		 * @param string $plugin_file Relative path to the main plugin file from the plugins directory.
		 * @param array  $plugin_data  Data from the plugin headers.
		 * @return array
		 */
		public function plugin_links( $plugin_meta, $plugin_file, $plugin_data ) {

			if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
				if ( BSF_CUSTOM_FONTS_BASE == $plugin_file ) {
					// Set White Labels.
					$name        = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'bsf-custom-fonts', 'name' );
					$description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'bsf-custom-fonts', 'description' );

					if ( ! empty( $name ) ) {
						// Remove Plugin URI if Agency White Label name is set.
						unset( $plugin_meta[2] );
					}
				}
			}
			return $plugin_meta;
		}

		/**
		 * Add White Label setting's
		 *
		 * @since 1.0.2
		 *
		 * @param  array $settings White label setting.
		 * @return array
		 */
		public static function settings( $settings = array() ) {

			$settings['bsf-custom-fonts'] = array(
				'name'        => '',
				'description' => '',
			);

			return $settings;
		}

		/**
		 * Add White Label form
		 *
		 * @since 1.0.2
		 *
		 * @param  array $settings White label setting.
		 * @return void
		 */
		public static function add_white_lavel_form( $settings = array() ) {
			require_once BSF_CUSTOM_FONTS_DIR . 'includes/white-label.php';
		}

	}

	/**
	 * Kicking this off by calling 'set_instance()' method
	 */
	Bsf_Custom_Fonts_White_Label::set_instance();

endif;

Youez - 2016 - github.com/yon3zu
LinuXploit