Compare commits

..

16 Commits
v1.0.5 ... main

Author SHA1 Message Date
Frank419
dc62038c6d Fixed translation loaded too early issues, ClassicPress compatibility, as well as non-existent sanitize callbacks issue. 2025-01-28 14:10:20 +08:00
Frank419
856198591a Update READMEs (again) :D 2025-01-28 12:08:01 +08:00
Frank419
4420bc4948 Security changes. 2025-01-28 12:06:55 +08:00
Frank419
13738d3b5f Added some changelogs to the README :) 2025-01-28 12:02:33 +08:00
Frank419
139ffa83b6 Modified the "Light" aka default color palette. 2025-01-28 12:02:19 +08:00
Frank419
ff3cf5e516 Layout modifications. 2025-01-28 12:01:58 +08:00
Frank419
6876dc26a0 Fixed wrong widget displayed for this area. 2025-01-28 12:01:45 +08:00
Frank419
11d7ec19ed Fixed some styling issues and introduced a bit new design. 2025-01-28 12:01:32 +08:00
Frank419
3a1520d3c1 Removed the default background image. Feels too shiny. 2025-01-28 09:11:25 +08:00
Frank419
26fa5a72af Increase the version number. (As usual.) 2024-09-14 21:37:21 +08:00
Frank419
8ab131e720 Updated locale. 2024-09-14 21:36:18 +08:00
Frank419
8ae25523dc Mentioned theme license in the readme. 2024-09-14 21:34:18 +08:00
Frank419
6b21d517c6 Make static text translatable. 2024-09-14 21:34:06 +08:00
Frank419
049b130c14 Re-added release workflow. 2024-08-29 21:52:09 +08:00
Frank419
402e1b099c Misc styling issues. Used variables instead of fixed values. 2024-08-29 18:33:36 +08:00
Frank419
95b297e08a This workflow doesn't work. Removed. 2024-08-29 18:29:50 +08:00
16 changed files with 449 additions and 329 deletions

View File

@ -15,16 +15,16 @@ jobs:
git config user.email "<>" git config user.email "<>"
- name: Create artifact - name: Create artifact
run : | run : |
git archive -o ${{ github.event.repository.name }}-${{ github.ref_name }}.zip --prefix ${{ github.event.repository.name }}/ HEAD git archive -o minimalistflex-${{ github.ref_name }}.zip --prefix minimalistflex/ HEAD
ls ls
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ${{ github.event.repository.name }}-${{ github.ref_name }} name: minimalistflex-${{ github.ref_name }}
path: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip path: minimalistflex-${{ github.ref_name }}.zip
- name: Upload to release - name: Upload to release
uses: JasonEtco/upload-to-release@master uses: JasonEtco/upload-to-release@master
with: with:
args: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip application/zip args: minimalistflex-${{ github.ref_name }}.zip application/zip
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -19,6 +19,9 @@ fully responsive, and looks good on very small screens.
We also tried our best to make the theme as accessible as We also tried our best to make the theme as accessible as
possible. possible.
The MinimalistFlex WordPress theme, Copyright Frank419 2024.
MinimalistFlex is licensed under the terms of GNU General Public License, Version 3.0.
## Frequently Asked Quesions ## Frequently Asked Quesions
### How do I set default featured images? ### How do I set default featured images?
@ -39,6 +42,13 @@ As a bonus, we have 4 pre-built color palettes for you.
## Changelog ## Changelog
### 1.1.1
* How would I forget the CodeSniffer checks? Anyways, fixed a security issue.
### 1.1
* A little bit new design, as well as fixed some visual issues.
* Fixed a bug where the "Below Content" widget area don't display properly.
### 1.0.5 ### 1.0.5
* Addressed a menu styling issue. * Addressed a menu styling issue.
* Fixed footer credit not being properly displayed. * Fixed footer credit not being properly displayed.

View File

