| 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/wordpress-seo/admin/ |
Upload File : |
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Options\Tabs
*/
/**
* Class WPSEO_Help_Center_Item.
*/
class WPSEO_Help_Center_Item {
/**
* Identifier for this tab.
*
* @var string
*/
private $identifier;
/**
* Label to display.
*
* @var string
*/
private $label;
/**
* The dashicon classname to display in front of the label.
*
* @var string
*/
private $dashicon;
/**
* Optional arguments.
*
* @var array
*/
private $args = array();
/**
* WPSEO_Help_Center_Item constructor.
*
* @param string $identifier Unique identifier for this tab.
* @param string $label Label to display.
* @param array $args Optional. Settings for this tab.
* @param string $dashicon Optional. The classname of the dahsicon to put in front of the label.
*/
public function __construct( $identifier, $label, $args = array(), $dashicon = '' ) {
$this->identifier = $identifier;
$this->label = $label;
$this->dashicon = $dashicon;
$this->args = $args;
}
/**
* Get the label.
*
* @return string
*/
public function get_label() {
return $this->label;
}
/**
* Get the identifier.
*
* @return string
*/
public function get_identifier() {
return $this->identifier;
}
/**
* Get the dashicon.
*
* @return string
*/
public function get_dashicon() {
return $this->dashicon;
}
/**
* Get the content of this tab.
*
* @return mixed|string
*/
public function get_content() {
if ( ! empty( $this->args['content'] ) ) {
return $this->args['content'];
}
if ( ! empty( $this->args['callback'] ) ) {
return call_user_func_array( $this->args['callback'], array( $this ) );
}
if ( ! empty( $this->args['view'] ) ) {
$view = $this->args['view'];
if ( substr( $view, - 4 ) === '.php' ) {
$view = substr( $view, 0, - 4 );
}
if ( ! empty( $this->args['view_arguments'] ) ) {
extract( $this->args['view_arguments'] );
}
include WPSEO_PATH . 'admin/views/' . $view . '.php';
}
return '';
}
}