PHP Class WPDKThemeSetup

Author: =undo= ([email protected])
Show file Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$autoload_text_domain Create a 'localization' folder in you root theme
$body_classes array | string Setup the body classes
$cleanup_wp_head boolean remove_action( 'wp_head', 'feed_links_extra', 3 ); // Category Feeds remove_action( 'wp_head', 'feed_links', 2 ); // Post and Comment Feeds remove_action( 'wp_head', 'rsd_link' ); // EditURI link remove_action( 'wp_head', 'wlwmanifest_link' ); // Windows Live Writer remove_action( 'wp_head', 'index_rel_link' ); // index link remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // previous link remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); // Links for Adjacent Posts remove_action( 'wp_head', 'wp_generator' ); // WP vers
$disable_admin_for_roles boolean OFF $this->disable_admin_for_roles = false; $this->disable_admin_for_roles = array(); Enable admin backend for editor only $this->disable_admin_for_roles = 'editor'; $this->disable_admin_for_roles = array( 'administrator', 'editor' );
$disable_admin_if_user_has_not_caps boolean OFF $this->disable_admin_if_user_has_not_caps = false; $this->disable_admin_if_user_has_not_caps = array(); Enable admin backend for admin only $this->disable_admin_if_user_has_not_caps = 'manage_options'; $this->disable_admin_if_user_has_not_caps = array( 'manage_options' ); Enable admin backend for admin and editor only $this->disable_admin_if_user_has_not_caps = array( 'manage_options', 'editor' );
$editor_styles array | string Setup the style for the editor
$hide_admin_bar boolean Hide the admin bar in front-end
$image_sizes array $this->image_sizes = array( 'your_custom_size_id' => array( 100, 100, true ), 'your_custom_size_id' => array( 100, 100 ), 'your_custom_size_id' => array( 100, 100, false, 'Your Description' ), );
$nav_menus array $this->nav_menus = array( 'xtreme_main_menu' => 'Main Menu', 'xtreme_footer_menu' => 'Footer Menu wpXtreme' );
$normalize_css boolean If TRUE normalize.css will be load ( http://necolas.github.io/normalize.css/ )
$post_thumbnail_size array $this->post_thumbnail_size = array( 256, 256 ); $this->post_thumbnail_size = array( 256, 256, true );
$sidebars array $this->sidebars = array( array( 'id' => 'sidebar_single_post', 'name' => 'Single Post', 'description' => 'Sidebar for post blog', 'class' => '', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ' ), ... ); All array key/values are optionals, you cau use also $this->sidebars = array( array( 'name' => 'Single Post', ), array( 'name' => 'Single Page', 'description' => 'Sidebar for page', ), array( 'name' => 'Another sidebar', 'id' => 'with_id', ), ... );
    $theme_css boolean Include standard WPDK Theme (reset) styles
    $theme_js boolean Include standard WPDK Theme Javascript
    $theme_support array | string $this->theme_support = 'post-thumbnails'; $this->theme_support = array( 'post-thumbnails', 'menus' ); $this->theme_support = array( 'post-thumbnails' => array( 'aside', 'gallery', ... ), 'menus' );

    Public Methods

    Method Description
    __construct ( ) : WPDKThemeSetup Create an instance of WPDKThemeSetup class

    Method Details

    __construct() public method

    Create an instance of WPDKThemeSetup class
    public __construct ( ) : WPDKThemeSetup
    return WPDKThemeSetup

    Property Details

    $autoload_text_domain public property

    Create a 'localization' folder in you root theme
    public $autoload_text_domain

    $body_classes public property

    Setup the body classes
    public array|string $body_classes
    return array | string

    $cleanup_wp_head public property

    remove_action( 'wp_head', 'feed_links_extra', 3 ); // Category Feeds remove_action( 'wp_head', 'feed_links', 2 ); // Post and Comment Feeds remove_action( 'wp_head', 'rsd_link' ); // EditURI link remove_action( 'wp_head', 'wlwmanifest_link' ); // Windows Live Writer remove_action( 'wp_head', 'index_rel_link' ); // index link remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // previous link remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); // Links for Adjacent Posts remove_action( 'wp_head', 'wp_generator' ); // WP vers
    public bool $cleanup_wp_head
    return boolean

    $disable_admin_for_roles public property

    OFF $this->disable_admin_for_roles = false; $this->disable_admin_for_roles = array(); Enable admin backend for editor only $this->disable_admin_for_roles = 'editor'; $this->disable_admin_for_roles = array( 'administrator', 'editor' );
    public bool $disable_admin_for_roles
    return boolean

    $disable_admin_if_user_has_not_caps public property

    OFF $this->disable_admin_if_user_has_not_caps = false; $this->disable_admin_if_user_has_not_caps = array(); Enable admin backend for admin only $this->disable_admin_if_user_has_not_caps = 'manage_options'; $this->disable_admin_if_user_has_not_caps = array( 'manage_options' ); Enable admin backend for admin and editor only $this->disable_admin_if_user_has_not_caps = array( 'manage_options', 'editor' );
    public bool $disable_admin_if_user_has_not_caps
    return boolean

    $editor_styles public property

    Setup the style for the editor
    public array|string $editor_styles
    return array | string

    $hide_admin_bar public property

    Hide the admin bar in front-end
    public bool $hide_admin_bar
    return boolean

    $image_sizes public property

    $this->image_sizes = array( 'your_custom_size_id' => array( 100, 100, true ), 'your_custom_size_id' => array( 100, 100 ), 'your_custom_size_id' => array( 100, 100, false, 'Your Description' ), );
    public array $image_sizes
    return array

    $nav_menus public property

    $this->nav_menus = array( 'xtreme_main_menu' => 'Main Menu', 'xtreme_footer_menu' => 'Footer Menu wpXtreme' );
    public array $nav_menus
    return array

    $normalize_css public property

    If TRUE normalize.css will be load ( http://necolas.github.io/normalize.css/ )
    public bool $normalize_css
    return boolean

    $post_thumbnail_size public property

    $this->post_thumbnail_size = array( 256, 256 ); $this->post_thumbnail_size = array( 256, 256, true );
    public array $post_thumbnail_size
    return array

    $sidebars public property

    $this->sidebars = array( array( 'id' => 'sidebar_single_post', 'name' => 'Single Post', 'description' => 'Sidebar for post blog', 'class' => '', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ' ), ... ); All array key/values are optionals, you cau use also $this->sidebars = array( array( 'name' => 'Single Post', ), array( 'name' => 'Single Page', 'description' => 'Sidebar for page', ), array( 'name' => 'Another sidebar', 'id' => 'with_id', ), ... );
    public array $sidebars
    return array

    $theme_css public property

    Include standard WPDK Theme (reset) styles
    Deprecation: since 1.4.21 - use normalize
    public bool $theme_css
    return boolean

    $theme_js public property

    Include standard WPDK Theme Javascript
    public bool $theme_js
    return boolean

    $theme_support public property

    $this->theme_support = 'post-thumbnails'; $this->theme_support = array( 'post-thumbnails', 'menus' ); $this->theme_support = array( 'post-thumbnails' => array( 'aside', 'gallery', ... ), 'menus' );
    public array|string $theme_support
    return array | string