@ -3,9 +3,16 @@ if ( !defined( 'WPINC' ) ) {
die; 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() { function minimalistflex_add_supports() {
add_theme_support( 'custom-background', Array( add_theme_support( 'custom-background', Array(
'default-image' => get_template_directory_uri() . '/defaults/bg.png',
'default-position-x' => 'center', 'default-position-x' => 'center',
'default-position-y' => 'center', 'default-position-y' => 'center',
'default-size' => 'cover', 'default-size' => 'cover',
@ -16,7 +23,9 @@ function minimalistflex_add_supports() {
add_theme_support( 'automatic-feed-links' ); add_theme_support( 'automatic-feed-links' );
add_theme_support( "align-wide" ); add_theme_support( "align-wide" );
add_theme_support( "post-thumbnails" ); 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( add_theme_support( 'custom-logo', Array(
'width' => '80', 'width' => '80',
'height' => '80' 'height' => '80'
@ -34,12 +43,12 @@ function minimalistflex_add_supports() {
'abstract' => Array( 'abstract' => Array(
'url' => get_template_directory_uri() . '/defaults/header.png', 'url' => get_template_directory_uri() . '/defaults/header.png',
'thumbnail_url' => get_template_directory_uri() . '/defaults/header.png', 'thumbnail_url' => get_template_directory_uri() . '/defaults/header.png',
'description' => 'An abstract default header image.' 'description' => esc_html__( 'An abstract default header image.', 'minimalistflex' )
), ),
'lines' => Array( 'lines' => Array(
'url' => get_template_directory_uri() . '/defaults/header2.png', 'url' => get_template_directory_uri() . '/defaults/header2.png',
'thumbnail_url' => get_template_directory_uri() . '/defaults/header2.png', 'thumbnail_url' => get_template_directory_uri() . '/defaults/header2.png',
'description' => 'A default header image that contains three lines.' 'description' => esc_html__( 'A default header image that contains three lines.', 'minimalistflex' )
) )
) ); ) );
@ -130,16 +139,13 @@ function minimalistflex_register_menus() {
add_action( 'init', 'minimalistflex_register_menus' ); add_action( 'init', 'minimalistflex_register_menus' );
function minimalistflex_dynamic_css() { function minimalistflex_dynamic_css() {
require_once 'includes/color-definitions.php';
require_once 'includes/colors.php'; require_once 'includes/colors.php';
require_once 'includes/languages.php'; require_once 'includes/languages.php';
} }
add_action( 'wp_footer', 'minimalistflex_dynamic_css' ); 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() { function minimalistflex_custom_excerpt_length() {
return intval( get_theme_mod( 'minimalistflex_interface_excerpt', '55' ) ); return intval( get_theme_mod( 'minimalistflex_interface_excerpt', '55' ) );
} }

View File

@ -20,48 +20,48 @@ $colors = Array(
'tint-contrast' => '#00281d', 'tint-contrast' => '#00281d',
'contrast' => '#000000', 'contrast' => '#000000',
'contrast-dark' => '#ffffff', 'contrast-dark' => '#ffffff',
'footer-text' => '#ffffff', 'footer-text' => '#000000',
'footer-bg' => '#333333' 'footer-bg' => '#ffffff'
); );
$labels = Array( $labels = Array(
'level1' => __( 'Content Background', 'minimalistflex' ), 'level1' => esc_html__( 'Content Background', 'minimalistflex' ),
'level2' => __( 'Sidebar Background', 'minimalistflex' ), 'level2' => esc_html__( 'Sidebar Background', 'minimalistflex' ),
'level3-dark' => __( 'Secondary Text', 'minimalistflex' ), 'level3-dark' => esc_html__( 'Secondary Text', 'minimalistflex' ),
'default' => __( 'Default', 'minimalistflex' ), 'default' => esc_html__( 'Default', 'minimalistflex' ),
'link' => __( 'Link', 'minimalistflex' ), 'link' => esc_html__( 'Link', 'minimalistflex' ),
'link-hover' => __( 'Link Hover', 'minimalistflex' ), 'link-hover' => esc_html__( 'Link Hover', 'minimalistflex' ),
'tint' => __( 'Tint A', 'minimalistflex' ), 'tint' => esc_html__( 'Tint A', 'minimalistflex' ),
'tint-dark' => __( 'Tint A Dark', 'minimalistflex' ), 'tint-dark' => esc_html__( 'Tint A Dark', 'minimalistflex' ),
'tint-alt' => __( 'Tint B', 'minimalistflex' ), 'tint-alt' => esc_html__( 'Tint B', 'minimalistflex' ),
'tint-contrast' => __( 'Tint C', 'minimalistflex' ), 'tint-contrast' => esc_html__( 'Tint C', 'minimalistflex' ),
'contrast' => __( 'Contrast (Light)', 'minimalistflex' ), 'contrast' => esc_html__( 'Contrast (Light)', 'minimalistflex' ),
'contrast-dark' => __( 'Contrast (Dark)', 'minimalistflex' ), 'contrast-dark' => esc_html__( 'Contrast (Dark)', 'minimalistflex' ),
'footer-text' => __( 'Footer Text', 'minimalistflex' ), 'footer-text' => esc_html__( 'Footer Text', 'minimalistflex' ),
'footer-bg' => __( 'Footer Background', 'minimalistflex' ), 'footer-bg' => esc_html__( 'Footer Background', 'minimalistflex' ),
'header-bg' => __( 'Header Background', 'minimalistflex' ), 'header-bg' => esc_html__( 'Header Background', 'minimalistflex' ),
'header-menu' => __( 'Navigation Menu Background', 'minimalistflex' ), 'header-menu' => esc_html__( 'Navigation Menu Background', 'minimalistflex' ),
'header-sidebar' => __( 'Navigation Menu Submenu Background', 'minimalistflex' ), 'header-sidebar' => esc_html__( 'Navigation Menu Submenu Background', 'minimalistflex' ),
'header-text' => __( 'Navigation Menu', 'minimalistflex' ) 'header-text' => esc_html__( 'Navigation Menu', 'minimalistflex' )
); );
$desciprtions = Array( $desciprtions = Array(
'level1' => __( 'The background color of the main content area.', 'minimalistflex' ), 'level1' => esc_html__( 'The background color of the main content area.', 'minimalistflex' ),
'level2' => __( 'The background color of the sidebar.', 'minimalistflex' ), 'level2' => esc_html__( 'The background color of the sidebar.', 'minimalistflex' ),
'level3-dark' => __( 'The secondary text color. Should be lighter than the default color.', 'minimalistflex' ), 'level3-dark' => esc_html__( 'The secondary text color. Should be lighter than the default color.', 'minimalistflex' ),
'default' => __( 'The default text color.', 'minimalistflex' ), 'default' => esc_html__( 'The default text color.', 'minimalistflex' ),
'link' => __( 'The link color.', 'minimalistflex' ), 'link' => esc_html__( 'The link color.', 'minimalistflex' ),
'link-hover' => __( 'The link color when hovered.', 'minimalistflex' ), 'link-hover' => esc_html__( 'The link color when hovered.', 'minimalistflex' ),
'tint' => __( 'Tint color A. Should be a light color.', 'minimalistflex' ), 'tint' => esc_html__( '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-dark' => esc_html__( '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-alt' => esc_html__( 'Tint color B. Should be a dark color.', 'minimalistflex' ),
'tint-contrast' => __( 'Tint color C. Should be a *even darker* color.', 'minimalistflex' ), 'tint-contrast' => esc_html__( 'Tint color C. Should be a *even darker* color.', 'minimalistflex' ),
'contrast' => __( 'Text color on a light background. Better keep it as is.', 'minimalistflex' ), 'contrast' => esc_html__( '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' ), 'contrast-dark' => esc_html__( 'Text color on a dark background. Better keep it as is.', 'minimalistflex' ),
'footer-text' => __( 'The footer text color.', 'minimalistflex' ), 'footer-text' => esc_html__( 'The footer text color.', 'minimalistflex' ),
'footer-bg' => __( 'The footer background color.', 'minimalistflex' ), 'footer-bg' => esc_html__( 'The footer background color.', 'minimalistflex' ),
'header-bg' => __( 'The background color of the header.', 'minimalistflex' ), 'header-bg' => esc_html__( 'The background color of the header.', 'minimalistflex' ),
'header-menu' => __( 'The background color of the navigation menu dropdown.', 'minimalistflex' ), 'header-menu' => esc_html__( 'The background color of the navigation menu dropdown.', 'minimalistflex' ),
'header-sidebar' => __( 'The background color of the submenus of the navigation menu dropdown.', 'minimalistflex' ), 'header-sidebar' => esc_html__( 'The background color of the submenus of the navigation menu dropdown.', 'minimalistflex' ),
'header-text' => __( 'The text color of the navigation menu dropdown.', 'minimalistflex' ) 'header-text' => esc_html__( 'The text color of the navigation menu dropdown.', 'minimalistflex' )
); );

View File

@ -5,8 +5,7 @@ if ( !defined( 'WPINC' ) ) {
?> ?>
<?php <?php
require_once 'color-definitions.php'; require 'color-definitions.php';
global $colors;
?> ?>
<style id="minimalistflex-color-css"> <style id="minimalistflex-color-css">

View File

@ -3,21 +3,21 @@ if ( !defined( 'WPINC' ) ) {
die; die;
} }
require_once 'color-definitions.php';
require_once 'sanitize-callbacks.php';
function minimalistflex_customizer_enqueue_scripts() { 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 ); 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' ); add_action( 'customize_controls_enqueue_scripts', 'minimalistflex_customizer_enqueue_scripts' );
function minimalistflex_default_featured_image_register( $wp_customize ) { function minimalistflex_default_featured_image_register( $wp_customize ) {
require_once 'class-multi-image-control.php'; require_once 'class-multi-image-control.php';
$wp_customize -> add_section( 'minimalistflex_default_featured_image', Array( $wp_customize -> add_section( 'minimalistflex_default_featured_image', Array(
'title' => __( 'Default Featured Images', 'minimalistflex' ), 'title' => esc_html__( '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' ), '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, 'priority' => 50,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
@ -41,42 +41,43 @@ function minimalistflex_default_featured_image_register( $wp_customize ) {
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb' 'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
) ); ) );
$wp_customize -> add_control( new MinimalistFlex_Multi_Image_Custom_Control( $wp_customize, 'minimalistflex_default_featured_images', Array( $wp_customize -> add_control( new MinimalistFlex_Multi_Image_Custom_Control( $wp_customize, 'minimalistflex_default_featured_images', Array(
'label' => __( 'Default Images', 'minimalistflex' ), 'label' => esc_html__( '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' ), '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, 'priority' => 20,
'section' => 'minimalistflex_default_featured_image', 'section' => 'minimalistflex_default_featured_image',
'suggest_label' => __( 'Suggested Images', 'minimalistflex' ), 'suggest_label' => esc_html__( '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_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' ) '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( $wp_customize -> add_control( 'minimalistflex_default_featured_images_location', Array(
'label' => __( 'Location', 'minimalistflex' ), 'label' => esc_html__( 'Location', 'minimalistflex' ),
'description' => __( 'You may decide if and where should the default image show.', 'minimalistflex' ), 'description' => esc_html__( 'You may decide if and where should the default image show.', 'minimalistflex' ),
'type' => 'radio', 'type' => 'radio',
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_default_featured_image', 'section' => 'minimalistflex_default_featured_image',
'choices' => Array( 'choices' => Array(
'both' => __( 'Always', 'minimalistflex' ), 'both' => esc_html__( 'Always', 'minimalistflex' ),
'archive' => __( 'Archive Page Only', 'minimalistflex' ), 'archive' => esc_html__( 'Archive Page Only', 'minimalistflex' ),
'single' => __( 'Single Page Only', 'minimalistflex' ), 'single' => esc_html__( 'Single Page Only', 'minimalistflex' ),
'no' => __( 'Never', 'minimalistflex' ) 'no' => esc_html__( 'Never', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_default_featured_images_first_image', Array( $wp_customize -> add_control( 'minimalistflex_default_featured_images_first_image', Array(
'label' => __( 'Display First Image', 'minimalistflex' ), 'label' => esc_html__( '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' ), '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', 'type' => 'radio',
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_default_featured_image', 'section' => 'minimalistflex_default_featured_image',
'choices' => Array( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ), 'no' => esc_html__( 'No', 'minimalistflex' ),
) )
) ); ) );
} }
add_action( 'customize_register', 'minimalistflex_default_featured_image_register' ); add_action( 'customize_register', 'minimalistflex_default_featured_image_register' );
function minimalistflex_customize_color_register( $wp_customize ) { function minimalistflex_customize_color_register( $wp_customize ) {
require_once 'color-definitions.php';
require_once 'class-color-palette-control.php'; require_once 'class-color-palette-control.php';
$wp_customize -> add_setting( 'minimalistflex_color_placeholder', Array( $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( $wp_customize -> add_control( new MinimalistFlex_Color_Palette_Custom_Control( $wp_customize, 'minimalistflex_color_placeholder', Array(
'priority' => 1, 'priority' => 1,
'label' => __( 'Color Palettes', 'minimalistflex' ), 'label' => esc_html__( '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' ), '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' 'section' => 'colors'
) ) ); ) ) );
global $colors;
global $labels;
global $desciprtions;
$color_keys = array_keys( $colors ); $color_keys = array_keys( $colors );
foreach( $color_keys as $color_key ) { foreach( $color_keys as $color_key ) {
$wp_customize -> add_setting( 'minimalistflex_color_' . $color_key, Array( $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( $wp_customize -> add_control( 'minimalistflex_color_disable_shadow', Array(
'type' => 'radio', 'type' => 'radio',
'label' => __( 'Disable Shadows', 'minimalistflex' ), 'label' => esc_html__( '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' ), '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, 'priority' => 2,
'section' => 'colors', 'section' => 'colors',
'choices' => Array( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', '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 &amp; sidebar background colors set below.', '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 &amp; 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( '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 ) { 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 ); $metadata_keys = array_keys( $metadatas );
foreach( $metadata_keys as $metadata_key ) { foreach( $metadata_keys as $metadata_key ) {
@ -155,12 +151,12 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
'type' => 'radio', 'type' => 'radio',
'priority' => 45, 'priority' => 45,
'capability' => 'edit_theme_options', 'capability' => 'edit_theme_options',
'label' => __( 'Metadatas', 'minimalistflex' ), 'label' => esc_html__( 'Metadatas', 'minimalistflex' ),
'description' => $metadatas[$metadata_key], 'description' => $metadatas[$metadata_key],
'section' => 'minimalistflex_layout_author', 'section' => 'minimalistflex_layout_author',
'choices' => Array( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
} else { } else {
@ -171,8 +167,8 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
'description' => $metadatas[$metadata_key], 'description' => $metadatas[$metadata_key],
'section' => 'minimalistflex_layout_author', 'section' => 'minimalistflex_layout_author',
'choices' => Array( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
} }
@ -180,11 +176,10 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
} }
function minimalistflex_customize_register( $wp_customize ) { function minimalistflex_customize_register( $wp_customize ) {
// Start adding panels. // Start adding panels.
$wp_customize -> add_panel( 'minimalistflex_layout', Array( $wp_customize -> add_panel( 'minimalistflex_layout', Array(
'title' => _x( 'Layout', 'customizer panel' , 'minimalistflex' ), '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, 'priority' => 70,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
@ -192,62 +187,62 @@ function minimalistflex_customize_register( $wp_customize ) {
// Start adding sections. // Start adding sections.
$wp_customize -> add_section( 'minimalistflex_layout_home', Array( $wp_customize -> add_section( 'minimalistflex_layout_home', Array(
'title' => _x( 'Blog Page', 'customizer section' , 'minimalistflex' ), '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', 'panel' => 'minimalistflex_layout',
'priority' => 10, 'priority' => 10,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_layout_front', Array( $wp_customize -> add_section( 'minimalistflex_layout_front', Array(
'title' => _x( 'Front Page', 'customizer section' , 'minimalistflex' ), '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', 'panel' => 'minimalistflex_layout',
'priority' => 12, 'priority' => 12,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_layout_archive', Array( $wp_customize -> add_section( 'minimalistflex_layout_archive', Array(
'title' => _x( 'Archives', 'customizer section' , 'minimalistflex' ), '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', 'panel' => 'minimalistflex_layout',
'priority' => 15, 'priority' => 15,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_layout_search', Array( $wp_customize -> add_section( 'minimalistflex_layout_search', Array(
'title' => _x( 'Search Results', 'customizer section' , 'minimalistflex' ), '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', 'panel' => 'minimalistflex_layout',
'priority' => 17, 'priority' => 17,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_layout_author', Array( $wp_customize -> add_section( 'minimalistflex_layout_author', Array(
'title' => _x( 'Author Pages', 'customizer section' , 'minimalistflex' ), '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', 'panel' => 'minimalistflex_layout',
'priority' => 20, 'priority' => 20,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_layout_singular', Array( $wp_customize -> add_section( 'minimalistflex_layout_singular', Array(
'title' => _x( 'Single Posts', 'customizer section' , 'minimalistflex' ), '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', 'panel' => 'minimalistflex_layout',
'priority' => 25, 'priority' => 25,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_layout_page', Array( $wp_customize -> add_section( 'minimalistflex_layout_page', Array(
'title' => _x( 'Pages', 'customizer section' , 'minimalistflex' ), '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', 'panel' => 'minimalistflex_layout',
'priority' => 30, 'priority' => 30,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_interface', Array( $wp_customize -> add_section( 'minimalistflex_interface', Array(
'title' => _x( 'Interface &amp; Elements', 'customizer section' , 'minimalistflex' ), 'title' => _x( 'Interface &amp; 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, 'priority' => 71,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
$wp_customize -> add_section( 'minimalistflex_footer', Array( $wp_customize -> add_section( 'minimalistflex_footer', Array(
'title' => _x( 'Footer', 'customizer section', 'minimalistflex' ), '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, 'priority' => 140,
'capability' => 'edit_theme_options' 'capability' => 'edit_theme_options'
) ); ) );
@ -444,7 +439,7 @@ function minimalistflex_customize_register( $wp_customize ) {
'type' => 'theme_mod', 'type' => 'theme_mod',
'capability' => 'edit_theme_options', 'capability' => 'edit_theme_options',
'transport' => 'refresh', 'transport' => 'refresh',
'default' => __( 'Read More', 'minimalistflex' ), 'default' => esc_html__( 'Read More', 'minimalistflex' ),
'sanitize_callback' => 'esc_html' 'sanitize_callback' => 'esc_html'
) ); ) );
$wp_customize -> add_setting( 'minimalistflex_interface_thumbnail_height', Array( $wp_customize -> add_setting( 'minimalistflex_interface_thumbnail_height', Array(
@ -464,7 +459,7 @@ function minimalistflex_customize_register( $wp_customize ) {
'capability' => 'edit_theme_options', 'capability' => 'edit_theme_options',
'transport' => 'refresh', 'transport' => 'refresh',
'default' => 'both', 'default' => 'both',
'sanitize_callback' => 'minimalistflex_sanitize_radio_callback' 'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
) ); ) );
$wp_customize -> add_setting( 'minimalistflex_footer_text', Array( $wp_customize -> add_setting( 'minimalistflex_footer_text', Array(
'type' => 'theme_mod', 'type' => 'theme_mod',
@ -477,7 +472,7 @@ function minimalistflex_customize_register( $wp_customize ) {
'capability' => 'edit_theme_options', 'capability' => 'edit_theme_options',
'transport' => 'refresh', 'transport' => 'refresh',
'default' => 'one', 'default' => 'one',
'sanitize_callback' => 'minimalistflex_sanitize_radio_callback' 'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
) ); ) );
// Start binding controls (UI). // Start binding controls (UI).
@ -485,26 +480,26 @@ function minimalistflex_customize_register( $wp_customize ) {
'type' => 'url', 'type' => 'url',
'priority' => 50, 'priority' => 50,
'section' => 'header_image', 'section' => 'header_image',
'label' => __( 'Header Image Link', 'minimalistflex' ), 'label' => esc_html__( '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' ) '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( $wp_customize -> add_control( 'minimalistflex_header_label', Array(
'type' => 'text', 'type' => 'text',
'priority' => 40, 'priority' => 40,
'section' => 'header_image', 'section' => 'header_image',
'label' => __( 'Header Image Label', 'minimalistflex' ), 'label' => esc_html__( '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' ) '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( $wp_customize -> add_control( 'minimalistflex_layout_home_sidebar', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_layout_home', 'section' => 'minimalistflex_layout_home',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ), 'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ), 'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_home_header', Array( $wp_customize -> add_control( 'minimalistflex_layout_home_header', Array(
@ -512,10 +507,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_layout_home', 'section' => 'minimalistflex_layout_home',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_front_sidebar', Array( $wp_customize -> add_control( 'minimalistflex_layout_front_sidebar', Array(
@ -523,11 +518,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_layout_front', 'section' => 'minimalistflex_layout_front',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ), 'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ), 'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_front_header', Array( $wp_customize -> add_control( 'minimalistflex_layout_front_header', Array(
@ -535,10 +530,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_layout_front', 'section' => 'minimalistflex_layout_front',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_archive_sidebar', Array( $wp_customize -> add_control( 'minimalistflex_layout_archive_sidebar', Array(
@ -546,11 +541,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_layout_archive', 'section' => 'minimalistflex_layout_archive',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ), 'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ), 'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_archive_header', Array( $wp_customize -> add_control( 'minimalistflex_layout_archive_header', Array(
@ -558,10 +553,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_layout_archive', 'section' => 'minimalistflex_layout_archive',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_archive_title', Array( $wp_customize -> add_control( 'minimalistflex_layout_archive_title', Array(
@ -569,10 +564,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20, 'priority' => 20,
'section' => 'minimalistflex_layout_archive', 'section' => 'minimalistflex_layout_archive',
'label' => _x( 'Title', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_search_sidebar', Array( $wp_customize -> add_control( 'minimalistflex_layout_search_sidebar', Array(
@ -580,11 +575,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_layout_search', 'section' => 'minimalistflex_layout_search',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ), 'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ), 'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_search_header', Array( $wp_customize -> add_control( 'minimalistflex_layout_search_header', Array(
@ -592,10 +587,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_layout_search', 'section' => 'minimalistflex_layout_search',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_search_title', Array( $wp_customize -> add_control( 'minimalistflex_layout_search_title', Array(
@ -603,10 +598,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20, 'priority' => 20,
'section' => 'minimalistflex_layout_search', 'section' => 'minimalistflex_layout_search',
'label' => _x( 'Search Query', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_search_form', Array( $wp_customize -> add_control( 'minimalistflex_layout_search_form', Array(
@ -614,10 +609,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20, 'priority' => 20,
'section' => 'minimalistflex_layout_search', 'section' => 'minimalistflex_layout_search',
'label' => _x( 'Search Form', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_author_sidebar', Array( $wp_customize -> add_control( 'minimalistflex_layout_author_sidebar', Array(
@ -625,11 +620,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_layout_author', 'section' => 'minimalistflex_layout_author',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ), 'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ), 'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_author_header', Array( $wp_customize -> add_control( 'minimalistflex_layout_author_header', Array(
@ -637,10 +632,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_layout_author', 'section' => 'minimalistflex_layout_author',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_author_title', Array( $wp_customize -> add_control( 'minimalistflex_layout_author_title', Array(
@ -648,10 +643,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20, 'priority' => 20,
'section' => 'minimalistflex_layout_author', 'section' => 'minimalistflex_layout_author',
'label' => _x( 'Author Name', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_author_admin', Array( $wp_customize -> add_control( 'minimalistflex_layout_author_admin', Array(
@ -659,10 +654,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 40, 'priority' => 40,
'section' => 'minimalistflex_layout_author', 'section' => 'minimalistflex_layout_author',
'label' => _x( 'Admin Status', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_singular_sidebar', Array( $wp_customize -> add_control( 'minimalistflex_layout_singular_sidebar', Array(
@ -670,11 +665,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_layout_singular', 'section' => 'minimalistflex_layout_singular',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ), 'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ), 'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_singular_header', Array( $wp_customize -> add_control( 'minimalistflex_layout_singular_header', Array(
@ -682,10 +677,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_layout_singular', 'section' => 'minimalistflex_layout_singular',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_page_sidebar', Array( $wp_customize -> add_control( 'minimalistflex_layout_page_sidebar', Array(
@ -693,11 +688,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_layout_page', 'section' => 'minimalistflex_layout_page',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ), 'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ), 'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_layout_page_header', Array( $wp_customize -> add_control( 'minimalistflex_layout_page_header', Array(
@ -705,130 +700,130 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_layout_page', 'section' => 'minimalistflex_layout_page',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_scroll_top', Array( $wp_customize -> add_control( 'minimalistflex_interface_scroll_top', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Scroll to top button', 'minimalistflex' ), 'label' => esc_html__( 'Scroll to top button', 'minimalistflex' ),
'description' => __( 'Whether to display a "Scroll to top" button in the bottom-right corner.', 'minimalistflex' ), 'description' => esc_html__( 'Whether to display a "Scroll to top" button in the bottom-right corner.', 'minimalistflex' ),
'choices' => Array( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_excerpt', Array( $wp_customize -> add_control( 'minimalistflex_interface_excerpt', Array(
'type' => 'number', 'type' => 'number',
'priority' => 20, 'priority' => 20,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Excerpt Word Count', 'minimalistflex' ), 'label' => esc_html__( 'Excerpt Word Count', 'minimalistflex' ),
'description' => __( 'The word count of the excerpts on any archive page and the blog page.', '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( $wp_customize -> add_control( 'minimalistflex_interface_autoh2label', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 25, 'priority' => 25,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Auto h2 Label', 'minimalistflex' ), 'label' => esc_html__( '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' ), '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( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_comment_count', Array( $wp_customize -> add_control( 'minimalistflex_interface_comment_count', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 30, 'priority' => 30,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Comment Count', 'minimalistflex' ), 'label' => esc_html__( 'Comment Count', 'minimalistflex' ),
'description' => __( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ), 'description' => esc_html__( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ),
'choices' => Array( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_publisher', Array( $wp_customize -> add_control( 'minimalistflex_interface_publisher', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 35, 'priority' => 35,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Publisher', 'minimalistflex' ), 'label' => esc_html__( 'Publisher', 'minimalistflex' ),
'description' => __( 'Whether to display the publisher.', 'minimalistflex' ), 'description' => esc_html__( 'Whether to display the publisher.', 'minimalistflex' ),
'choices' => Array( 'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ), 'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_date', Array( $wp_customize -> add_control( 'minimalistflex_interface_date', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 40, 'priority' => 40,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Publish Date', 'minimalistflex' ), 'label' => esc_html__( 'Publish Date', 'minimalistflex' ),
'description' => __( 'Whether to display the published date.', 'minimalistflex' ), 'description' => esc_html__( 'Whether to display the published date.', 'minimalistflex' ),
'choices' => Array( 'choices' => Array(
'publish' => __( 'Yes, publish time only.', 'minimalistflex' ), 'publish' => esc_html__( 'Yes, publish time only.', 'minimalistflex' ),
'modify' => __( 'Yes, and display modified time if possible.', 'minimalistflex' ), 'modify' => esc_html__( 'Yes, and display modified time if possible.', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ) 'no' => esc_html__( 'No', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_readlink', Array( $wp_customize -> add_control( 'minimalistflex_interface_readlink', Array(
'type' => 'text', 'type' => 'text',
'priority' => 45, 'priority' => 45,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Read More Link', 'minimalistflex' ), 'label' => esc_html__( 'Read More Link', 'minimalistflex' ),
'description' => __( 'The text for the "Read More" links.', 'minimalistflex' ) 'description' => esc_html__( 'The text for the "Read More" links.', 'minimalistflex' )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height', Array( $wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 50, 'priority' => 50,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Thumbnail Images Size', 'minimalistflex' ), 'label' => esc_html__( 'Thumbnail Images Size', 'minimalistflex' ),
'description' => __( 'Select whether to enable flexible height for your thumbnail images, or use a fixed height.', 'minimalistflex' ), 'description' => esc_html__( 'Select whether to enable flexible height for your thumbnail images, or use a fixed height.', 'minimalistflex' ),
'choices' => Array( 'choices' => Array(
'fixed' => __( 'Fixed', 'minimalistflex' ), 'fixed' => esc_html__( 'Fixed', 'minimalistflex' ),
'auto' => __( 'Flexible', 'minimalistflex' ) 'auto' => esc_html__( 'Flexible', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height_px', Array( $wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height_px', Array(
'type' => 'number', 'type' => 'number',
'priority' => 51, 'priority' => 51,
'section' => 'minimalistflex_interface', 'section' => 'minimalistflex_interface',
'label' => __( 'Height', 'minimalistflex' ), 'label' => esc_html__( 'Height', 'minimalistflex' ),
'description' => __( 'Enter your desired height here. Should be in pixels.', 'minimalistflex' ), 'description' => esc_html__( 'Enter your desired height here. Should be in pixels.', 'minimalistflex' ),
) ); ) );
$wp_customize -> add_control( 'minimalistflex_footer_type', Array( $wp_customize -> add_control( 'minimalistflex_footer_type', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 9, 'priority' => 9,
'section' => 'minimalistflex_footer', 'section' => 'minimalistflex_footer',
'label' => __( 'Footer Options', 'minimalistflex' ), 'label' => esc_html__( 'Footer Options', 'minimalistflex' ),
'description' => __( 'Choose what to display in your footer credit section.', 'minimalistflex' ), 'description' => esc_html__( 'Choose what to display in your footer credit section.', 'minimalistflex' ),
'choices' => Array( 'choices' => Array(
'both' => __( 'Both MinimalistFlex credits and custom footer text.', 'minimalistflex' ), 'both' => esc_html__( 'Both MinimalistFlex credits and custom footer text.', 'minimalistflex' ),
'minimalistflex' => __( 'MinimalistFlex credits only.', 'minimalistflex' ), 'minimalistflex' => esc_html__( 'MinimalistFlex credits only.', 'minimalistflex' ),
'custom' => __( 'Custom footer text only.', 'minimalistflex' ), 'custom' => esc_html__( 'Custom footer text only.', 'minimalistflex' ),
'none' => __( 'Neither.', 'minimalistflex' ) 'none' => esc_html__( 'Neither.', 'minimalistflex' )
) )
) ); ) );
$wp_customize -> add_control( new WP_Customize_Code_Editor_Control( $wp_customize, 'minimalistflex_footer_text', Array( $wp_customize -> add_control( new WP_Customize_Code_Editor_Control( $wp_customize, 'minimalistflex_footer_text', Array(
'code_type' => 'htmlmixed', 'code_type' => 'htmlmixed',
'priority' => 15, 'priority' => 15,
'section' => 'minimalistflex_footer', 'section' => 'minimalistflex_footer',
'label' => __( 'Custom Footer Text', 'minimalistflex' ), 'label' => esc_html__( 'Custom Footer Text', 'minimalistflex' ),
'description' => __( 'Here you may set a custom footer text to be displayed in the footer credits. HTML allowed.', '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( $wp_customize -> add_control( 'minimalistflex_footer_widget_layout', Array(
'type' => 'radio', 'type' => 'radio',
'priority' => 10, 'priority' => 10,
'section' => 'minimalistflex_footer', 'section' => 'minimalistflex_footer',
'label' => __( 'Footer Widget Layout', 'minimalistflex' ), 'label' => esc_html__( 'Footer Widget Layout', 'minimalistflex' ),
'description' => __( 'Choose the layout of the footer widgets.', 'minimalistflex' ), 'description' => esc_html__( 'Choose the layout of the footer widgets.', 'minimalistflex' ),
'choices' => Array( 'choices' => Array(
'one' => __( 'One column. Only shows the "Footer" widget area.', 'minimalistflex' ), 'one' => esc_html__( 'One column. Only shows the "Footer" widget area.', 'minimalistflex' ),
'two' => __( 'Two columns. Also shows the "Footer 2" widget area.', 'minimalistflex' ), 'two' => esc_html__( 'Two columns. Also shows the "Footer 2" widget area.', 'minimalistflex' ),
'three' => __( 'Three columns. Also shows the "Footer 3" widget area (aka all areas).', 'minimalistflex' ) 'three' => esc_html__( 'Three columns. Also shows the "Footer 3" widget area (aka all areas).', 'minimalistflex' )
) )
) ); ) );

View File

@ -42,8 +42,8 @@ jQuery(document).ready(function($){
wp.customize("minimalistflex_color_tint-contrast").set("#00281d") wp.customize("minimalistflex_color_tint-contrast").set("#00281d")
wp.customize("minimalistflex_color_contrast").set("#000000") wp.customize("minimalistflex_color_contrast").set("#000000")
wp.customize("minimalistflex_color_contrast-dark").set("#ffffff") wp.customize("minimalistflex_color_contrast-dark").set("#ffffff")
wp.customize("minimalistflex_color_footer-text").set("#ffffff") wp.customize("minimalistflex_color_footer-text").set("#000000")
wp.customize("minimalistflex_color_footer-bg").set("#333333") wp.customize("minimalistflex_color_footer-bg").set("#ffffff")
}) })
$("#minimalistflex-palette-dark").click(function(e){ $("#minimalistflex-palette-dark").click(function(e){
e.preventDefault() e.preventDefault()

View File

@ -2,14 +2,14 @@
# This file is distributed under the GNU General Public License v3.0 or later. # This file is distributed under the GNU General Public License v3.0 or later.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: MinimalistFlex 1.0.4\n" "Project-Id-Version: MinimalistFlex 1.0.5\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/minimalistflex\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/theme/minimalistflex\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-08-29T07:51:25+00:00\n" "POT-Creation-Date: 2024-09-14T13:34:32+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n" "X-Generator: WP-CLI 2.11.0\n"
"X-Domain: minimalistflex\n" "X-Domain: minimalistflex\n"
@ -112,6 +112,14 @@ msgstr ""
msgid "Theme <a href=\"%s\">MinimalistFlex</a>." msgid "Theme <a href=\"%s\">MinimalistFlex</a>."
msgstr "" msgstr ""
#: functions.php:37
msgid "An abstract default header image."
msgstr ""
#: functions.php:42
msgid "A default header image that contains three lines."
msgstr ""
#: functions.php:67 #: functions.php:67
msgctxt "sidebar name" msgctxt "sidebar name"
msgid "Main Sidebar" msgid "Main Sidebar"

Binary file not shown.

View File

@ -5,12 +5,13 @@
# SPDX-FileCopyrightText: 2024 SPDX-FileCopyrightText : # SPDX-FileCopyrightText: 2024 SPDX-FileCopyrightText :
# SPDX-FileCopyrightText: 2024 SPDX-FileCopyrightText : # SPDX-FileCopyrightText: 2024 SPDX-FileCopyrightText :
# SPDX-FileCopyrightText: 2024 SPDX-FileCopyrightText : # SPDX-FileCopyrightText: 2024 SPDX-FileCopyrightText :
# SPDX-FileCopyrightText: 2024 SPDX-FileCopyrightText :
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: MinimalistFlex 1.0.0\n" "Project-Id-Version: MinimalistFlex 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/minimalistflex\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/theme/minimalistflex\n"
"POT-Creation-Date: 2024-08-29T07:51:25+00:00\n" "POT-Creation-Date: 2024-09-14T13:34:32+00:00\n"
"PO-Revision-Date: 2024-08-29 15:52+0800\n" "PO-Revision-Date: 2024-09-14 21:35+0800\n"
"Last-Translator: 枫原万叶 <hufang2007@icloud.com>\n" "Last-Translator: 枫原万叶 <hufang2007@icloud.com>\n"
"Language-Team: Chinese <kde-i18n-doc@kde.org>\n" "Language-Team: Chinese <kde-i18n-doc@kde.org>\n"
"Language: zh_CN\n" "Language: zh_CN\n"
@ -132,6 +133,14 @@ msgstr "返回页首"
msgid "Theme <a href=\"%s\">MinimalistFlex</a>." msgid "Theme <a href=\"%s\">MinimalistFlex</a>."
msgstr "<a href=\"%s\">MinimalistFlex</a> 主题。" msgstr "<a href=\"%s\">MinimalistFlex</a> 主题。"
#: functions.php:37
msgid "An abstract default header image."
msgstr "一个抽象的页眉图片。"
#: functions.php:42
msgid "A default header image that contains three lines."
msgstr "一个包含了三条线段的页眉图片。"
#: functions.php:67 #: functions.php:67
msgctxt "sidebar name" msgctxt "sidebar name"
msgid "Main Sidebar" msgid "Main Sidebar"

View File

@ -28,6 +28,9 @@ fully responsive, and looks good on very small screens.
We also tried our best to make the theme as accessible as We also tried our best to make the theme as accessible as
possible. possible.
The MinimalistFlex WordPress theme, Copyright Frank419 2024.
MinimalistFlex is licensed under the terms of GNU General Public License, Version 3.0.
== Frequently Asked Quesions == == Frequently Asked Quesions ==
= How do I set default featured images? = = How do I set default featured images? =
@ -48,6 +51,13 @@ As a bonus, we have 4 pre-built color palettes for you.
== Changelog == == Changelog ==
= 1.1.1 =
* How would I forget the CodeSniffer checks? Anyways, fixed a security issue.
= 1.1 =
* A little bit new design, as well as fixed some visual issues.
* Fixed a bug where the "Below Content" widget area don't display properly.
= 1.0.5 = = 1.0.5 =
* Addressed a menu styling issue. * Addressed a menu styling issue.
* Fixed footer credit not being properly displayed. * Fixed footer credit not being properly displayed.

View File

@ -6,7 +6,7 @@ if ( !defined( 'WPINC' ) ) {
<?php if ( is_active_sidebar( 'below-content' ) ): ?> <?php if ( is_active_sidebar( 'below-content' ) ): ?>
<ul class="below-content-widgets"> <ul class="below-content-widgets">
<?php dynamic_sidebar( 'above-content' ); ?> <?php dynamic_sidebar( 'below-content' ); ?>
</ul> </ul>
<?php elseif ( user_can( get_current_user_id(), 'edit_theme_options' ) ): ?> <?php elseif ( user_can( get_current_user_id(), 'edit_theme_options' ) ): ?>
<ul class="below-content-widgets"> <ul class="below-content-widgets">

View File

@ -40,17 +40,21 @@ $mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_ima
</div> </div>
<?php endif; ?> <?php endif; ?>
<div class="singular-main"> <div class="singular-main">
<h1 class="panel-title"><?php the_title(); ?></h1> <div class="singular-post">
<?php get_template_part( 'templates/publisher' ) ?> <h1 class="panel-title"><?php the_title(); ?></h1>
<div class="panel-main"> <?php get_template_part( 'templates/publisher' ) ?>
<?php the_content(); ?> <div class="panel-main">
<?php wp_link_pages( Array( <?php the_content(); ?>
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __( 'Pages: ', 'minimalistflex' ) . '</span>' <?php wp_link_pages( Array(
) ); ?> 'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __( 'Pages: ', 'minimalistflex' ) . '</span>'
) ); ?>
</div>
</div> </div>
<?php get_sidebar( 'below-content' ) ?> <?php get_sidebar( 'below-content' ) ?>
<?php get_template_part( 'templates/author' ) ?> <div class="singular-card">
<?php get_template_part( 'templates/metadata' ) ?> <?php get_template_part( 'templates/author' ) ?>
<?php get_template_part( 'templates/metadata' ) ?>
</div>
</div> </div>
<?php if ( comments_open() || get_comments_number() ) : <?php if ( comments_open() || get_comments_number() ) :
comments_template(); comments_template();

206
style.css
View File

@ -1,7 +1,7 @@
/** /**
* Theme Name: MinimalistFlex * 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! * 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.0.5 * Version: 1.1.1
* Theme URI: https://github.com/onmyodev/MinimalistFlex/ * Theme URI: https://github.com/onmyodev/MinimalistFlex/
* Author: Frank419 * Author: Frank419
* Author URI: https://onmyodev.com/ * Author URI: https://onmyodev.com/
@ -78,27 +78,9 @@
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 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 { html {
scroll-behavior: smooth; scroll-behavior: smooth;
color: var(--minimalistflex-default);
} }
body { body {
@ -115,7 +97,7 @@ body.loading * {
body.custom-background .minimalistflex-content { body.custom-background .minimalistflex-content {
background-color: color-mix( background-color: color-mix(
in srgb, in srgb,
var(--minimalistflex-level1), var(--minimalistflex-level2),
transparent 50% transparent 50%
); );
} }
@ -123,7 +105,7 @@ body.custom-background .minimalistflex-content {
body.custom-background .minimalistflex-sidebar { body.custom-background .minimalistflex-sidebar {
background-color: color-mix( background-color: color-mix(
in srgb, in srgb,
var(--minimalistflex-level2), var(--minimalistflex-level1),
transparent 25% transparent 25%
); );
box-shadow: none; box-shadow: none;
@ -159,6 +141,7 @@ button:focus {
); );
border-radius: 3px; border-radius: 3px;
color: var(--minimalistflex-default); color: var(--minimalistflex-default);
padding: 1em !important;
} }
.warning::before { .warning::before {
@ -179,7 +162,7 @@ button:focus {
.minimalistflex-master kbd, .minimalistflex-master kbd,
.minimalistflex-master code, .minimalistflex-master code,
.minimalistflex-master pre { .minimalistflex-master pre {
font-family: Hack, 'Courier New', Courier, monospace; font-family: 'Courier New', Courier, monospace;
background-color: #111111; background-color: #111111;
color: #ffffff; color: #ffffff;
border-radius: 2px; border-radius: 2px;
@ -215,8 +198,8 @@ button:focus {
.minimalistflex-master table tbody tr:nth-child(2n) { .minimalistflex-master table tbody tr:nth-child(2n) {
background-color: color-mix( background-color: color-mix(
in srgb, in srgb,
#f0f0f0, var(--minimalistflex-header-sidebar),
transparent 25% transparent 50%
) )
} }
@ -477,7 +460,7 @@ button:focus {
.minimalistflex-content { .minimalistflex-content {
width: 67%; width: 67%;
background-color: var(--minimalistflex-level1); background-color: var(--minimalistflex-level2);
} }
.minimalistflex-master.minimalistflex-sidebar-layout-no .minimalistflex-content { .minimalistflex-master.minimalistflex-sidebar-layout-no .minimalistflex-content {
@ -486,8 +469,8 @@ button:focus {
.minimalistflex-sidebar { .minimalistflex-sidebar {
width: 33%; width: 33%;
background-color: var(--minimalistflex-level2); background-color: var(--minimalistflex-level1);
box-shadow: var(--minimalistflex-inset-shadow-light); box-shadow: var(--minimalistflex-card-shadow);
} }
.page-numbers, .page-numbers,
@ -496,11 +479,12 @@ button:focus {
margin: 10%; margin: 10%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 2px;
} }
.panel.sticky { .panel.sticky {
border-top: solid 3px var(--minimalistflex-tint); border-top: solid 3px var(--minimalistflex-tint);
padding-top: 2em; padding-top: 0;
} }
.panel.sticky:has(.panel-image) { .panel.sticky:has(.panel-image) {
@ -510,7 +494,7 @@ button:focus {
.panel.sticky::before { .panel.sticky::before {
content: var(--minimalistflex-featured); content: var(--minimalistflex-featured);
position: absolute; position: absolute;
top: 0; top: calc(-2em - 6px);
right: 1em; right: 1em;
padding: 0.5em 1em; padding: 0.5em 1em;
color: var(--minimalistflex-contrast); color: var(--minimalistflex-contrast);
@ -539,34 +523,36 @@ button:focus {
} }
.panel-content { .panel-content {
padding: 1em;
position: relative; position: relative;
background-color: var(--minimalistflex-level1);
box-shadow: var(--minimalistflex-card-shadow);
} }
.panel-comment-count { .panel-content > * {
position: absolute; padding: 1em;
right: 1em;
top: 1em;
font-size: 12px;
color: var(--minimalistflex-level3-dark);
} }
.panel-title { .panel-title {
padding: 0; padding: 16px;
margin: 0; margin: 0;
font-size: 32px; font-size: 32px;
font-weight: normal; font-weight: normal;
} }
.panel-main {
border-bottom: solid 1px var(--minimalistflex-shadow);
}
.panel-meta { .panel-meta {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: left;
background-color: var(--minimalistflex-level2);
line-height: 0;
border-top: solid 1px var(--minimalistflex-shadow);
border-bottom: solid 1px var(--minimalistflex-shadow);
font-size: 12px;
}
.panel-meta > * {
margin-right: 1em;
} }
.panel-author { .panel-author {
@ -583,21 +569,38 @@ a.panel-author:focus {
} }
.panel-meta .avatar { .panel-meta .avatar {
width: 40px; width: 2em;
height: 40px; height: 2em;
border-radius: 20px; border-radius: 2px;
margin: 1em; margin: 0;
margin-right: 1em;
box-shadow: var(--minimalistflex-card-shadow); box-shadow: var(--minimalistflex-card-shadow);
} }
.panel-meta span {
color: var(--minimalistflex-link);
}
.panel-comment-count a {
color: var(--minimalistflex-link);
}
.panel-comment-count a:hover {
color: var(--minimalistflex-link-hover);
}
.panel-link-container {
text-align: right;
}
.panel-link { .panel-link {
position: relative; position: relative;
display: inline-block; display: inline-block;
margin: 0; margin: 0;
color: var(--minimalistflex-default); color: var(--minimalistflex-default);
padding: 1em;
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
padding-right: 1em;
} }
.panel-link:hover, .panel-link:hover,
@ -638,7 +641,6 @@ a.panel-author:focus {
.post-nav-links { .post-nav-links {
flex-direction: row; flex-direction: row;
margin: 0; margin: 0;
margin-bottom: 1em;
padding: 0; padding: 0;
} }
@ -740,12 +742,12 @@ a.panel-author:focus {
top: calc(50% - 75px); top: calc(50% - 75px);
width: 150px; width: 150px;
height: 150px; height: 150px;
border-radius: 75px; border-radius: 2px;
} }
.author-page-avatar img { .author-page-avatar img {
margin: 0; margin: 0;
border-radius: 75px; border-radius: 2px;
box-shadow: var(--minimalistflex-card-shadow); box-shadow: var(--minimalistflex-card-shadow);
} }
@ -759,7 +761,7 @@ a.panel-author:focus {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
border-radius: 16px; border-radius: 2px;
padding: 0 1em; padding: 0 1em;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -784,12 +786,12 @@ a.panel-author:focus {
.singular-image { .singular-image {
display: block; display: block;
width: 70%; width: 80%;
height: var(--minimalistflex-max-height); height: var(--minimalistflex-max-height);
margin: 2em;
box-shadow: var(--minimalistflex-card-shadow); box-shadow: var(--minimalistflex-card-shadow);
border-radius: 2px; border-radius: 2px;
overflow: hidden; overflow: hidden;
line-height: 0;
} }
.singular-image > img { .singular-image > img {
@ -799,17 +801,31 @@ a.panel-author:focus {
} }
.singular-main { .singular-main {
width: 50%; margin: 10%;
padding: 2em; width: 80%;
line-height: 2em; line-height: 2em;
} }
.singular-post {
padding: 0;
box-shadow: var(--minimalistflex-card-shadow);
}
.singular-post > * {
padding: 2em;
background-color: var(--minimalistflex-level1);
}
.publisher { .publisher {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: left;
align-items: center; align-items: center;
padding: 1em; padding: 1em;
background-color: var(--minimalistflex-level2);
border-top: solid 1px var(--minimalistflex-shadow);
border-bottom: solid 1px var(--minimalistflex-shadow);
font-size: 12px;
} }
.publisher-link { .publisher-link {
@ -818,21 +834,31 @@ a.panel-author:focus {
align-items: center; align-items: center;
} }
.publisher > * {
margin-right: 1em;
}
.publisher-link img { .publisher-link img {
height: 2em; height: 2em;
width: 2em; width: 2em;
border-radius: 50%; border-radius: 2px;
box-shadow: var(--minimalistflex-card-shadow); box-shadow: var(--minimalistflex-card-shadow);
margin-right: 1em; margin: 0 1em 0 0 !important;
} }
.publisher-datetime { .publisher-datetime {
color: var(--minimalistflex-level3-dark); color: var(--minimalistflex-level3-dark);
} }
.singular-card {
box-shadow: var(--minimalistflex-card-shadow);
}
.singular-author { .singular-author {
padding: 1em; padding: 1em;
clear: both; clear: both;
background-color: var(--minimalistflex-level2);
border-bottom: solid 1px var(--minimalistflex-shadow);
} }
.author-card { .author-card {
@ -843,7 +869,7 @@ a.panel-author:focus {
} }
.author-avatar img { .author-avatar img {
border-radius: 50%; border-radius: 2px;
box-shadow: var(--minimalistflex-card-shadow); box-shadow: var(--minimalistflex-card-shadow);
} }
@ -867,6 +893,7 @@ a.author-link {
.singular-meta { .singular-meta {
padding: 1em; padding: 1em;
background-color: var(--minimalistflex-level1);
} }
.singular-categories { .singular-categories {
@ -905,10 +932,16 @@ a.author-link {
} }
.comments-area { .comments-area {
width: 70%; width: 80%;
margin-bottom: 4em; margin-bottom: 4em;
} }
.comment-respond {
background-color: var(--minimalistflex-level1);
box-shadow: var(--minimalistflex-card-shadow);
padding: 2em;
}
.comment-list { .comment-list {
padding: 0; padding: 0;
margin: 0; margin: 0;
@ -923,6 +956,29 @@ a.author-link {
.comment { .comment {
position: relative; position: relative;
background-color: var(--minimalistflex-level1);
box-shadow: var(--minimalistflex-card-shadow);
margin: 1em 0 1em 4em;
}
.comment-list .children .comment {
margin: 0 2em;
box-shadow: none;
}
.comment-list .children .children {
margin-left: -4.5em;
}
.comment .comment-respond {
box-shadow: none;
background-color: var(--minimalistflex-level2);
}
.comment .children .comment-respond {
margin-left: -5.5em;
margin-bottom: 2em;
width: calc(100% + 7.5em);
} }
.comment.bypostauthor { .comment.bypostauthor {
@ -958,6 +1014,19 @@ a.author-link {
text-decoration: none; text-decoration: none;
} }
.comment-edit-link {
position: relative;
padding-left: 1em;
}
.comment-edit-link::before {
position: absolute;
content: "\f464";
font-family: "Dashicons";
top: 1px;
left: 0;
}
.comment-body { .comment-body {
margin: 0; margin: 0;
padding: 2em; padding: 2em;
@ -966,10 +1035,12 @@ a.author-link {
.comment-author > .avatar { .comment-author > .avatar {
position: absolute; position: absolute;
top: -20px; top: 0;
left: -20px; left: -4em;
border-radius: 20px; margin: 0;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); border-radius: 2px;
box-shadow: var(--minimalistflex-card-shadow);
background-color: var(--minimalistflex-level1);
} }
.comment-form { .comment-form {
@ -1072,8 +1143,9 @@ p[class*=comment-form-] {
clear: both; clear: both;
} }
.panel.widget { .below-content-widgets {
padding: 1em; background-color: transparent;
box-shadow: none;
} }
.widget > * { .widget > * {

View File

@ -49,35 +49,19 @@ $mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_ima
</a> </a>
<?php endif; ?> <?php endif; ?>
<div class="panel-content"> <div class="panel-content">
<?php if ( get_theme_mod( 'minimalistflex_interface_comment_count', 'yes' ) === 'yes' ): ?> <h2 class="panel-title"><?php the_title(); ?></h2>
<div class="panel-comment-count">
<?php
printf(
/* translators: %d: Number of comments. */
esc_html( _nx(
'%d Comment',
'%d Comments',
get_comments_number(),
'comment count',
'minimalistflex'
) ),
esc_html( number_format_i18n( get_comments_number() ) )
);
?>
</div>
<?php endif; ?>
<h1 class="panel-title"><?php the_title(); ?></h1>
<div class="panel-main"> <div class="panel-main">
<?php the_excerpt(); ?> <?php the_excerpt(); ?>
<?php wp_link_pages( Array(
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . esc_html__('Pages: ', 'minimalistflex') . '</span></p>'
) ); ?>
</div> </div>
<?php wp_link_pages( Array(
'before' => '<div class="panel post-nav-links"><span class="post-nav-links-indicator">' . esc_html__('Pages: ', 'minimalistflex') . '</span>',
'after' => '</div>'
) ); ?>
<div class="panel-meta"> <div class="panel-meta">
<?php if ( get_theme_mod( 'minimalistflex_interface_publisher', 'yes' ) === 'yes' ): ?> <?php if ( get_theme_mod( 'minimalistflex_interface_publisher', 'yes' ) === 'yes' ): ?>
<a class="panel-author" href="<?php echo esc_url( get_author_posts_url($mf_id) ) ?>"> <a class="panel-author" href="<?php echo esc_url( get_author_posts_url($mf_id) ) ?>">
<span aria-hidden="true"><?php echo get_avatar( $mf_id, 80 ) ?></span> <span aria-hidden="true"><?php echo get_avatar( $mf_id, 80 ) ?></span>
<?php the_author() ?> <span><?php the_author() ?></span>
</a> </a>
<?php endif; ?> <?php endif; ?>
<?php $mf_datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?> <?php $mf_datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
@ -98,6 +82,27 @@ $mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_ima
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ( get_theme_mod( 'minimalistflex_interface_comment_count', 'yes' ) === 'yes' ): ?>
<div class="panel-comment-count">
<a href="<?php echo esc_url( get_comments_link() ) ?>">
<?php
printf(
/* translators: %d: Number of comments. */
esc_html( _nx(
'%d Comment',
'%d Comments',
get_comments_number(),
'comment count',
'minimalistflex'
) ),
esc_html( number_format_i18n( get_comments_number() ) )
);
?>
</a>
</div>
<?php endif; ?>
</div>
<div class="panel-link-container">
<a class="panel panel-link" href="<?php the_permalink(); ?>" aria-label="<?php <a class="panel panel-link" href="<?php the_permalink(); ?>" aria-label="<?php
printf( printf(
/* translators: %s: Post title. */ /* translators: %s: Post title. */

View File

@ -4,10 +4,12 @@ if ( !defined( 'WPINC' ) ) {
} }
?> ?>
<?php $mf_id = get_the_author_meta( 'ID' ); ?>
<div class="publisher"> <div class="publisher">
<a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($id) ) ?>"> <a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($mf_id) ) ?>">
<?php echo get_avatar( $id, 32 ) ?> <?php echo get_avatar( $mf_id, 32 ) ?>
<span><?php the_author() ?></span> <span><?php the_author() ?></span>
</a> </a>
<div class="publisher-datetime"> <div class="publisher-datetime">