includes/admin/Admin.php
Function add_sections
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function add_sections() {
if ( $this->sections ) {
foreach ( $this->sections as $section ) {
$this->create_settings_section( $section );
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Opening brace of a class must be on the line after the definition Open
Open
class Admin {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$form" and closing bracket; 1 found Open
Open
public function __construct( Admin\Form $form ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::menu_page_init" is not in camel caps format Open
Open
public function menu_page_init() {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::register_menu_page" is not in camel caps format Open
Open
public function register_menu_page() {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::register_settings" is not in camel caps format Open
Open
public function register_settings() {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and type hint "Admin"; 1 found Open
Open
public function __construct( Admin\Form $form ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::add_sections" is not in camel caps format Open
Open
public function add_sections() {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::basic_section_callback" is not in camel caps format Open
Open
public function basic_section_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$settings"; 1 found Open
Open
protected function create_settings_field( $settings ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::new_error" is not in camel caps format Open
Open
public function new_error( $message, $type ) {
- Create a ticketCreate a ticket
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $this->sections as $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $this->sections as $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $this->fields as $setting ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$args"; 1 found Open
Open
public function basic_input_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( isset( $args['description'] ) ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::add_errors" is not in camel caps format Open
Open
public function add_errors() {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$message"; 1 found Open
Open
public function new_error( $message, $type ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$input"; 1 found Open
Open
public function options_validate( $input ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::basic_input_callback" is not in camel caps format Open
Open
public function basic_input_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$args" and closing bracket; 1 found Open
Open
public function basic_input_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$section" and closing bracket; 1 found Open
Open
protected function create_settings_section( $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $this->sections ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::create_settings_field" is not in camel caps format Open
Open
protected function create_settings_field( $settings ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $this->fields ) {
- Create a ticketCreate a ticket
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $this->fields as $setting ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$settings" and closing bracket; 1 found Open
Open
protected function create_settings_field( $settings ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::options_validate" is not in camel caps format Open
Open
public function options_validate( $input ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$args"; 1 found Open
Open
public function basic_section_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$type" and closing bracket; 1 found Open
Open
public function new_error( $message, $type ) {
- Create a ticketCreate a ticket
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $this->sections as $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$args" and closing bracket; 1 found Open
Open
public function basic_section_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "Admin::create_settings_section" is not in camel caps format Open
Open
protected function create_settings_section( $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $this->fields as $setting ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$input" and closing bracket; 1 found Open
Open
public function options_validate( $input ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$section"; 1 found Open
Open
protected function create_settings_section( $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $user_cap;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.2.0
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* User capability necessary to access page
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.2.0
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Title of the menu page
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $menu_title;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.2.0
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* String identifier for the options
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.2.0
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.2.0
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Slug for the page
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $plugin_slug;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $options_str;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* String identifier for the options group
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var Admin\Form
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $fields = array();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private $hook_suffix = '';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Form Input Values
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* PHP5 Constructor
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->form->title = $this->page_title;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->form->render_form();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Individual fields to be added
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->form = $form;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_action( 'admin_notices', array( $this, 'add_errors' ) );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $values;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $sections = array();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->form->options_str = $this->options_str;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->values = get_option( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'edit.php?post_type=' . $this->post_type,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->page_title, // Page Title
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( $this, 'form' ) // Function
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->form->settings_fields = $this->options_grp;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $page_title;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $post_type;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function register_menu_page() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->fields = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->register_settings();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function form() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->form->values = $this->values;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $form;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Created by page registration
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Tells the settings page which menu item to queue on
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Errors
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function __construct( Admin\Form $form ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->form->settings_sections = $this->plugin_slug;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Register the Menu Page.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Displays Form. WordPress requires a function be used to display the input form.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function register_settings() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $options_grp;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->hook_suffix = add_submenu_page(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Settings Page Title
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Stores the Form creation object. Form creation functions run through here.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->menu_title, // Menu Title
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->add_sections();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param Admin\Form $form Handles form functions.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->plugin_slug, // Menu Slug
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Register settings
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Register the plugin settings in WordPress.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sections of content
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.2.0
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->user_cap, // Capability
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Creates the settings var to be referred to
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function menu_page_init() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string $hook_suffix
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->sections = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->options_str,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array $new_input
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Why is it so nested?
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$values = get_option( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param array $settings
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Callback = Callback function
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( $this, 'options_validate' )
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Description = Description below field
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Basic section callback. Creates the settings header.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
</div>
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Title = Name of field,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
id="<?php _e( $id, 'dfp-ads' ); ?>"
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
?>
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected function create_settings_section( $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$section['id'], // 'basic_settings', // ID
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* ID = input ID,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @TODO Set up validation
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
name="<?php _e( $id, 'dfp-ads' ); ?>"
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access protected
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$section['title'], // 'Tags', // Title
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->plugin_slug // Page
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Field = Type of field,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( $this->form, $settings['callback'] ), // Callback
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'settings_updated',
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->create_settings_field( $setting );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @TODO Add Labels
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Field values
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
?>
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Add Error or Update Message to admin page.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function add_sections() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Will warn users of an issue or add a message saying it was successful.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sanitize and validate input. Accepts an array, return a sanitized array.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param array $input
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function options_validate( $input ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $input;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$args = $args[0];
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$id = $this->options_str . '[' . $args['id'] . ']';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$title = $args['title'];
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$value = $values[ $args['id'] ];
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
value="<?php _e( $value, 'dfp-ads' ); ?>"/>
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$settings['id'], // ID
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
settings_errors( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $this->sections as $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->plugin_slug, // Page
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
echo '<p><em>' . $args['description'] . '</em></p>';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Creates settings fields
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_settings_field(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$settings['section'], // Section
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Queue up the errors
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_settings_error(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function basic_section_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Create form for plugin settings.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected function create_settings_field( $settings ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $this->fields as $setting ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( $settings ) // Args
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function add_errors() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param string $message Message to send to user
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param string $type Type of Message: Error / Updated
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function basic_input_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
<?php
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( isset( $args['description'] ) ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
register_setting(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Creates the settings sections
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $this->fields ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Title = Name of field,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( $this, 'basic_section_callback' ), // Callback
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$message,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$type
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->create_settings_section( $section );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param $args array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Creates input
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
<div>
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
<?php
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_settings_section(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// register our settings
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->options_grp,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$settings['title'], // Title
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $this->sections ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param $args array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
<input type="<?php echo $args->field; ?>"
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param array $section ID = input ID,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access protected
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function new_error( $message, $type ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->options_str,
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$this->values = get_option( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function register_menu_page() {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$this->sections = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$this->sections = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$this->fields = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function form() {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'admin_notices', array( $this, 'add_errors' ) );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$this->fields = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function menu_page_init() {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$this->fields = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$this->sections = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$this->sections = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function register_settings() {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'admin_notices', array( $this, 'add_errors' ) );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function __construct( Admin\Form $form ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$this->fields = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$this->values = get_option( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
name="<?php _e( $id, 'dfp-ads' ); ?>"
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$this->create_settings_field( $setting );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function add_sections() {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$values = get_option( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $this->fields as $setting ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
id="<?php _e( $id, 'dfp-ads' ); ?>"
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
settings_errors( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $this->sections ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$this->create_settings_section( $section );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( isset( $args['description'] ) ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
protected function create_settings_field( $settings ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
value="<?php _e( $value, 'dfp-ads' ); ?>"/>
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
value="<?php _e( $value, 'dfp-ads' ); ?>"/>
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
protected function create_settings_section( $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function options_validate( $input ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
name="<?php _e( $id, 'dfp-ads' ); ?>"
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function basic_section_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( isset( $args['description'] ) ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
settings_errors( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$this->create_settings_field( $setting );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$values = get_option( $this->options_str );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$this->create_settings_section( $section );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
id="<?php _e( $id, 'dfp-ads' ); ?>"
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $this->fields ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $this->sections as $section ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function add_errors() {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( isset( $args['description'] ) ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function basic_input_callback( $args ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function new_error( $message, $type ) {
- Create a ticketCreate a ticket
- Exclude checks