Fixed translation loaded too early issues, ClassicPress compatibility, as well as non-existent sanitize callbacks issue.
This commit is contained in:
parent
856198591a
commit
dc62038c6d
@ -3,6 +3,14 @@ if ( !defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
function minimalistflex_load_textdomain() {
|
||||
load_theme_textdomain( 'minimalistflex', get_template_directory() . '/languages' );
|
||||
}
|
||||
|
||||
add_action( 'init', 'minimalistflex_load_textdomain' );
|
||||
|
||||
require_once 'includes/customizer.php';
|
||||
|
||||
function minimalistflex_add_supports() {
|
||||
add_theme_support( 'custom-background', Array(
|
||||
'default-position-x' => 'center',
|
||||
@ -15,7 +23,9 @@ function minimalistflex_add_supports() {
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
add_theme_support( "align-wide" );
|
||||
add_theme_support( "post-thumbnails" );
|
||||
add_theme_support( 'html5', Array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'style', 'script', 'navigation-widgets' ) );
|
||||
if ( !(function_exists( 'classicpress_version' ) && version_compare( classicpress_version(), '2.0.0', '>=' )) ) {
|
||||
add_theme_support( 'html5', Array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'style', 'script', 'navigation-widgets' ) );
|
||||
}
|
||||
add_theme_support( 'custom-logo', Array(
|
||||
'width' => '80',
|
||||
'height' => '80'
|
||||
@ -129,16 +139,13 @@ function minimalistflex_register_menus() {
|
||||
add_action( 'init', 'minimalistflex_register_menus' );
|
||||
|
||||
function minimalistflex_dynamic_css() {
|
||||
require_once 'includes/color-definitions.php';
|
||||
require_once 'includes/colors.php';
|
||||
require_once 'includes/languages.php';
|
||||
}
|
||||
|
||||
add_action( 'wp_footer', 'minimalistflex_dynamic_css' );
|
||||
|
||||
load_theme_textdomain( 'minimalistflex', get_template_directory() . '/languages' );
|
||||
|
||||
require_once 'includes/customizer.php';
|
||||
|
||||
function minimalistflex_custom_excerpt_length() {
|
||||
return intval( get_theme_mod( 'minimalistflex_interface_excerpt', '55' ) );
|
||||
}
|
||||
|
||||
@ -25,43 +25,43 @@ $colors = Array(
|
||||
);
|
||||
|
||||
$labels = Array(
|
||||
'level1' => __( 'Content Background', 'minimalistflex' ),
|
||||
'level2' => __( 'Sidebar Background', 'minimalistflex' ),
|
||||
'level3-dark' => __( 'Secondary Text', 'minimalistflex' ),
|
||||
'default' => __( 'Default', 'minimalistflex' ),
|
||||
'link' => __( 'Link', 'minimalistflex' ),
|
||||
'link-hover' => __( 'Link Hover', 'minimalistflex' ),
|
||||
'tint' => __( 'Tint A', 'minimalistflex' ),
|
||||
'tint-dark' => __( 'Tint A Dark', 'minimalistflex' ),
|
||||
'tint-alt' => __( 'Tint B', 'minimalistflex' ),
|
||||
'tint-contrast' => __( 'Tint C', 'minimalistflex' ),
|
||||
'contrast' => __( 'Contrast (Light)', 'minimalistflex' ),
|
||||
'contrast-dark' => __( 'Contrast (Dark)', 'minimalistflex' ),
|
||||
'footer-text' => __( 'Footer Text', 'minimalistflex' ),
|
||||
'footer-bg' => __( 'Footer Background', 'minimalistflex' ),
|
||||
'header-bg' => __( 'Header Background', 'minimalistflex' ),
|
||||
'header-menu' => __( 'Navigation Menu Background', 'minimalistflex' ),
|
||||
'header-sidebar' => __( 'Navigation Menu Submenu Background', 'minimalistflex' ),
|
||||
'header-text' => __( 'Navigation Menu', 'minimalistflex' )
|
||||
'level1' => esc_html__( 'Content Background', 'minimalistflex' ),
|
||||
'level2' => esc_html__( 'Sidebar Background', 'minimalistflex' ),
|
||||
'level3-dark' => esc_html__( 'Secondary Text', 'minimalistflex' ),
|
||||
'default' => esc_html__( 'Default', 'minimalistflex' ),
|
||||
'link' => esc_html__( 'Link', 'minimalistflex' ),
|
||||
'link-hover' => esc_html__( 'Link Hover', 'minimalistflex' ),
|
||||
'tint' => esc_html__( 'Tint A', 'minimalistflex' ),
|
||||
'tint-dark' => esc_html__( 'Tint A Dark', 'minimalistflex' ),
|
||||
'tint-alt' => esc_html__( 'Tint B', 'minimalistflex' ),
|
||||
'tint-contrast' => esc_html__( 'Tint C', 'minimalistflex' ),
|
||||
'contrast' => esc_html__( 'Contrast (Light)', 'minimalistflex' ),
|
||||
'contrast-dark' => esc_html__( 'Contrast (Dark)', 'minimalistflex' ),
|
||||
'footer-text' => esc_html__( 'Footer Text', 'minimalistflex' ),
|
||||
'footer-bg' => esc_html__( 'Footer Background', 'minimalistflex' ),
|
||||
'header-bg' => esc_html__( 'Header Background', 'minimalistflex' ),
|
||||
'header-menu' => esc_html__( 'Navigation Menu Background', 'minimalistflex' ),
|
||||
'header-sidebar' => esc_html__( 'Navigation Menu Submenu Background', 'minimalistflex' ),
|
||||
'header-text' => esc_html__( 'Navigation Menu', 'minimalistflex' )
|
||||
);
|
||||
|
||||
$desciprtions = Array(
|
||||
'level1' => __( 'The background color of the main content area.', 'minimalistflex' ),
|
||||
'level2' => __( 'The background color of the sidebar.', 'minimalistflex' ),
|
||||
'level3-dark' => __( 'The secondary text color. Should be lighter than the default color.', 'minimalistflex' ),
|
||||
'default' => __( 'The default text color.', 'minimalistflex' ),
|
||||
'link' => __( 'The link color.', 'minimalistflex' ),
|
||||
'link-hover' => __( 'The link color when hovered.', 'minimalistflex' ),
|
||||
'tint' => __( 'Tint color A. Should be a light color.', 'minimalistflex' ),
|
||||
'tint-dark' => __( 'A darker variant of the tint color A. Only used on the scroll bars.', 'minimalistflex' ),
|
||||
'tint-alt' => __( 'Tint color B. Should be a dark color.', 'minimalistflex' ),
|
||||
'tint-contrast' => __( 'Tint color C. Should be a *even darker* color.', 'minimalistflex' ),
|
||||
'contrast' => __( 'Text color on a light background. Better keep it as is.', 'minimalistflex' ),
|
||||
'contrast-dark' => __( 'Text color on a dark background. Better keep it as is.', 'minimalistflex' ),
|
||||
'footer-text' => __( 'The footer text color.', 'minimalistflex' ),
|
||||
'footer-bg' => __( 'The footer background color.', 'minimalistflex' ),
|
||||
'header-bg' => __( 'The background color of the header.', 'minimalistflex' ),
|
||||
'header-menu' => __( 'The background color of the navigation menu dropdown.', 'minimalistflex' ),
|
||||
'header-sidebar' => __( 'The background color of the submenus of the navigation menu dropdown.', 'minimalistflex' ),
|
||||
'header-text' => __( 'The text color of the navigation menu dropdown.', 'minimalistflex' )
|
||||
'level1' => esc_html__( 'The background color of the main content area.', 'minimalistflex' ),
|
||||
'level2' => esc_html__( 'The background color of the sidebar.', 'minimalistflex' ),
|
||||
'level3-dark' => esc_html__( 'The secondary text color. Should be lighter than the default color.', 'minimalistflex' ),
|
||||
'default' => esc_html__( 'The default text color.', 'minimalistflex' ),
|
||||
'link' => esc_html__( 'The link color.', 'minimalistflex' ),
|
||||
'link-hover' => esc_html__( 'The link color when hovered.', 'minimalistflex' ),
|
||||
'tint' => esc_html__( 'Tint color A. Should be a light color.', 'minimalistflex' ),
|
||||
'tint-dark' => esc_html__( 'A darker variant of the tint color A. Only used on the scroll bars.', 'minimalistflex' ),
|
||||
'tint-alt' => esc_html__( 'Tint color B. Should be a dark color.', 'minimalistflex' ),
|
||||
'tint-contrast' => esc_html__( 'Tint color C. Should be a *even darker* color.', 'minimalistflex' ),
|
||||
'contrast' => esc_html__( 'Text color on a light background. Better keep it as is.', 'minimalistflex' ),
|
||||
'contrast-dark' => esc_html__( 'Text color on a dark background. Better keep it as is.', 'minimalistflex' ),
|
||||
'footer-text' => esc_html__( 'The footer text color.', 'minimalistflex' ),
|
||||
'footer-bg' => esc_html__( 'The footer background color.', 'minimalistflex' ),
|
||||
'header-bg' => esc_html__( 'The background color of the header.', 'minimalistflex' ),
|
||||
'header-menu' => esc_html__( 'The background color of the navigation menu dropdown.', 'minimalistflex' ),
|
||||
'header-sidebar' => esc_html__( 'The background color of the submenus of the navigation menu dropdown.', 'minimalistflex' ),
|
||||
'header-text' => esc_html__( 'The text color of the navigation menu dropdown.', 'minimalistflex' )
|
||||
);
|
||||
@ -5,8 +5,7 @@ if ( !defined( 'WPINC' ) ) {
|
||||
?>
|
||||
|
||||
<?php
|
||||
require_once 'color-definitions.php';
|
||||
global $colors;
|
||||
require 'color-definitions.php';
|
||||
?>
|
||||
|
||||
<style id="minimalistflex-color-css">
|
||||
|
||||
@ -3,21 +3,21 @@ if ( !defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
require_once 'color-definitions.php';
|
||||
require_once 'sanitize-callbacks.php';
|
||||
|
||||
function minimalistflex_customizer_enqueue_scripts() {
|
||||
require_once 'color-definitions.php';
|
||||
wp_enqueue_script( 'minimalistflex_color_palette', get_template_directory_uri() . '/js/color-palette.js', Array( 'jquery' ), null, true );
|
||||
}
|
||||
|
||||
require_once 'sanitize-callbacks.php';
|
||||
|
||||
add_action( 'customize_controls_enqueue_scripts', 'minimalistflex_customizer_enqueue_scripts' );
|
||||
|
||||
function minimalistflex_default_featured_image_register( $wp_customize ) {
|
||||
require_once 'class-multi-image-control.php';
|
||||
|
||||
$wp_customize -> add_section( 'minimalistflex_default_featured_image', Array(
|
||||
'title' => __( 'Default Featured Images', 'minimalistflex' ),
|
||||
'description' => __( 'The theme can provide the following images as a fallback when there\'s no featured image set for a post. You can also select where to display those images.', 'minimalistflex' ),
|
||||
'title' => esc_html__( 'Default Featured Images', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'The theme can provide the following images as a fallback when there\'s no featured image set for a post. You can also select where to display those images.', 'minimalistflex' ),
|
||||
'priority' => 50,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
@ -41,42 +41,43 @@ function minimalistflex_default_featured_image_register( $wp_customize ) {
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
|
||||
) );
|
||||
$wp_customize -> add_control( new MinimalistFlex_Multi_Image_Custom_Control( $wp_customize, 'minimalistflex_default_featured_images', Array(
|
||||
'label' => __( 'Default Images', 'minimalistflex' ),
|
||||
'description' => __( 'Click on "Add Image" to add an image. Click on the image to remove it. There\'s no limit on how many images you can add.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Default Images', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Click on "Add Image" to add an image. Click on the image to remove it. There\'s no limit on how many images you can add.', 'minimalistflex' ),
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_default_featured_image',
|
||||
'suggest_label' => __( 'Suggested Images', 'minimalistflex' ),
|
||||
'suggest_description' => __( 'We have prepared some pre-built, generic purpose images for you to choose from. Click on an image will add it into the selection.', 'minimalistflex' ),
|
||||
'suggest_label' => esc_html__( 'Suggested Images', 'minimalistflex' ),
|
||||
'suggest_description' => esc_html__( 'We have prepared some pre-built, generic purpose images for you to choose from. Click on an image will add it into the selection.', 'minimalistflex' ),
|
||||
'suggest_images' => Array( '/defaults/1.png', '/defaults/2.png', '/defaults/3.png', '/defaults/4.png', '/defaults/5.png', '/defaults/6.png' )
|
||||
) ) );
|
||||
$wp_customize -> add_control( 'minimalistflex_default_featured_images_location', Array(
|
||||
'label' => __( 'Location', 'minimalistflex' ),
|
||||
'description' => __( 'You may decide if and where should the default image show.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Location', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'You may decide if and where should the default image show.', 'minimalistflex' ),
|
||||
'type' => 'radio',
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_default_featured_image',
|
||||
'choices' => Array(
|
||||
'both' => __( 'Always', 'minimalistflex' ),
|
||||
'archive' => __( 'Archive Page Only', 'minimalistflex' ),
|
||||
'single' => __( 'Single Page Only', 'minimalistflex' ),
|
||||
'no' => __( 'Never', 'minimalistflex' )
|
||||
'both' => esc_html__( 'Always', 'minimalistflex' ),
|
||||
'archive' => esc_html__( 'Archive Page Only', 'minimalistflex' ),
|
||||
'single' => esc_html__( 'Single Page Only', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'Never', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_default_featured_images_first_image', Array(
|
||||
'label' => __( 'Display First Image', 'minimalistflex' ),
|
||||
'description' => __( 'The theme can also retrieve the first image in a post if possible. When no image was found, the theme can fallback to the default images set below.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Display First Image', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'The theme can also retrieve the first image in a post if possible. When no image was found, the theme can fallback to the default images set below.', 'minimalistflex' ),
|
||||
'type' => 'radio',
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_default_featured_image',
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' ),
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' ),
|
||||
)
|
||||
) );
|
||||
}
|
||||
add_action( 'customize_register', 'minimalistflex_default_featured_image_register' );
|
||||
|
||||
function minimalistflex_customize_color_register( $wp_customize ) {
|
||||
require_once 'color-definitions.php';
|
||||
require_once 'class-color-palette-control.php';
|
||||
|
||||
$wp_customize -> add_setting( 'minimalistflex_color_placeholder', Array(
|
||||
@ -85,14 +86,11 @@ function minimalistflex_customize_color_register( $wp_customize ) {
|
||||
) );
|
||||
$wp_customize -> add_control( new MinimalistFlex_Color_Palette_Custom_Control( $wp_customize, 'minimalistflex_color_placeholder', Array(
|
||||
'priority' => 1,
|
||||
'label' => __( 'Color Palettes', 'minimalistflex' ),
|
||||
'description' => __( 'We had prepared some fine tuned color palettes for you. Select an option and it will automatically apply the palette to your site.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Color Palettes', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'We had prepared some fine tuned color palettes for you. Select an option and it will automatically apply the palette to your site.', 'minimalistflex' ),
|
||||
'section' => 'colors'
|
||||
) ) );
|
||||
|
||||
global $colors;
|
||||
global $labels;
|
||||
global $desciprtions;
|
||||
$color_keys = array_keys( $colors );
|
||||
foreach( $color_keys as $color_key ) {
|
||||
$wp_customize -> add_setting( 'minimalistflex_color_' . $color_key, Array(
|
||||
@ -117,29 +115,27 @@ function minimalistflex_customize_color_register( $wp_customize ) {
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_color_disable_shadow', Array(
|
||||
'type' => 'radio',
|
||||
'label' => __( 'Disable Shadows', 'minimalistflex' ),
|
||||
'description' => __( 'This option lets you disable the shadow on the site. It should only affect the shadow created by the theme.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Disable Shadows', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'This option lets you disable the shadow on the site. It should only affect the shadow created by the theme.', 'minimalistflex' ),
|
||||
'priority' => 2,
|
||||
'section' => 'colors',
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> get_control( 'background_color' ) -> description = __( 'The default background setting from the WordPress core. If set, it will blend with the content & sidebar background colors set below.', 'minimalistflex' );
|
||||
$wp_customize -> get_control( 'header_textcolor' ) -> description = __( 'The default header text setting from the WordPress core. Used on the header and the toggle button.', 'minimalistflex' );
|
||||
$wp_customize -> get_control( 'background_color' ) -> description = esc_html__( 'The default background setting from the WordPress core. If set, it will blend with the content & sidebar background colors set below.', 'minimalistflex' );
|
||||
$wp_customize -> get_control( 'header_textcolor' ) -> description = esc_html__( 'The default header text setting from the WordPress core. Used on the header and the toggle button.', 'minimalistflex' );
|
||||
}
|
||||
|
||||
$metadatas = Array(
|
||||
/* translators: This line is special. The part before <br> is the description of the section, while the rest is the option name.*/
|
||||
'description' => __( 'Below are some metadatas that you may configure whether to display or not.<br>Description', 'minimalistflex' ),
|
||||
'user_registered' => __( 'Registration time', 'minimalistflex' ),
|
||||
'user_url' => __( 'Website', 'minimalistflex' ),
|
||||
'user_email' => __( 'Email address', 'minimalistflex' )
|
||||
);
|
||||
|
||||
function minimalistflex_customize_author_elements_register( $wp_customize ) {
|
||||
global $metadatas;
|
||||
$metadatas = Array(
|
||||
/* translators: This line is special. The part before <br> is the description of the section, while the rest is the option name.*/
|
||||
'description' => esc_html__( 'Below are some metadatas that you may configure whether to display or not.<br>Description', 'minimalistflex' ),
|
||||
'user_registered' => esc_html__( 'Registration time', 'minimalistflex' ),
|
||||
'user_url' => esc_html__( 'Website', 'minimalistflex' ),
|
||||
'user_email' => esc_html__( 'Email address', 'minimalistflex' )
|
||||
);
|
||||
|
||||
$metadata_keys = array_keys( $metadatas );
|
||||
foreach( $metadata_keys as $metadata_key ) {
|
||||
@ -155,12 +151,12 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
|
||||
'type' => 'radio',
|
||||
'priority' => 45,
|
||||
'capability' => 'edit_theme_options',
|
||||
'label' => __( 'Metadatas', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Metadatas', 'minimalistflex' ),
|
||||
'description' => $metadatas[$metadata_key],
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
} else {
|
||||
@ -171,8 +167,8 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
|
||||
'description' => $metadatas[$metadata_key],
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
}
|
||||
@ -180,11 +176,10 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
|
||||
}
|
||||
|
||||
function minimalistflex_customize_register( $wp_customize ) {
|
||||
|
||||
// Start adding panels.
|
||||
$wp_customize -> add_panel( 'minimalistflex_layout', Array(
|
||||
'title' => _x( 'Layout', 'customizer panel' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may configure how different pages on your site looks like.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may configure how different pages on your site looks like.', 'minimalistflex' ),
|
||||
'priority' => 70,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
@ -192,62 +187,62 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
// Start adding sections.
|
||||
$wp_customize -> add_section( 'minimalistflex_layout_home', Array(
|
||||
'title' => _x( 'Blog Page', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may customize the layout of your blog page.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may customize the layout of your blog page.', 'minimalistflex' ),
|
||||
'panel' => 'minimalistflex_layout',
|
||||
'priority' => 10,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_layout_front', Array(
|
||||
'title' => _x( 'Front Page', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may customize the layout of your front page. Only takes effect when using a static front page.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may customize the layout of your front page. Only takes effect when using a static front page.', 'minimalistflex' ),
|
||||
'panel' => 'minimalistflex_layout',
|
||||
'priority' => 12,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_layout_archive', Array(
|
||||
'title' => _x( 'Archives', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may customize the layout of your archive pages.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may customize the layout of your archive pages.', 'minimalistflex' ),
|
||||
'panel' => 'minimalistflex_layout',
|
||||
'priority' => 15,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_layout_search', Array(
|
||||
'title' => _x( 'Search Results', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may customize the layout of your search result pages.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may customize the layout of your search result pages.', 'minimalistflex' ),
|
||||
'panel' => 'minimalistflex_layout',
|
||||
'priority' => 17,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_layout_author', Array(
|
||||
'title' => _x( 'Author Pages', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may customize the layout of your author pages.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may customize the layout of your author pages.', 'minimalistflex' ),
|
||||
'panel' => 'minimalistflex_layout',
|
||||
'priority' => 20,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_layout_singular', Array(
|
||||
'title' => _x( 'Single Posts', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may customize the layout of your posts.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may customize the layout of your posts.', 'minimalistflex' ),
|
||||
'panel' => 'minimalistflex_layout',
|
||||
'priority' => 25,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_layout_page', Array(
|
||||
'title' => _x( 'Pages', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'Here you may customize the layout of your pages.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may customize the layout of your pages.', 'minimalistflex' ),
|
||||
'panel' => 'minimalistflex_layout',
|
||||
'priority' => 30,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_interface', Array(
|
||||
'title' => _x( 'Interface & Elements', 'customizer section' , 'minimalistflex' ),
|
||||
'description' => __( 'You may customize your site\'s interface and the elements displayed here.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'You may customize your site\'s interface and the elements displayed here.', 'minimalistflex' ),
|
||||
'priority' => 71,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
$wp_customize -> add_section( 'minimalistflex_footer', Array(
|
||||
'title' => _x( 'Footer', 'customizer section', 'minimalistflex' ),
|
||||
'description' => __( 'You may customize how your footer looks like here.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'You may customize how your footer looks like here.', 'minimalistflex' ),
|
||||
'priority' => 140,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
@ -444,7 +439,7 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'type' => 'theme_mod',
|
||||
'capability' => 'edit_theme_options',
|
||||
'transport' => 'refresh',
|
||||
'default' => __( 'Read More', 'minimalistflex' ),
|
||||
'default' => esc_html__( 'Read More', 'minimalistflex' ),
|
||||
'sanitize_callback' => 'esc_html'
|
||||
) );
|
||||
$wp_customize -> add_setting( 'minimalistflex_interface_thumbnail_height', Array(
|
||||
@ -464,7 +459,7 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'capability' => 'edit_theme_options',
|
||||
'transport' => 'refresh',
|
||||
'default' => 'both',
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_callback'
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
|
||||
) );
|
||||
$wp_customize -> add_setting( 'minimalistflex_footer_text', Array(
|
||||
'type' => 'theme_mod',
|
||||
@ -477,7 +472,7 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'capability' => 'edit_theme_options',
|
||||
'transport' => 'refresh',
|
||||
'default' => 'one',
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_callback'
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
|
||||
) );
|
||||
|
||||
// Start binding controls (UI).
|
||||
@ -485,26 +480,26 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'type' => 'url',
|
||||
'priority' => 50,
|
||||
'section' => 'header_image',
|
||||
'label' => __( 'Header Image Link', 'minimalistflex' ),
|
||||
'description' => __( 'You may link the header image to a URL. Leave blank if you do not want to do so.', 'minimalistflex' )
|
||||
'label' => esc_html__( 'Header Image Link', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'You may link the header image to a URL. Leave blank if you do not want to do so.', 'minimalistflex' )
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_header_label', Array(
|
||||
'type' => 'text',
|
||||
'priority' => 40,
|
||||
'section' => 'header_image',
|
||||
'label' => __( 'Header Image Label', 'minimalistflex' ),
|
||||
'description' => __( 'You may provide a description of your header image. Also will become the label of the link if set. Should be set for better accessibility.', 'minimalistflex' )
|
||||
'label' => esc_html__( 'Header Image Label', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'You may provide a description of your header image. Also will become the label of the link if set. Should be set for better accessibility.', 'minimalistflex' )
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_home_sidebar', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_home',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_home_header', Array(
|
||||
@ -512,10 +507,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_home',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_front_sidebar', Array(
|
||||
@ -523,11 +518,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_front',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_front_header', Array(
|
||||
@ -535,10 +530,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_front',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_archive_sidebar', Array(
|
||||
@ -546,11 +541,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_archive',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_archive_header', Array(
|
||||
@ -558,10 +553,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_archive',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_archive_title', Array(
|
||||
@ -569,10 +564,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_archive',
|
||||
'label' => _x( 'Title', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the archive title.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the archive title.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_sidebar', Array(
|
||||
@ -580,11 +575,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_header', Array(
|
||||
@ -592,10 +587,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_title', Array(
|
||||
@ -603,10 +598,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Search Query', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the search query.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the search query.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_form', Array(
|
||||
@ -614,10 +609,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Search Form', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to also display the search form.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to also display the search form.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_sidebar', Array(
|
||||
@ -625,11 +620,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_header', Array(
|
||||
@ -637,10 +632,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_title', Array(
|
||||
@ -648,10 +643,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Author Name', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the author name.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the author name.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_admin', Array(
|
||||
@ -659,10 +654,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 40,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Admin Status', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Show an indicator in the bottom-right of the avatar if the author is an admin.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Show an indicator in the bottom-right of the avatar if the author is an admin.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_singular_sidebar', Array(
|
||||
@ -670,11 +665,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_singular',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_singular_header', Array(
|
||||
@ -682,10 +677,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_singular',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_page_sidebar', Array(
|
||||
@ -693,11 +688,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_page',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_page_header', Array(
|
||||
@ -705,130 +700,130 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_page',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_scroll_top', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Scroll to top button', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display a "Scroll to top" button in the bottom-right corner.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Scroll to top button', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Whether to display a "Scroll to top" button in the bottom-right corner.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_excerpt', Array(
|
||||
'type' => 'number',
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Excerpt Word Count', 'minimalistflex' ),
|
||||
'description' => __( 'The word count of the excerpts on any archive page and the blog page.', 'minimalistflex' )
|
||||
'label' => esc_html__( 'Excerpt Word Count', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'The word count of the excerpts on any archive page and the blog page.', 'minimalistflex' )
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_autoh2label', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 25,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Auto h2 Label', 'minimalistflex' ),
|
||||
'description' => __( 'The theme can automatically theme and label the h2 elements in single posts and pages, providing a better visual. May not work well in all circumstances, use with caution.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Auto h2 Label', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'The theme can automatically theme and label the h2 elements in single posts and pages, providing a better visual. May not work well in all circumstances, use with caution.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_comment_count', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 30,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Comment Count', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Comment Count', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_publisher', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 35,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Publisher', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display the publisher.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Publisher', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Whether to display the publisher.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_date', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 40,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Publish Date', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display the published date.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Publish Date', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Whether to display the published date.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'publish' => __( 'Yes, publish time only.', 'minimalistflex' ),
|
||||
'modify' => __( 'Yes, and display modified time if possible.', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
'publish' => esc_html__( 'Yes, publish time only.', 'minimalistflex' ),
|
||||
'modify' => esc_html__( 'Yes, and display modified time if possible.', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_readlink', Array(
|
||||
'type' => 'text',
|
||||
'priority' => 45,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Read More Link', 'minimalistflex' ),
|
||||
'description' => __( 'The text for the "Read More" links.', 'minimalistflex' )
|
||||
'label' => esc_html__( 'Read More Link', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'The text for the "Read More" links.', 'minimalistflex' )
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 50,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Thumbnail Images Size', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to enable flexible height for your thumbnail images, or use a fixed height.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Thumbnail Images Size', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to enable flexible height for your thumbnail images, or use a fixed height.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'fixed' => __( 'Fixed', 'minimalistflex' ),
|
||||
'auto' => __( 'Flexible', 'minimalistflex' )
|
||||
'fixed' => esc_html__( 'Fixed', 'minimalistflex' ),
|
||||
'auto' => esc_html__( 'Flexible', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height_px', Array(
|
||||
'type' => 'number',
|
||||
'priority' => 51,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => __( 'Height', 'minimalistflex' ),
|
||||
'description' => __( 'Enter your desired height here. Should be in pixels.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Height', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Enter your desired height here. Should be in pixels.', 'minimalistflex' ),
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_footer_type', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 9,
|
||||
'section' => 'minimalistflex_footer',
|
||||
'label' => __( 'Footer Options', 'minimalistflex' ),
|
||||
'description' => __( 'Choose what to display in your footer credit section.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Footer Options', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Choose what to display in your footer credit section.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'both' => __( 'Both MinimalistFlex credits and custom footer text.', 'minimalistflex' ),
|
||||
'minimalistflex' => __( 'MinimalistFlex credits only.', 'minimalistflex' ),
|
||||
'custom' => __( 'Custom footer text only.', 'minimalistflex' ),
|
||||
'none' => __( 'Neither.', 'minimalistflex' )
|
||||
'both' => esc_html__( 'Both MinimalistFlex credits and custom footer text.', 'minimalistflex' ),
|
||||
'minimalistflex' => esc_html__( 'MinimalistFlex credits only.', 'minimalistflex' ),
|
||||
'custom' => esc_html__( 'Custom footer text only.', 'minimalistflex' ),
|
||||
'none' => esc_html__( 'Neither.', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( new WP_Customize_Code_Editor_Control( $wp_customize, 'minimalistflex_footer_text', Array(
|
||||
'code_type' => 'htmlmixed',
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_footer',
|
||||
'label' => __( 'Custom Footer Text', 'minimalistflex' ),
|
||||
'description' => __( 'Here you may set a custom footer text to be displayed in the footer credits. HTML allowed.', 'minimalistflex' )
|
||||
'label' => esc_html__( 'Custom Footer Text', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Here you may set a custom footer text to be displayed in the footer credits. HTML allowed.', 'minimalistflex' )
|
||||
) ) );
|
||||
$wp_customize -> add_control( 'minimalistflex_footer_widget_layout', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_footer',
|
||||
'label' => __( 'Footer Widget Layout', 'minimalistflex' ),
|
||||
'description' => __( 'Choose the layout of the footer widgets.', 'minimalistflex' ),
|
||||
'label' => esc_html__( 'Footer Widget Layout', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Choose the layout of the footer widgets.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'one' => __( 'One column. Only shows the "Footer" widget area.', 'minimalistflex' ),
|
||||
'two' => __( 'Two columns. Also shows the "Footer 2" widget area.', 'minimalistflex' ),
|
||||
'three' => __( 'Three columns. Also shows the "Footer 3" widget area (aka all areas).', 'minimalistflex' )
|
||||
'one' => esc_html__( 'One column. Only shows the "Footer" widget area.', 'minimalistflex' ),
|
||||
'two' => esc_html__( 'Two columns. Also shows the "Footer 2" widget area.', 'minimalistflex' ),
|
||||
'three' => esc_html__( 'Three columns. Also shows the "Footer 3" widget area (aka all areas).', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
|
||||
|
||||
22
style.css
22
style.css
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Theme Name: MinimalistFlex
|
||||
* Description: MinimalistFlex is an elegant, easy to use theme that aims to provide a smooth user experience. As a classic theme, we try to provide as many options as possible, while not being overwhelming. With full support of flexible header images, custom colors and layout, multiple widget areas, you can still customize your site in a lot of ways. Compatibility is also an important affair: MinimalistFlex is tested on many versions with a minimum of WordPress 4.9 and PHP 5.6, ensuring that almost everyone can enjoy the theme without worrying to upgrade. Mobile users are also considered well: MinimalistFlex is fully responsive on its own, and works well even on very small screen sizes!
|
||||
* Version: 1.1
|
||||
* Version: 1.1.1
|
||||
* Theme URI: https://github.com/onmyodev/MinimalistFlex/
|
||||
* Author: Frank419
|
||||
* Author URI: https://onmyodev.com/
|
||||
@ -78,25 +78,6 @@
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
|
||||
/* .minimalistflex-master h1,
|
||||
.minimalistflex-master h2,
|
||||
.minimalistflex-master h3,
|
||||
.minimalistflex-master h4,
|
||||
.minimalistflex-master h5,
|
||||
.minimalistflex-master h6,
|
||||
.minimalistflex-master p,
|
||||
.minimalistflex-master span,
|
||||
.minimalistflex-master td,
|
||||
.minimalistflex-master th,
|
||||
.minimalistflex-master li,
|
||||
.minimalistflex-master dl,
|
||||
.minimalistflex-master dt,
|
||||
.minimalistflex-master dd,
|
||||
.minimalistflex-master address,
|
||||
.minimalistflex-master div {
|
||||
color: var(--minimalistflex-default);
|
||||
} */
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
color: var(--minimalistflex-default);
|
||||
@ -160,6 +141,7 @@ button:focus {
|
||||
);
|
||||
border-radius: 3px;
|
||||
color: var(--minimalistflex-default);
|
||||
padding: 1em !important;
|
||||
}
|
||||
|
||||
.warning::before {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user