Compare commits
No commits in common. "main" and "v1.0.1" have entirely different histories.
30
.github/workflows/add-zip-to-release.yml
vendored
30
.github/workflows/add-zip-to-release.yml
vendored
@ -1,30 +0,0 @@
|
||||
name: Generate Installable Plugin or Theme, and Upload as Release Asset
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
build:
|
||||
name: Upload Release Asset
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: setup git config
|
||||
run: |
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
- name: Create artifact
|
||||
run : |
|
||||
git archive -o minimalistflex-${{ github.ref_name }}.zip --prefix minimalistflex/ HEAD
|
||||
ls
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: minimalistflex-${{ github.ref_name }}
|
||||
path: minimalistflex-${{ github.ref_name }}.zip
|
||||
- name: Upload to release
|
||||
uses: JasonEtco/upload-to-release@master
|
||||
with:
|
||||
args: minimalistflex-${{ github.ref_name }}.zip application/zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
34
.github/workflows/cpcs.yml
vendored
34
.github/workflows/cpcs.yml
vendored
@ -1,34 +0,0 @@
|
||||
name: ClassicPress Directory Coding Standard checks.
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
phpcs:
|
||||
name: CPCS
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: CPCS get rules
|
||||
run: |
|
||||
wget -O phpcs.xml https://raw.githubusercontent.com/ClassicPress/ClassicPress-Coding-Standards/main/phpcs.xml
|
||||
sed -i '/^\t<!-- start config -->.*/a\
|
||||
<file>.</file>
|
||||
' phpcs.xml
|
||||
sed -i '/MY_DOMAIN/ s//minimalistflex/' phpcs.xml
|
||||
mv phpcs.xml phpcs.xml.dist
|
||||
- name: CPCS checks
|
||||
uses: 10up/wpcs-action@stable
|
||||
with:
|
||||
use_local_config: 'true'
|
||||
enable_warnings: 'true'
|
||||
extra_args: '--report-json=./phpcs.json'
|
||||
- name: Update summary
|
||||
run: |
|
||||
npm i -g github:10up/phpcs-json-to-md
|
||||
phpcs-json-to-md --path ./phpcs.json --output ./phpcs.md
|
||||
cat phpcs.md >> $GITHUB_STEP_SUMMARY
|
||||
if: always()
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
.git export-ignore
|
||||
.gitignore export-ignore
|
||||
.github export-ignore
|
||||
readme.txt export-ignore
|
||||
8
404.php
8
404.php
@ -8,11 +8,11 @@ if ( !defined( 'WPINC' ) ) {
|
||||
|
||||
<div class="singular">
|
||||
<div class="singular-main">
|
||||
<h1 class="404-title"><?php esc_html_e( 'You've reached the edge of the world.', 'minimalistflex' ) ?></h1>
|
||||
<p><?php esc_html_e( 'It looks like the page you are looking for doesn't exist.', 'minimalistflex' ) ?></p>
|
||||
<p><?php esc_html_e( 'What about a search?', 'minimalistflex' ) ?></p>
|
||||
<h1 class="404-title"><?php _e( 'You've reached the edge of the world.', 'minimalistflex' ) ?></h1>
|
||||
<p><?php _e( 'It looks like the page you are looking for doesn't exist.', 'minimalistflex' ) ?></p>
|
||||
<p><?php _e( 'What about a search?', 'minimalistflex' ) ?></p>
|
||||
<?php get_search_form() ?>
|
||||
<p><a href="javascript:history.go(-1)"><?php esc_html_e( 'Go back', 'minimalistflex' ) ?></a></p>
|
||||
<p><a href="javascript:history.go(-1)"><?php _e( 'Go back', 'minimalistflex' ) ?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
36
README.md
36
README.md
@ -19,9 +19,6 @@ fully responsive, and looks good on very small screens.
|
||||
We also tried our best to make the theme as accessible as
|
||||
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
|
||||
|
||||
### How do I set default featured images?
|
||||
@ -42,39 +39,8 @@ As a bonus, we have 4 pre-built color palettes for you.
|
||||
|
||||
## 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
|
||||
* Addressed a menu styling issue.
|
||||
* Fixed footer credit not being properly displayed.
|
||||
|
||||
### 1.0.4
|
||||
* Addressed a security issue where many places have not used proper escaping / no escaping at all.
|
||||
* Added correct styling for the main content without a sidebar.
|
||||
* Added correct singular placeholders.
|
||||
|
||||
### 1.0.3
|
||||
* Addressed an important issue where the menu items cannot be opened due to an improper usage of e.preventDefault().
|
||||
|
||||
### 1.0.2
|
||||
* Addressed keyboard navigation issues. Implemented a mechanism to trap focus within the open menu.
|
||||
* Added visual distinction for focused elements.
|
||||
* Added license information for images.
|
||||
* Fixed improper usage of esc_attr on URLs. Used esc_url instead.
|
||||
* Removed plugin functionality: Login / Logout.
|
||||
* Removed menu widget areas, for better accessibility.
|
||||
|
||||
### 1.0.1
|
||||
* Addressed clear float issues.
|
||||
|
||||
### 1.0.0
|
||||
* Initial release.
|
||||
|
||||
## Resources
|
||||
* screenshot.jpg, by Frank419, licensed under CC0 (https://creativecommons.org/publicdomain/zero/1.0/deed)
|
||||
* All images found in the /defaults folder, designed by Frank419 with Inkscape, licensed under CC0 (https://creativecommons.org/publicdomain/zero/1.0/deed)
|
||||
* Initial release.
|
||||
@ -8,7 +8,7 @@ if ( !defined( 'WPINC' ) ) {
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="minimalistflex-archive">
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_archive_title', 'yes' ) === 'yes' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_archive_title', 'yes' ) == 'yes' ): ?>
|
||||
<h1 class="archive-title panel">
|
||||
<?php the_archive_title() ?>
|
||||
</h1>
|
||||
|
||||
28
author.php
28
author.php
@ -8,42 +8,42 @@ if ( !defined( 'WPINC' ) ) {
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="minimalistflex-author">
|
||||
<?php $mf_id = get_the_author_meta( 'ID' ); ?>
|
||||
<?php $id = get_the_author_meta( 'ID' ); ?>
|
||||
<h1 class="author-title panel">
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_author_title', 'yes' ) === 'yes' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_author_title', 'yes' ) == 'yes' ): ?>
|
||||
<?php the_archive_title() ?>
|
||||
<?php endif; ?>
|
||||
<div class="author-page-avatar<?php if ( user_can( $mf_id, 'administrator' ) && get_theme_mod( 'minimalistflex_layout_author_admin', 'yes' ) === 'yes' ) {
|
||||
<div class="author-page-avatar<?php if ( user_can( $id, 'administrator' ) && get_theme_mod( 'minimalistflex_layout_author_admin', 'yes' ) == 'yes' ) {
|
||||
echo ' author-admin';
|
||||
} ?>" aria-hidden="true">
|
||||
<?php echo get_avatar( $mf_id, 150 ); ?>
|
||||
<?php echo get_avatar( $id, 150 ); ?>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="author-details">
|
||||
<?php
|
||||
$mf_titles = Array(
|
||||
$titles = Array(
|
||||
esc_html__( 'User description', 'minimalistflex' ),
|
||||
esc_html__( 'Registration time', 'minimalistflex' ),
|
||||
esc_html__( 'Website', 'minimalistflex' ),
|
||||
esc_html__( 'Email', 'minimalistflex' )
|
||||
);
|
||||
$mf_metas = Array(
|
||||
$metas = Array(
|
||||
'description',
|
||||
'user_registered',
|
||||
'user_url',
|
||||
'user_email'
|
||||
);
|
||||
$mf_i = 0;
|
||||
$i = 0;
|
||||
?>
|
||||
<?php while ( $mf_i < 4 ): ?>
|
||||
<?php $mf_meta = get_the_author_meta( $mf_metas[$mf_i] ); ?>
|
||||
<?php if ( strlen( $mf_meta ) && get_theme_mod( 'minimalistflex_layout_author_elements_' . $mf_metas[$mf_i], 'yes' ) === 'yes' ): ?>
|
||||
<?php while ( $i < count( $metas ) ): ?>
|
||||
<?php $meta = get_the_author_meta( $metas[$i] ); ?>
|
||||
<?php if ( strlen( $meta ) && get_theme_mod( 'minimalistflex_layout_author_elements_' . $metas[$i], 'yes' ) == 'yes' ): ?>
|
||||
<div class="author-detail">
|
||||
<h2><?php echo $mf_titles[$mf_i] // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></h2>
|
||||
<?php echo esc_html( $mf_meta ) ?>
|
||||
<h2><?php echo $titles[$i] ?></h2>
|
||||
<?php echo esc_html( $meta ) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php $mf_i++; ?>
|
||||
<?php $i++; ?>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<h2 class="author-page-all-posts-title">
|
||||
@ -51,7 +51,7 @@ if ( !defined( 'WPINC' ) ) {
|
||||
printf(
|
||||
/* translators: %s: The author display name. */
|
||||
esc_html__( 'All posts by %s', 'minimalistflex' ),
|
||||
esc_html( get_the_author_meta( 'display_name' ) )
|
||||
get_the_author_meta( 'display_name' )
|
||||
)
|
||||
?>
|
||||
</h2>
|
||||
|
||||
18
comments.php
18
comments.php
@ -16,15 +16,15 @@ if ( post_password_required() ) {
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %1$s: Number of comments. %2$s: Post title. */
|
||||
esc_html( _nx(
|
||||
'%1$s comment on "%2$s"',
|
||||
_nx(
|
||||
'One comment on "%2$s"',
|
||||
'%1$s comments on "%2$s"',
|
||||
get_comments_number(),
|
||||
'comments title',
|
||||
'minimalistflex'
|
||||
) ),
|
||||
esc_html( number_format_i18n( get_comments_number() ) ),
|
||||
'<span>' . esc_html( get_the_title() ) . '</span>'
|
||||
),
|
||||
number_format_i18n( get_comments_number() ),
|
||||
'<span>' . get_the_title() . '</span>'
|
||||
);
|
||||
?>
|
||||
</h2>
|
||||
@ -41,14 +41,14 @@ if ( post_password_required() ) {
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
|
||||
<nav class="nav-links navigation comment-navigation" role="navigation">
|
||||
<h1 class="screen-reader-text section-heading"><?php esc_html_e( 'Comment navigation', 'minimalistflex' ); ?></h1>
|
||||
<div class="previous"><?php previous_comments_link( esc_html__( '← Older Comments', 'minimalistflex' ) ); ?></div>
|
||||
<div class="next"><?php next_comments_link( esc_html__( 'Newer Comments →', 'minimalistflex' ) ); ?></div>
|
||||
<h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'minimalistflex' ); ?></h1>
|
||||
<div class="previous"><?php previous_comments_link( __( '← Older Comments', 'minimalistflex' ) ); ?></div>
|
||||
<div class="next"><?php next_comments_link( __( 'Newer Comments →', 'minimalistflex' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! comments_open() && get_comments_number() ) : ?>
|
||||
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'minimalistflex' ); ?></p>
|
||||
<p class="no-comments"><?php _e( 'Comments are closed.', 'minimalistflex' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
38
footer.php
38
footer.php
@ -9,24 +9,24 @@ if ( !defined( 'WPINC' ) ) {
|
||||
<?php
|
||||
|
||||
if( is_home() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
|
||||
} elseif ( is_front_page() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
|
||||
} elseif ( is_search() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
|
||||
} elseif ( is_archive() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
|
||||
} elseif( is_author() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
|
||||
} elseif( is_single() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
|
||||
} elseif( is_page() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( $mf_sidebar <> 'no' ): ?>
|
||||
<?php if ( $sidebar <> 'no' ): ?>
|
||||
<aside class="minimalistflex-sidebar">
|
||||
<?php get_sidebar(); ?>
|
||||
</aside>
|
||||
@ -35,20 +35,20 @@ if( is_home() ) {
|
||||
</main>
|
||||
|
||||
<ul class="minimalistflex-controls">
|
||||
<?php if ( get_theme_mod( 'minimalistflex_interface_scroll_top', 'yes' ) === 'yes' ): ?>
|
||||
<li><a href="#" aria-label="<?php esc_attr_e( 'Back to top', 'minimalistflex' ) ?>"><i class="dashicons dashicons-arrow-up-alt"></i></a></li>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_interface_scroll_top', 'yes' ) == 'yes' ): ?>
|
||||
<li><a href="#main-content" aria-label="<?php esc_attr_e( 'Back to top', 'minimalistflex' ) ?>">:D</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<footer class="minimalistflex-footer">
|
||||
<div class="minimalistflex-footer-widgets-container">
|
||||
<?php $mf_sidebars = get_theme_mod( 'minimalistflex_footer_widget_layout', 'one' ); ?>
|
||||
<?php $sidebars = get_theme_mod( 'minimalistflex_footer_widget_layout', 'one' ); ?>
|
||||
<?php
|
||||
get_sidebar( 'footer' );
|
||||
if ( $mf_sidebars === 'two' || $mf_sidebars === 'three' ) {
|
||||
if ( $sidebars == 'two' || $sidebars == 'three' ) {
|
||||
get_sidebar( 'footer-2' );
|
||||
}
|
||||
if ( $mf_sidebars === 'three' ) {
|
||||
if ( $sidebars == 'three' ) {
|
||||
get_sidebar( 'footer-3' );
|
||||
}
|
||||
?>
|
||||
@ -57,25 +57,25 @@ if( is_home() ) {
|
||||
<?php if ( display_header_text() ): ?>
|
||||
<div class="footer-blog-description">
|
||||
<div class="footer-blog-title">
|
||||
<a href="<?php echo esc_url( home_url() ); ?>" class="blog-title-link"><?php echo wp_kses_data( get_bloginfo( 'name' ) ) ?></a>
|
||||
<a href="<?php echo esc_url( home_url() ); ?>" class="blog-title-link"><?php echo get_bloginfo( 'name' ) ?></a>
|
||||
</div>
|
||||
<?php if( get_bloginfo( 'description' ) ): ?>
|
||||
<div class="footer-blog-tagline">
|
||||
<?php echo wp_kses_data( get_bloginfo( 'description' ) ) ?>
|
||||
<?php echo get_bloginfo( 'description' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="footer-credits">
|
||||
<?php $mf_footer_type = get_theme_mod( 'minimalistflex_footer_type', 'both' ); ?>
|
||||
<?php if ( $mf_footer_type === 'both' || $mf_footer_type === 'custom' ): ?>
|
||||
<?php $footer_type = get_theme_mod( 'minimalistflex_footer_type', 'both' ); ?>
|
||||
<?php if ( $footer_type == 'both' || $footer_type == 'custom' ): ?>
|
||||
<?php echo wp_kses_data( get_theme_mod( 'minimalistflex_footer_text' ) ) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ( $mf_footer_type === 'both' || $mf_footer_type === 'minimalistflex' ): ?>
|
||||
<?php if ( $footer_type == 'both' || $footer_type == 'minimalistflex' ): ?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Link to theme author website. */
|
||||
wp_kses_data( __( 'Theme <a href="%s">MinimalistFlex</a>.', 'minimalistflex' ) ),
|
||||
__( 'Theme <a href="%s">MinimalistFlex</a>.', 'minimalistflex' ),
|
||||
esc_url( 'https://onmyodev.com/' )
|
||||
)
|
||||
?>
|
||||
|
||||
@ -3,16 +3,9 @@ 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-image' => get_template_directory_uri() . '/defaults/bg.png',
|
||||
'default-position-x' => 'center',
|
||||
'default-position-y' => 'center',
|
||||
'default-size' => 'cover',
|
||||
@ -23,9 +16,7 @@ function minimalistflex_add_supports() {
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
add_theme_support( "align-wide" );
|
||||
add_theme_support( "post-thumbnails" );
|
||||
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( 'html5', Array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'style', 'script', 'navigation-widgets' ) );
|
||||
add_theme_support( 'custom-logo', Array(
|
||||
'width' => '80',
|
||||
'height' => '80'
|
||||
@ -43,12 +34,12 @@ function minimalistflex_add_supports() {
|
||||
'abstract' => Array(
|
||||
'url' => get_template_directory_uri() . '/defaults/header.png',
|
||||
'thumbnail_url' => get_template_directory_uri() . '/defaults/header.png',
|
||||
'description' => esc_html__( 'An abstract default header image.', 'minimalistflex' )
|
||||
'description' => 'An abstract default header image.'
|
||||
),
|
||||
'lines' => Array(
|
||||
'url' => get_template_directory_uri() . '/defaults/header2.png',
|
||||
'thumbnail_url' => get_template_directory_uri() . '/defaults/header2.png',
|
||||
'description' => esc_html__( 'A default header image that contains three lines.', 'minimalistflex' )
|
||||
'description' => 'A default header image that contains three lines.'
|
||||
)
|
||||
) );
|
||||
|
||||
@ -62,7 +53,6 @@ add_action( 'after_setup_theme', 'minimalistflex_add_supports' );
|
||||
function minimalistflex_enqueue_files() {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
wp_enqueue_style( 'style', get_stylesheet_uri() );
|
||||
wp_enqueue_style( 'dashicons' );
|
||||
wp_enqueue_script( 'minimalistflex-script', get_template_directory_uri() . '/js/menu.js', array('jquery'), null, true);
|
||||
if ( get_theme_mod( 'minimalistflex_interface_autoh2label', 'no' ) == 'yes' ) {
|
||||
wp_enqueue_style( 'minimalistflex-autoh2label-style', get_template_directory_uri() . '/css/autoh2label.css' );
|
||||
@ -72,6 +62,24 @@ function minimalistflex_enqueue_files() {
|
||||
add_action( 'wp_head', 'minimalistflex_enqueue_files' );
|
||||
|
||||
function minimalistflex_widgets_init() {
|
||||
register_sidebar( array(
|
||||
'name' => _x( 'Menu', 'sidebar name' , 'minimalistflex' ),
|
||||
'id' => 'menu',
|
||||
'description' => __( 'Widgets in this area will be shown at the right in the main navigation menu dropdown.', 'minimalistflex' ),
|
||||
'before_widget' => '<li id="%1$s" class="panel widget menu-widget %2$s">',
|
||||
'after_widget' => '</li>',
|
||||
'before_title' => '<h2 class="panel-title widget-title menu-widget-title">',
|
||||
'after_title' => '</h2>',
|
||||
) );
|
||||
register_sidebar( array(
|
||||
'name' => _x( 'Menu 2', 'sidebar name' , 'minimalistflex' ),
|
||||
'id' => 'menu-2',
|
||||
'description' => __( 'Widgets in this area will be shown at the middle in the main navigation menu dropdown. Will be hidden when submenu items were shown.', 'minimalistflex' ),
|
||||
'before_widget' => '<li id="%1$s" class="panel widget menu-2-widget %2$s">',
|
||||
'after_widget' => '</li>',
|
||||
'before_title' => '<h2 class="panel-title widget-title menu-2-widget-title">',
|
||||
'after_title' => '</h2>',
|
||||
) );
|
||||
register_sidebar( array(
|
||||
'name' => _x( 'Main Sidebar', 'sidebar name' , 'minimalistflex' ),
|
||||
'id' => 'main-sidebar',
|
||||
@ -139,13 +147,16 @@ 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' ) );
|
||||
}
|
||||
|
||||
81
header.php
81
header.php
@ -22,90 +22,101 @@ if ( function_exists( 'wp_body_open' ) ) {
|
||||
<?php
|
||||
|
||||
if( is_home() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
|
||||
$mf_header = get_theme_mod( 'minimalistflex_layout_home_header', 'yes' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
|
||||
$header = get_theme_mod( 'minimalistflex_layout_home_header', 'yes' );
|
||||
} elseif ( is_front_page() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
|
||||
$mf_header = get_theme_mod( 'minimalistflex_layout_front_header', 'yes' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
|
||||
$header = get_theme_mod( 'minimalistflex_layout_front_header', 'yes' );
|
||||
} elseif ( is_search() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
|
||||
$mf_header = get_theme_mod( 'minimalistflex_layout_search_header', 'yes' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
|
||||
$header = get_theme_mod( 'minimalistflex_layout_search_header', 'yes' );
|
||||
} elseif ( is_author() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
|
||||
$mf_header = get_theme_mod( 'minimalistflex_layout_author_header', 'yes' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
|
||||
$header = get_theme_mod( 'minimalistflex_layout_author_header', 'yes' );
|
||||
} elseif ( is_archive() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
|
||||
$mf_header = get_theme_mod( 'minimalistflex_layout_archive_header', 'yes' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
|
||||
$header = get_theme_mod( 'minimalistflex_layout_archive_header', 'yes' );
|
||||
} elseif ( is_single() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
|
||||
$mf_header = get_theme_mod( 'minimalistflex_layout_singular_header', 'yes' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
|
||||
$header = get_theme_mod( 'minimalistflex_layout_singular_header', 'yes' );
|
||||
} elseif ( is_page() ) {
|
||||
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
|
||||
$mf_header = get_theme_mod( 'minimalistflex_layout_page_header', 'yes' );
|
||||
$sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
|
||||
$header = get_theme_mod( 'minimalistflex_layout_page_header', 'yes' );
|
||||
}
|
||||
|
||||
$mf_link = get_theme_mod( 'minimalistflex_header_link' );
|
||||
$mf_label = get_theme_mod( 'minimalistflex_header_label' );
|
||||
$link = get_theme_mod( 'minimalistflex_header_link' );
|
||||
$label = get_theme_mod( 'minimalistflex_header_label' );
|
||||
|
||||
?>
|
||||
|
||||
<a class="screen-reader-text" href="#main-content"><?php esc_html_e( 'Skip to main content', 'minimalistflex' ) ?></a>
|
||||
|
||||
<?php if( get_header_image() && $mf_header === 'yes' ): ?>
|
||||
<?php if( get_header_image() && $header == 'yes' ): ?>
|
||||
<header class="minimalistflex-header-image">
|
||||
<?php if ( strlen( $mf_link ) ): ?>
|
||||
<a href="<?php echo esc_url( $mf_link ) ?>" aria-label="<?php
|
||||
if ( strlen( $mf_label ) ) {
|
||||
echo esc_attr( $mf_label );
|
||||
<?php if ( strlen( $link ) ): ?>
|
||||
<a href="<?php echo esc_url( $link ) ?>" aria-label="<?php
|
||||
if ( strlen( $label ) ) {
|
||||
echo esc_attr( $label );
|
||||
} else {
|
||||
esc_attr_e( 'The header image link.', 'minimalistflex' );
|
||||
}
|
||||
?>">
|
||||
<?php endif; ?>
|
||||
<img src="<?php header_image(); ?>" aria-label="<?php
|
||||
if ( strlen( $mf_label ) ) {
|
||||
if ( strlen( $label ) ) {
|
||||
printf(
|
||||
/* translators: %s: The label of the header image link. */
|
||||
esc_attr__( 'The image of the header image link to "%s".', 'minimalistflex' ),
|
||||
esc_attr( $mf_label )
|
||||
esc_attr( $label )
|
||||
);
|
||||
} else {
|
||||
esc_attr_e( 'The header image.', 'minimalistflex' );
|
||||
}
|
||||
?>">
|
||||
<?php if ( strlen( $mf_link ) ): ?>
|
||||
<?php if ( strlen( $link ) ): ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<header class="minimalistflex-header">
|
||||
<nav class="minimalistflex-header">
|
||||
<?php if ( has_custom_logo() ): ?>
|
||||
<?php echo get_custom_logo() // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo get_custom_logo(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ( display_header_text() ): ?>
|
||||
<h1 class="blog-title">
|
||||
<a href="<?php echo esc_url( home_url() ); ?>" class="blog-title-link"><?php echo wp_kses_data( get_bloginfo( 'name' ) ) ?></a>
|
||||
<a href="<?php echo esc_url( home_url() ); ?>" class="blog-title-link"><?php echo get_bloginfo( 'name' ) ?></a>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<div class="spacer"></div>
|
||||
<a id="minimalistflex-menu-focus-hack-2" href="#minimalistflex-menu-focus-hack-2" aria-label="<?php esc_attr_e( 'This element sends you to the last menu item.', 'minimalistflex' ) ?>"></a>
|
||||
<?php if ( has_nav_menu( 'main-menu' ) ): ?>
|
||||
<?php if ( has_nav_menu( 'main-menu' ) || is_active_sidebar( 'menu' ) || is_active_sidebar( 'menu-2' ) ): ?>
|
||||
<button id="menu-toggle" aria-label="<?php esc_attr_e( 'Toggle navigation dropdown', 'minimalistflex' ) ?>">
|
||||
<i id="menu-toggle-icon"></i>
|
||||
</button>
|
||||
<nav class="minimalistflex-menu">
|
||||
<?php endif; ?>
|
||||
<div class="minimalistflex-menu-container">
|
||||
<div class="minimalistflex-menu">
|
||||
<?php if ( has_nav_menu( 'main-menu' ) ): ?>
|
||||
<div id="minimalistflex-menu-nav-menu">
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
|
||||
<a id="minimalistflex-menu-focus-hack" href="#minimalistflex-menu-focus-hack" aria-label="<?php esc_attr_e( 'This element sends you back to the close menu button.', 'minimalistflex' ) ?>"></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
<div class="custom-menu-2" id="custom-menu-2">
|
||||
<a id="custom-menu-2-focus" href="#" aria-label="<?php esc_attr_e( 'Here goes the "Menu 2" widget area. This text does not trigger anything.', 'minimalistflex' ) ?>"></a>
|
||||
<div class="custom-menu-2-menu">
|
||||
<?php get_sidebar( 'menu-2' ) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( is_active_sidebar( 'menu' ) || user_can( get_current_user_id(), 'edit_theme_options' ) ): ?>
|
||||
<div class="menu-custom" id="menu-custom">
|
||||
<?php get_sidebar( 'menu' ) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="minimalistflex-master <?php echo 'minimalistflex-sidebar-layout-' . esc_attr( $mf_sidebar ) ?>">
|
||||
<main class="minimalistflex-master <?php echo 'minimalistflex-sidebar-layout-' . $sidebar ?>">
|
||||
|
||||
<article class="minimalistflex-content" id="main-content">
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class MinimalistFlex_Color_Palette_Custom_Control extends WP_Customize_Control
|
||||
public function enqueue()
|
||||
{
|
||||
wp_enqueue_style('color-palette-style', get_template_directory_uri().'/css/color-palette.css');
|
||||
wp_enqueue_script('color-palette-script', get_template_directory_uri().'/js/color-palette.js', array( 'jquery' ), null, true);
|
||||
wp_enqueue_script('color-palette-script', get_template_directory_uri().'/js/color-palette.js', array( 'jquery' ), rand(), true);
|
||||
}
|
||||
|
||||
public function render_content()
|
||||
|
||||
@ -17,7 +17,7 @@ class MinimalistFlex_Multi_Image_Custom_Control extends WP_Customize_Control
|
||||
{
|
||||
wp_enqueue_media();
|
||||
wp_enqueue_style('multi-image-style', get_template_directory_uri().'/css/multi-image.css');
|
||||
wp_enqueue_script('multi-image-script', get_template_directory_uri().'/js/multi-image.js', array( 'jquery' ), null, true);
|
||||
wp_enqueue_script('multi-image-script', get_template_directory_uri().'/js/multi-image.js', array( 'jquery' ), rand(), true);
|
||||
}
|
||||
|
||||
public function render_content()
|
||||
|
||||
@ -20,48 +20,48 @@ $colors = Array(
|
||||
'tint-contrast' => '#00281d',
|
||||
'contrast' => '#000000',
|
||||
'contrast-dark' => '#ffffff',
|
||||
'footer-text' => '#000000',
|
||||
'footer-bg' => '#ffffff'
|
||||
'footer-text' => '#ffffff',
|
||||
'footer-bg' => '#333333'
|
||||
);
|
||||
|
||||
$labels = Array(
|
||||
'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' )
|
||||
'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 Sidebar Background', 'minimalistflex' ),
|
||||
'header-text' => __( 'Navigation Menu', 'minimalistflex' )
|
||||
);
|
||||
|
||||
$desciprtions = Array(
|
||||
'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' )
|
||||
'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 sidebar of the navigation menu dropdown.', 'minimalistflex' ),
|
||||
'header-text' => __( 'The text color of the navigation menu dropdown.', 'minimalistflex' )
|
||||
);
|
||||
@ -5,23 +5,24 @@ if ( !defined( 'WPINC' ) ) {
|
||||
?>
|
||||
|
||||
<?php
|
||||
require 'color-definitions.php';
|
||||
require_once 'color-definitions.php';
|
||||
global $colors;
|
||||
?>
|
||||
|
||||
<style id="minimalistflex-color-css">
|
||||
<style>
|
||||
|
||||
:root {
|
||||
--minimalistflex-header: <?php
|
||||
$header_textcolor = get_header_textcolor();
|
||||
if ( preg_match( '/#/', $header_textcolor ) ) {
|
||||
echo esc_html( $header_textcolor );
|
||||
echo $header_textcolor;
|
||||
} else {
|
||||
echo esc_html( '#' . $header_textcolor );
|
||||
echo '#' . $header_textcolor;
|
||||
}
|
||||
?>;
|
||||
<?php $color_keys = array_keys( $colors ); ?>
|
||||
<?php foreach( $color_keys as $color_key ): ?>
|
||||
--minimalistflex-<?php echo esc_html( $color_key ) ?>: <?php echo esc_html( get_theme_mod( 'minimalistflex_color_' . $color_key, $colors[$color_key] ) ); ?>;
|
||||
--minimalistflex-<?php echo $color_key; ?>: <?php echo esc_html( get_theme_mod( 'minimalistflex_color_' . $color_key, $colors[$color_key] ) ); ?>;
|
||||
<?php endforeach; ?>
|
||||
--minimalistflex-max-height: <?php
|
||||
if ( get_theme_mod( 'minimalistflex_interface_thumbnail_height', 'flexible' ) === 'fixed' ) {
|
||||
@ -30,12 +31,12 @@ if ( !defined( 'WPINC' ) ) {
|
||||
echo esc_html( 'auto;' );
|
||||
}
|
||||
?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_color_disable_shadow', 'no' ) === 'yes' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_color_disable_shadow', 'no' ) == 'yes' ): ?>
|
||||
--minimalistflex-shadow: transparent;
|
||||
--minimalistflex-shadow-light: transparent;
|
||||
<?php else: ?>
|
||||
--minimalistflex-shadow: rgba(0, 0, 0, 0.19);
|
||||
--minimalistflex-shadow-light: rgba(0, 0, 0, 0.05);
|
||||
--minimalistflex-shadow-light: rgba(200, 200, 200, 0.19);
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
|
||||
@ -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' => 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' ),
|
||||
'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' ),
|
||||
'priority' => 50,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
@ -41,43 +41,42 @@ 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' => 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' ),
|
||||
'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' ),
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_default_featured_image',
|
||||
'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_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_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' => esc_html__( 'Location', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'You may decide if and where should the default image show.', 'minimalistflex' ),
|
||||
'label' => __( 'Location', 'minimalistflex' ),
|
||||
'description' => __( 'You may decide if and where should the default image show.', 'minimalistflex' ),
|
||||
'type' => 'radio',
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_default_featured_image',
|
||||
'choices' => Array(
|
||||
'both' => esc_html__( 'Always', 'minimalistflex' ),
|
||||
'archive' => esc_html__( 'Archive Page Only', 'minimalistflex' ),
|
||||
'single' => esc_html__( 'Single Page Only', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'Never', 'minimalistflex' )
|
||||
'both' => __( 'Always', 'minimalistflex' ),
|
||||
'archive' => __( 'Archive Page Only', 'minimalistflex' ),
|
||||
'single' => __( 'Single Page Only', 'minimalistflex' ),
|
||||
'no' => __( 'Never', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_default_featured_images_first_image', Array(
|
||||
'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' ),
|
||||
'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' ),
|
||||
'type' => 'radio',
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_default_featured_image',
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' ),
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( '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(
|
||||
@ -86,11 +85,14 @@ 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' => 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' ),
|
||||
'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' ),
|
||||
'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(
|
||||
@ -115,27 +117,29 @@ function minimalistflex_customize_color_register( $wp_customize ) {
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_color_disable_shadow', Array(
|
||||
'type' => 'radio',
|
||||
'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' ),
|
||||
'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' ),
|
||||
'priority' => 2,
|
||||
'section' => 'colors',
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', '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' );
|
||||
$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' );
|
||||
}
|
||||
|
||||
$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 ) {
|
||||
$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' )
|
||||
);
|
||||
global $metadatas;
|
||||
|
||||
$metadata_keys = array_keys( $metadatas );
|
||||
foreach( $metadata_keys as $metadata_key ) {
|
||||
@ -151,12 +155,12 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
|
||||
'type' => 'radio',
|
||||
'priority' => 45,
|
||||
'capability' => 'edit_theme_options',
|
||||
'label' => esc_html__( 'Metadatas', 'minimalistflex' ),
|
||||
'label' => __( 'Metadatas', 'minimalistflex' ),
|
||||
'description' => $metadatas[$metadata_key],
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
} else {
|
||||
@ -167,8 +171,8 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
|
||||
'description' => $metadatas[$metadata_key],
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
}
|
||||
@ -176,10 +180,11 @@ 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' => esc_html__( 'Here you may configure how different pages on your site looks like.', 'minimalistflex' ),
|
||||
'description' => __( 'Here you may configure how different pages on your site looks like.', 'minimalistflex' ),
|
||||
'priority' => 70,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
@ -187,62 +192,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' => esc_html__( 'Here you may customize the layout of your blog page.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Here you may customize the layout of your front page. Only takes effect when using a static front page.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Here you may customize the layout of your archive pages.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Here you may customize the layout of your search result pages.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Here you may customize the layout of your author pages.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Here you may customize the layout of your posts.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Here you may customize the layout of your pages.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'You may customize your site\'s interface and the elements displayed here.', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'You may customize how your footer looks like here.', 'minimalistflex' ),
|
||||
'description' => __( 'You may customize how your footer looks like here.', 'minimalistflex' ),
|
||||
'priority' => 140,
|
||||
'capability' => 'edit_theme_options'
|
||||
) );
|
||||
@ -439,7 +444,7 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'type' => 'theme_mod',
|
||||
'capability' => 'edit_theme_options',
|
||||
'transport' => 'refresh',
|
||||
'default' => esc_html__( 'Read More', 'minimalistflex' ),
|
||||
'default' => __( 'Read More', 'minimalistflex' ),
|
||||
'sanitize_callback' => 'esc_html'
|
||||
) );
|
||||
$wp_customize -> add_setting( 'minimalistflex_interface_thumbnail_height', Array(
|
||||
@ -459,20 +464,20 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'capability' => 'edit_theme_options',
|
||||
'transport' => 'refresh',
|
||||
'default' => 'both',
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_callback'
|
||||
) );
|
||||
$wp_customize -> add_setting( 'minimalistflex_footer_text', Array(
|
||||
'type' => 'theme_mod',
|
||||
'capability' => 'edit_theme_options',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'wp_kses_data'
|
||||
'sanitize_callback' => 'wp_filter_post_kses'
|
||||
) );
|
||||
$wp_customize -> add_setting( 'minimalistflex_footer_widget_layout', Array(
|
||||
'type' => 'theme_mod',
|
||||
'capability' => 'edit_theme_options',
|
||||
'transport' => 'refresh',
|
||||
'default' => 'one',
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
|
||||
'sanitize_callback' => 'minimalistflex_sanitize_radio_callback'
|
||||
) );
|
||||
|
||||
// Start binding controls (UI).
|
||||
@ -480,26 +485,26 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'type' => 'url',
|
||||
'priority' => 50,
|
||||
'section' => 'header_image',
|
||||
'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' )
|
||||
'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' )
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_header_label', Array(
|
||||
'type' => 'text',
|
||||
'priority' => 40,
|
||||
'section' => 'header_image',
|
||||
'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' )
|
||||
'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' )
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_home_sidebar', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_home',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_home_header', Array(
|
||||
@ -507,10 +512,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_home',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_front_sidebar', Array(
|
||||
@ -518,11 +523,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_front',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_front_header', Array(
|
||||
@ -530,10 +535,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_front',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_archive_sidebar', Array(
|
||||
@ -541,11 +546,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_archive',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_archive_header', Array(
|
||||
@ -553,10 +558,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_archive',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_archive_title', Array(
|
||||
@ -564,10 +569,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_archive',
|
||||
'label' => _x( 'Title', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the archive title.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the archive title.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_sidebar', Array(
|
||||
@ -575,11 +580,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_header', Array(
|
||||
@ -587,10 +592,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_title', Array(
|
||||
@ -598,10 +603,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Search Query', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the search query.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the search query.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_search_form', Array(
|
||||
@ -609,10 +614,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_search',
|
||||
'label' => _x( 'Search Form', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to also display the search form.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to also display the search form.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_sidebar', Array(
|
||||
@ -620,11 +625,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_header', Array(
|
||||
@ -632,10 +637,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_title', Array(
|
||||
@ -643,10 +648,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Author Name', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the author name.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the author name.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_author_admin', Array(
|
||||
@ -654,10 +659,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 40,
|
||||
'section' => 'minimalistflex_layout_author',
|
||||
'label' => _x( 'Admin Status', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Show an indicator in the bottom-right of the avatar if the author is an admin.', 'minimalistflex' ),
|
||||
'description' => __( 'Show an indicator in the bottom-right of the avatar if the author is an admin.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_singular_sidebar', Array(
|
||||
@ -665,11 +670,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_singular',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_singular_header', Array(
|
||||
@ -677,10 +682,10 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_singular',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_page_sidebar', Array(
|
||||
@ -688,11 +693,11 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_layout_page',
|
||||
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'left' => __( 'Left sidebar', 'minimalistflex' ),
|
||||
'right' => __( 'Right sidebar', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_layout_page_header', Array(
|
||||
@ -700,130 +705,130 @@ function minimalistflex_customize_register( $wp_customize ) {
|
||||
'priority' => 15,
|
||||
'section' => 'minimalistflex_layout_page',
|
||||
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_scroll_top', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 10,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'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' ),
|
||||
'label' => __( 'Scroll to top button', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display a "Scroll to top" button in the bottom-right corner.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_excerpt', Array(
|
||||
'type' => 'number',
|
||||
'priority' => 20,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'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' )
|
||||
'label' => __( 'Excerpt Word Count', 'minimalistflex' ),
|
||||
'description' => __( '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' => 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' ),
|
||||
'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' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_comment_count', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 30,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => esc_html__( 'Comment Count', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ),
|
||||
'label' => __( 'Comment Count', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_publisher', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 35,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => esc_html__( 'Publisher', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Whether to display the publisher.', 'minimalistflex' ),
|
||||
'label' => __( 'Publisher', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display the publisher.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'yes' => __( 'Yes', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_date', Array(
|
||||
'type' => 'radio',
|
||||
'priority' => 40,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => esc_html__( 'Publish Date', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Whether to display the published date.', 'minimalistflex' ),
|
||||
'label' => __( 'Publish Date', 'minimalistflex' ),
|
||||
'description' => __( 'Whether to display the published date.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'publish' => esc_html__( 'Yes, publish time only.', 'minimalistflex' ),
|
||||
'modify' => esc_html__( 'Yes, and display modified time if possible.', 'minimalistflex' ),
|
||||
'no' => esc_html__( 'No', 'minimalistflex' )
|
||||
'publish' => __( 'Yes, publish time only.', 'minimalistflex' ),
|
||||
'modify' => __( 'Yes, and display modified time if possible.', 'minimalistflex' ),
|
||||
'no' => __( 'No', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_readlink', Array(
|
||||
'type' => 'text',
|
||||
'priority' => 45,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => esc_html__( 'Read More Link', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'The text for the "Read More" links.', 'minimalistflex' )
|
||||
'label' => __( 'Read More Link', 'minimalistflex' ),
|
||||
'description' => __( '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' => 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' ),
|
||||
'label' => __( 'Thumbnail Images Size', 'minimalistflex' ),
|
||||
'description' => __( 'Select whether to enable flexible height for your thumbnail images, or use a fixed height.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'fixed' => esc_html__( 'Fixed', 'minimalistflex' ),
|
||||
'auto' => esc_html__( 'Flexible', 'minimalistflex' )
|
||||
'fixed' => __( 'Fixed', 'minimalistflex' ),
|
||||
'auto' => __( 'Flexible', 'minimalistflex' )
|
||||
)
|
||||
) );
|
||||
$wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height_px', Array(
|
||||
'type' => 'number',
|
||||
'priority' => 51,
|
||||
'section' => 'minimalistflex_interface',
|
||||
'label' => esc_html__( 'Height', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Enter your desired height here. Should be in pixels.', 'minimalistflex' ),
|
||||
'label' => __( 'Height', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Footer Options', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Choose what to display in your footer credit section.', 'minimalistflex' ),
|
||||
'label' => __( 'Footer Options', 'minimalistflex' ),
|
||||
'description' => __( 'Choose what to display in your footer credit section.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'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' )
|
||||
'both' => __( 'Both MinimalistFlex credits and custom footer text.', 'minimalistflex' ),
|
||||
'minimalistflex' => __( 'MinimalistFlex credits only.', 'minimalistflex' ),
|
||||
'custom' => __( 'Custom footer text only.', 'minimalistflex' ),
|
||||
'none' => __( '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' => 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' )
|
||||
'label' => __( 'Custom Footer Text', 'minimalistflex' ),
|
||||
'description' => __( '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' => esc_html__( 'Footer Widget Layout', 'minimalistflex' ),
|
||||
'description' => esc_html__( 'Choose the layout of the footer widgets.', 'minimalistflex' ),
|
||||
'label' => __( 'Footer Widget Layout', 'minimalistflex' ),
|
||||
'description' => __( 'Choose the layout of the footer widgets.', 'minimalistflex' ),
|
||||
'choices' => Array(
|
||||
'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' )
|
||||
'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' )
|
||||
)
|
||||
) );
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
jQuery(document).ready(function($){
|
||||
$("#minimalistflex-palette-minimal").click(function(e){
|
||||
e.preventDefault()
|
||||
wp.customize("minimalistflex_color_disable_shadow").set("yes")
|
||||
wp.customize("minimalistflex_color_default").set("#000000")
|
||||
wp.customize("minimalistflex_color_level3-dark").set("#666666")
|
||||
wp.customize("minimalistflex_color_link").set("#004774")
|
||||
@ -24,7 +23,6 @@ jQuery(document).ready(function($){
|
||||
})
|
||||
$("#minimalistflex-palette-light").click(function(e){
|
||||
e.preventDefault()
|
||||
wp.customize("minimalistflex_color_disable_shadow").set("no")
|
||||
wp.customize("minimalistflex_color_default").set("#000000")
|
||||
wp.customize("minimalistflex_color_level3-dark").set("#666666")
|
||||
wp.customize("minimalistflex_color_link").set("#004774")
|
||||
@ -42,12 +40,11 @@ jQuery(document).ready(function($){
|
||||
wp.customize("minimalistflex_color_tint-contrast").set("#00281d")
|
||||
wp.customize("minimalistflex_color_contrast").set("#000000")
|
||||
wp.customize("minimalistflex_color_contrast-dark").set("#ffffff")
|
||||
wp.customize("minimalistflex_color_footer-text").set("#000000")
|
||||
wp.customize("minimalistflex_color_footer-bg").set("#ffffff")
|
||||
wp.customize("minimalistflex_color_footer-text").set("#ffffff")
|
||||
wp.customize("minimalistflex_color_footer-bg").set("#333333")
|
||||
})
|
||||
$("#minimalistflex-palette-dark").click(function(e){
|
||||
e.preventDefault()
|
||||
wp.customize("minimalistflex_color_disable_shadow").set("no")
|
||||
wp.customize("minimalistflex_color_default").set("#ffffff")
|
||||
wp.customize("minimalistflex_color_level3-dark").set("#c0c0c0")
|
||||
wp.customize("minimalistflex_color_link").set("#00cbff")
|
||||
@ -70,7 +67,6 @@ jQuery(document).ready(function($){
|
||||
})
|
||||
$("#minimalistflex-palette-galatic").click(function(e){
|
||||
e.preventDefault()
|
||||
wp.customize("minimalistflex_color_disable_shadow").set("no")
|
||||
wp.customize("minimalistflex_color_default").set("#000000")
|
||||
wp.customize("minimalistflex_color_level3-dark").set("#666666")
|
||||
wp.customize("minimalistflex_color_link").set("#3e2555")
|
||||
@ -79,10 +75,10 @@ jQuery(document).ready(function($){
|
||||
wp.customize("header_textcolor").set("#ffffff")
|
||||
wp.customize("minimalistflex_color_header-text").set("#ffffff")
|
||||
wp.customize("minimalistflex_color_header-menu").set("#3e2555")
|
||||
wp.customize("minimalistflex_color_header-sidebar").set("#4f2675")
|
||||
wp.customize("minimalistflex_color_header-sidebar").set("#663196")
|
||||
wp.customize("minimalistflex_color_level1").set("#e7d2fa")
|
||||
wp.customize("minimalistflex_color_level2").set("#d9c4f2")
|
||||
wp.customize("minimalistflex_color_tint").set("#d3a7f9")
|
||||
wp.customize("minimalistflex_color_tint").set("#e7d2fa")
|
||||
wp.customize("minimalistflex_color_tint-dark").set("#3e2555")
|
||||
wp.customize("minimalistflex_color_tint-alt").set("#20152a")
|
||||
wp.customize("minimalistflex_color_tint-contrast").set("#20152a")
|
||||
@ -93,7 +89,6 @@ jQuery(document).ready(function($){
|
||||
})
|
||||
$("#minimalistflex-palette-spring").click(function(e){
|
||||
e.preventDefault()
|
||||
wp.customize("minimalistflex_color_disable_shadow").set("no")
|
||||
wp.customize("minimalistflex_color_default").set("#000000")
|
||||
wp.customize("minimalistflex_color_level3-dark").set("#666666")
|
||||
wp.customize("minimalistflex_color_link").set("#355c33")
|
||||
|
||||
10
js/menu.js
10
js/menu.js
@ -7,14 +7,4 @@ jQuery(document).ready(function($){
|
||||
e.preventDefault()
|
||||
})
|
||||
$("body").removeClass("loading")
|
||||
$(".menu-item-has-children").click(function(){
|
||||
$(this).toggleClass("active")
|
||||
$(this).parent().parent().toggleClass("active")
|
||||
})
|
||||
$("#minimalistflex-menu-focus-hack").focus(function(){
|
||||
$("#menu-toggle").focus()
|
||||
})
|
||||
$("#minimalistflex-menu-focus-hack-2").focus(function(){
|
||||
$(".minimalistflex-menu").find(".menu-item:last").children("a").focus()
|
||||
})
|
||||
})
|
||||
@ -2,14 +2,14 @@
|
||||
# This file is distributed under the GNU General Public License v3.0 or later.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: MinimalistFlex 1.0.5\n"
|
||||
"Project-Id-Version: MinimalistFlex 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/minimalistflex\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"POT-Creation-Date: 2024-09-14T13:34:32+00:00\n"
|
||||
"POT-Creation-Date: 2024-08-19T23:54:44+00:00\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"X-Generator: WP-CLI 2.11.0\n"
|
||||
"X-Domain: minimalistflex\n"
|
||||
@ -19,11 +19,6 @@ msgstr ""
|
||||
msgid "MinimalistFlex"
|
||||
msgstr ""
|
||||
|
||||
#. Theme URI of the theme
|
||||
#: style.css
|
||||
msgid "https://github.com/onmyodev/MinimalistFlex/"
|
||||
msgstr ""
|
||||
|
||||
#. Description of the theme
|
||||
#: style.css
|
||||
msgid "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!"
|
||||
@ -81,7 +76,7 @@ msgstr ""
|
||||
#. translators: %1$s: Number of comments. %2$s: Post title.
|
||||
#: comments.php:19
|
||||
msgctxt "comments title"
|
||||
msgid "%1$s comment on \"%2$s\""
|
||||
msgid "One comment on \"%2$s\""
|
||||
msgid_plural "%1$s comments on \"%2$s\""
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
@ -99,7 +94,7 @@ msgid "Newer Comments →"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:51
|
||||
#: singular.php:58
|
||||
#: singular.php:52
|
||||
msgid "Comments are closed."
|
||||
msgstr ""
|
||||
|
||||
@ -112,69 +107,79 @@ msgstr ""
|
||||
msgid "Theme <a href=\"%s\">MinimalistFlex</a>."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:37
|
||||
msgid "An abstract default header image."
|
||||
#: functions.php:59
|
||||
msgctxt "sidebar name"
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:42
|
||||
msgid "A default header image that contains three lines."
|
||||
#: functions.php:61
|
||||
msgid "Widgets in this area will be shown at the right in the main navigation menu dropdown."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:67
|
||||
#: functions.php:68
|
||||
msgctxt "sidebar name"
|
||||
msgid "Menu 2"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:70
|
||||
msgid "Widgets in this area will be shown at the middle in the main navigation menu dropdown. Will be hidden when submenu items were shown."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:77
|
||||
msgctxt "sidebar name"
|
||||
msgid "Main Sidebar"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:69
|
||||
#: functions.php:79
|
||||
msgid "Widgets in this area will be shown on all posts and pages."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:76
|
||||
#: functions.php:86
|
||||
msgctxt "sidebar name"
|
||||
msgid "Above Content"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:78
|
||||
#: functions.php:88
|
||||
msgid "Widgets in this area will be shown above the main content."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:85
|
||||
#: functions.php:95
|
||||
msgctxt "sidebar name"
|
||||
msgid "Below Content"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:87
|
||||
#: functions.php:97
|
||||
msgid "Widgets in this area will be shown below the main content."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:94
|
||||
#: functions.php:104
|
||||
msgctxt "sidebar name"
|
||||
msgid "Footer"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:96
|
||||
#: functions.php:106
|
||||
msgid "Widgets in this area will be shown in the footer. Always shows."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:103
|
||||
#: functions.php:113
|
||||
msgctxt "sidebar name"
|
||||
msgid "Footer 2"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:105
|
||||
#: functions.php:115
|
||||
msgid "Widgets in this area will be shown in the footer to construct a multi column footer. Only shows when the footer is set to display it. Also twice as wide as other footer widget areas."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:112
|
||||
#: functions.php:122
|
||||
msgctxt "sidebar name"
|
||||
msgid "Footer 3"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:114
|
||||
#: functions.php:124
|
||||
msgid "Widgets in this area will be shown in the footer to construct a multi column footer. Only shows when the footer is set to display it."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:126
|
||||
#: functions.php:136
|
||||
msgid "Main Menu"
|
||||
msgstr ""
|
||||
|
||||
@ -195,16 +200,12 @@ msgstr ""
|
||||
msgid "The header image."
|
||||
msgstr ""
|
||||
|
||||
#: header.php:92
|
||||
msgid "This element sends you to the last menu item."
|
||||
msgstr ""
|
||||
|
||||
#: header.php:94
|
||||
#: header.php:93
|
||||
msgid "Toggle navigation dropdown"
|
||||
msgstr ""
|
||||
|
||||
#: header.php:101
|
||||
msgid "This element sends you back to the close menu button."
|
||||
#: header.php:105
|
||||
msgid "Here goes the \"Menu 2\" widget area. This text does not trigger anything."
|
||||
msgstr ""
|
||||
|
||||
#: includes/class-color-palette-control.php:35
|
||||
@ -305,7 +306,7 @@ msgid "Navigation Menu Background"
|
||||
msgstr ""
|
||||
|
||||
#: includes/color-definitions.php:44
|
||||
msgid "Navigation Menu Submenu Background"
|
||||
msgid "Navigation Menu Sidebar Background"
|
||||
msgstr ""
|
||||
|
||||
#: includes/color-definitions.php:45
|
||||
@ -377,7 +378,7 @@ msgid "The background color of the navigation menu dropdown."
|
||||
msgstr ""
|
||||
|
||||
#: includes/color-definitions.php:65
|
||||
msgid "The background color of the submenus of the navigation menu dropdown."
|
||||
msgid "The background color of the sidebar of the navigation menu dropdown."
|
||||
msgstr ""
|
||||
|
||||
#: includes/color-definitions.php:66
|
||||
@ -622,7 +623,7 @@ msgid "You may customize how your footer looks like here."
|
||||
msgstr ""
|
||||
|
||||
#: includes/customizer.php:447
|
||||
#: templates/loop.php:108
|
||||
#: templates/loop.php:96
|
||||
msgid "Read More"
|
||||
msgstr ""
|
||||
|
||||
@ -902,8 +903,8 @@ msgid "Admin"
|
||||
msgstr ""
|
||||
|
||||
#: page.php:24
|
||||
#: singular.php:48
|
||||
#: templates/loop.php:73
|
||||
#: singular.php:42
|
||||
#: templates/loop.php:66
|
||||
msgid "Pages: "
|
||||
msgstr ""
|
||||
|
||||
@ -930,6 +931,8 @@ msgstr ""
|
||||
#: sidebar-footer-2.php:14
|
||||
#: sidebar-footer-3.php:14
|
||||
#: sidebar-footer.php:14
|
||||
#: sidebar-menu-2.php:14
|
||||
#: sidebar-menu.php:17
|
||||
msgid "Sorry, but no widgets were found in this area."
|
||||
msgstr ""
|
||||
|
||||
@ -938,10 +941,22 @@ msgstr ""
|
||||
#: sidebar-footer-2.php:15
|
||||
#: sidebar-footer-3.php:15
|
||||
#: sidebar-footer.php:15
|
||||
#: sidebar-menu-2.php:15
|
||||
#: sidebar-menu.php:18
|
||||
#: sidebar.php:18
|
||||
msgid "This message is displayed to administrators only."
|
||||
msgstr ""
|
||||
|
||||
#: sidebar-menu.php:8
|
||||
#: sidebar-menu.php:14
|
||||
msgid "Go to the right of the navigation menu, which conntains an extra widget area."
|
||||
msgstr ""
|
||||
|
||||
#: sidebar-menu.php:12
|
||||
#: sidebar-menu.php:21
|
||||
msgid "Go to the left of the navigation menu, which is the menu and a menu widget area."
|
||||
msgstr ""
|
||||
|
||||
#: sidebar.php:15
|
||||
msgid "Sorry, but no widgets were found in this area. "
|
||||
msgstr ""
|
||||
@ -954,10 +969,13 @@ msgstr ""
|
||||
msgid "Archives"
|
||||
msgstr ""
|
||||
|
||||
#. translators: %s: Title of the post.
|
||||
#: singular.php:36
|
||||
#: templates/loop.php:45
|
||||
msgid "The thumbnail image for %s."
|
||||
#: sidebar.php:33
|
||||
msgid "Meta"
|
||||
msgstr ""
|
||||
|
||||
#: singular.php:33
|
||||
#: templates/loop.php:42
|
||||
msgid "The thumbnail image. This is a default image so that it's purely decorative."
|
||||
msgstr ""
|
||||
|
||||
#: templates/empty.php:3
|
||||
@ -966,36 +984,31 @@ msgstr ""
|
||||
|
||||
#. translators: %s: Post title associated with the thumbnail image.
|
||||
#: templates/loop.php:22
|
||||
#: templates/loop.php:39
|
||||
msgid "Thumbnail image of %s. Also a link that navigates to it."
|
||||
msgstr ""
|
||||
|
||||
#. translators: %s: Post title associated with the thumbnail image.
|
||||
#: templates/loop.php:39
|
||||
msgid "The thhumbnail image link for %s"
|
||||
msgstr ""
|
||||
|
||||
#. translators: %d: Number of comments.
|
||||
#: templates/loop.php:57
|
||||
#: templates/loop.php:50
|
||||
msgctxt "comment count"
|
||||
msgid "%d Comment"
|
||||
msgid "1 Comment"
|
||||
msgid_plural "%d Comments"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. translators: %s: Post publish time.
|
||||
#: templates/loop.php:89
|
||||
#: templates/loop.php:82
|
||||
#: templates/publisher.php:19
|
||||
msgid "Published on %s"
|
||||
msgstr ""
|
||||
|
||||
#. translators: %s: Post last modified time.
|
||||
#: templates/loop.php:95
|
||||
#: templates/loop.php:88
|
||||
#: templates/publisher.php:25
|
||||
msgid "Last modified on %s"
|
||||
msgstr ""
|
||||
|
||||
#. translators: %s: Post title.
|
||||
#: templates/loop.php:104
|
||||
#: templates/loop.php:102
|
||||
msgid "Read more of %s"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Binary file not shown.
@ -2,23 +2,19 @@
|
||||
# This file is distributed under the GNU General Public License v3.0 or later.
|
||||
# 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 ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: MinimalistFlex 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/minimalistflex\n"
|
||||
"POT-Creation-Date: 2024-09-14T13:34:32+00:00\n"
|
||||
"PO-Revision-Date: 2024-09-14 21:35+0800\n"
|
||||
"POT-Creation-Date: 2024-08-19T23:54:44+00:00\n"
|
||||
"PO-Revision-Date: 2024-08-20 07:55+0800\n"
|
||||
"Last-Translator: 枫原万叶 <hufang2007@icloud.com>\n"
|
||||
"Language-Team: Chinese <kde-i18n-doc@kde.org>\n"
|
||||
"Language: zh_CN\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"
|
||||
"X-Generator: Lokalize 24.08.0\n"
|
||||
"X-Generator: Lokalize 24.05.2\n"
|
||||
"X-Domain: crystal\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
@ -27,11 +23,6 @@ msgstr ""
|
||||
msgid "MinimalistFlex"
|
||||
msgstr "MinimalistFlex"
|
||||
|
||||
#. Theme URI of the theme
|
||||
#: style.css
|
||||
msgid "https://github.com/onmyodev/MinimalistFlex/"
|
||||
msgstr "https://github.com/onmyodev/MinimalistFlex/"
|
||||
|
||||
#. Description of the theme
|
||||
#: style.css
|
||||
msgid ""
|
||||
@ -104,7 +95,7 @@ msgstr "%s 的所有文章"
|
||||
#. translators: %1$s: Number of comments. %2$s: Post title.
|
||||
#: comments.php:19
|
||||
msgctxt "comments title"
|
||||
msgid "%1$s comment on \"%2$s\""
|
||||
msgid "One comment on \"%2$s\""
|
||||
msgid_plural "%1$s comments on \"%2$s\""
|
||||
msgstr[0] "「%2$s」上有 %1$s 条评论"
|
||||
|
||||
@ -120,7 +111,7 @@ msgstr "← 更早的评论"
|
||||
msgid "Newer Comments →"
|
||||
msgstr "更新的评论 →"
|
||||
|
||||
#: comments.php:51 singular.php:58
|
||||
#: comments.php:51 singular.php:52
|
||||
msgid "Comments are closed."
|
||||
msgstr "评论已关闭。"
|
||||
|
||||
@ -133,56 +124,72 @@ msgstr "返回页首"
|
||||
msgid "Theme <a href=\"%s\">MinimalistFlex</a>."
|
||||
msgstr "<a href=\"%s\">MinimalistFlex</a> 主题。"
|
||||
|
||||
#: functions.php:37
|
||||
msgid "An abstract default header image."
|
||||
msgstr "一个抽象的页眉图片。"
|
||||
#: functions.php:59
|
||||
msgctxt "sidebar name"
|
||||
msgid "Menu"
|
||||
msgstr "菜单"
|
||||
|
||||
#: functions.php:42
|
||||
msgid "A default header image that contains three lines."
|
||||
msgstr "一个包含了三条线段的页眉图片。"
|
||||
#: functions.php:61
|
||||
msgid ""
|
||||
"Widgets in this area will be shown at the right in the main navigation menu "
|
||||
"dropdown."
|
||||
msgstr "在此区域中的小工具将会显示在导航菜单下拉菜单的右侧。"
|
||||
|
||||
#: functions.php:67
|
||||
#: functions.php:68
|
||||
msgctxt "sidebar name"
|
||||
msgid "Menu 2"
|
||||
msgstr "菜单 2"
|
||||
|
||||
#: functions.php:70
|
||||
msgid ""
|
||||
"Widgets in this area will be shown at the middle in the main navigation menu "
|
||||
"dropdown. Will be hidden when submenu items were shown."
|
||||
msgstr ""
|
||||
"在此区域中的小工具将会显示在导航菜单下拉菜单的中间。当显示子菜单项时会自动隐"
|
||||
"藏。"
|
||||
|
||||
#: functions.php:77
|
||||
msgctxt "sidebar name"
|
||||
msgid "Main Sidebar"
|
||||
msgstr "主要侧栏"
|
||||
|
||||
#: functions.php:69
|
||||
#: functions.php:79
|
||||
msgid "Widgets in this area will be shown on all posts and pages."
|
||||
msgstr "在此区域中的小工具将会显示在所有的文章和页面中。"
|
||||
|
||||
#: functions.php:76
|
||||
#: functions.php:86
|
||||
msgctxt "sidebar name"
|
||||
msgid "Above Content"
|
||||
msgstr "主要内容上方"
|
||||
|
||||
#: functions.php:78
|
||||
#: functions.php:88
|
||||
msgid "Widgets in this area will be shown above the main content."
|
||||
msgstr "在此区域中的小工具将会显示在主要内容的上方。"
|
||||
|
||||
#: functions.php:85
|
||||
#: functions.php:95
|
||||
msgctxt "sidebar name"
|
||||
msgid "Below Content"
|
||||
msgstr "主要内容下方"
|
||||
|
||||
#: functions.php:87
|
||||
#: functions.php:97
|
||||
msgid "Widgets in this area will be shown below the main content."
|
||||
msgstr "在此区域中的小工具将会显示在主要内容的下方。"
|
||||
|
||||
#: functions.php:94
|
||||
#: functions.php:104
|
||||
msgctxt "sidebar name"
|
||||
msgid "Footer"
|
||||
msgstr "页脚"
|
||||
|
||||
#: functions.php:96
|
||||
#: functions.php:106
|
||||
msgid "Widgets in this area will be shown in the footer. Always shows."
|
||||
msgstr "在此区域中的小工具将会显示在页脚中。此小工具区域始终显示。"
|
||||
|
||||
#: functions.php:103
|
||||
#: functions.php:113
|
||||
msgctxt "sidebar name"
|
||||
msgid "Footer 2"
|
||||
msgstr "页脚 2"
|
||||
|
||||
#: functions.php:105
|
||||
#: functions.php:115
|
||||
msgid ""
|
||||
"Widgets in this area will be shown in the footer to construct a multi column "
|
||||
"footer. Only shows when the footer is set to display it. Also twice as wide "
|
||||
@ -191,12 +198,12 @@ msgstr ""
|
||||
"在此区域中的小工具将会在页脚中显示,以形成多栏布局。仅当被设置为显示时才会显"
|
||||
"示。宽度为其它页脚小工具区域的两倍。"
|
||||
|
||||
#: functions.php:112
|
||||
#: functions.php:122
|
||||
msgctxt "sidebar name"
|
||||
msgid "Footer 3"
|
||||
msgstr "页脚 3"
|
||||
|
||||
#: functions.php:114
|
||||
#: functions.php:124
|
||||
msgid ""
|
||||
"Widgets in this area will be shown in the footer to construct a multi column "
|
||||
"footer. Only shows when the footer is set to display it."
|
||||
@ -204,7 +211,7 @@ msgstr ""
|
||||
"在此区域中的小工具将会在页脚中显示,以形成多栏布局。仅当被设置为显示时才会显"
|
||||
"示。"
|
||||
|
||||
#: functions.php:126
|
||||
#: functions.php:136
|
||||
msgid "Main Menu"
|
||||
msgstr "主菜单"
|
||||
|
||||
@ -225,17 +232,14 @@ msgstr "页眉图片链接,此链接会转至「%s」。"
|
||||
msgid "The header image."
|
||||
msgstr "页眉图片。"
|
||||
|
||||
#: header.php:92
|
||||
msgid "This element sends you to the last menu item."
|
||||
msgstr "此元素将自动转至最后一个菜单项。"
|
||||
|
||||
#: header.php:94
|
||||
#: header.php:93
|
||||
msgid "Toggle navigation dropdown"
|
||||
msgstr "展开或收起导航菜单下拉菜单"
|
||||
|
||||
#: header.php:101
|
||||
msgid "This element sends you back to the close menu button."
|
||||
msgstr "此元素将自动转至关闭菜单按钮。"
|
||||
#: header.php:105
|
||||
msgid ""
|
||||
"Here goes the \"Menu 2\" widget area. This text does not trigger anything."
|
||||
msgstr "以下是「菜单 2」小工具中的小工具。此文本并不会链接到任何内容。"
|
||||
|
||||
#: includes/class-color-palette-control.php:35
|
||||
msgctxt "color palette"
|
||||
@ -308,7 +312,7 @@ msgstr "强调色 B"
|
||||
|
||||
#: includes/color-definitions.php:37
|
||||
msgid "Tint C"
|
||||
msgstr "强调色 C"
|
||||
msgstr "强调色 A"
|
||||
|
||||
#: includes/color-definitions.php:38
|
||||
msgid "Contrast (Light)"
|
||||
@ -335,8 +339,8 @@ msgid "Navigation Menu Background"
|
||||
msgstr "导航菜单背景"
|
||||
|
||||
#: includes/color-definitions.php:44
|
||||
msgid "Navigation Menu Submenu Background"
|
||||
msgstr "导航菜单子菜单背景"
|
||||
msgid "Navigation Menu Sidebar Background"
|
||||
msgstr "导航菜单侧边栏背景"
|
||||
|
||||
#: includes/color-definitions.php:45
|
||||
msgid "Navigation Menu"
|
||||
@ -407,8 +411,8 @@ msgid "The background color of the navigation menu dropdown."
|
||||
msgstr "导航菜单下拉菜单的背景色。"
|
||||
|
||||
#: includes/color-definitions.php:65
|
||||
msgid "The background color of the submenus of the navigation menu dropdown."
|
||||
msgstr "导航菜单下拉菜单的子菜单的背景颜色。"
|
||||
msgid "The background color of the sidebar of the navigation menu dropdown."
|
||||
msgstr "导航菜单下拉菜单的侧边栏的背景颜色。"
|
||||
|
||||
#: includes/color-definitions.php:66
|
||||
msgid "The text color of the navigation menu dropdown."
|
||||
@ -657,7 +661,7 @@ msgstr "页脚"
|
||||
msgid "You may customize how your footer looks like here."
|
||||
msgstr "您可以在此配置您站点的页脚。"
|
||||
|
||||
#: includes/customizer.php:447 templates/loop.php:108
|
||||
#: includes/customizer.php:447 templates/loop.php:96
|
||||
msgid "Read More"
|
||||
msgstr "阅读更多"
|
||||
|
||||
@ -937,7 +941,7 @@ msgstr "文章作者"
|
||||
msgid "Admin"
|
||||
msgstr "管理员"
|
||||
|
||||
#: page.php:24 singular.php:48 templates/loop.php:73
|
||||
#: page.php:24 singular.php:42 templates/loop.php:66
|
||||
msgid "Pages: "
|
||||
msgstr "页面:"
|
||||
|
||||
@ -961,15 +965,27 @@ msgstr "我们找不到您希望查找的内容。"
|
||||
|
||||
#: sidebar-above-content.php:14 sidebar-below-content.php:14
|
||||
#: sidebar-footer-2.php:14 sidebar-footer-3.php:14 sidebar-footer.php:14
|
||||
#: sidebar-menu-2.php:14 sidebar-menu.php:17
|
||||
msgid "Sorry, but no widgets were found in this area."
|
||||
msgstr "抱歉,但是在此区域中没有找到任何小工具。"
|
||||
|
||||
#: sidebar-above-content.php:15 sidebar-below-content.php:15
|
||||
#: sidebar-footer-2.php:15 sidebar-footer-3.php:15 sidebar-footer.php:15
|
||||
#: sidebar.php:18
|
||||
#: sidebar-menu-2.php:15 sidebar-menu.php:18 sidebar.php:18
|
||||
msgid "This message is displayed to administrators only."
|
||||
msgstr "此消息仅向管理员展示。"
|
||||
|
||||
#: sidebar-menu.php:8 sidebar-menu.php:14
|
||||
msgid ""
|
||||
"Go to the right of the navigation menu, which conntains an extra widget area."
|
||||
msgstr "将转至导航菜单的右侧,此区域包含额外的小工具区域。"
|
||||
|
||||
#: sidebar-menu.php:12 sidebar-menu.php:21
|
||||
msgid ""
|
||||
"Go to the left of the navigation menu, which is the menu and a menu widget "
|
||||
"area."
|
||||
msgstr "转到导航菜单的左侧,包含菜单和一个小工具区域。"
|
||||
|
||||
#: sidebar.php:15
|
||||
msgid "Sorry, but no widgets were found in this area. "
|
||||
msgstr "抱歉,但是在此区域中没有找到任何小工具。 "
|
||||
@ -982,44 +998,42 @@ msgstr "已显示一些默认的小工具。"
|
||||
msgid "Archives"
|
||||
msgstr "归档页"
|
||||
|
||||
#. translators: %s: Title of the post.
|
||||
#: singular.php:36 templates/loop.php:45
|
||||
msgid "The thumbnail image for %s."
|
||||
msgstr "%s 的特色图像"
|
||||
#: sidebar.php:33
|
||||
msgid "Meta"
|
||||
msgstr "快速链接"
|
||||
|
||||
#: singular.php:33 templates/loop.php:42
|
||||
msgid ""
|
||||
"The thumbnail image. This is a default image so that it's purely decorative."
|
||||
msgstr "特色图像。此图像为默认图像,其仅为装饰性的。"
|
||||
|
||||
#: templates/empty.php:3
|
||||
msgid "Sorry, but nothing was found at this place."
|
||||
msgstr "抱歉,但是在此区域中没有找到任何小工具。"
|
||||
|
||||
#. translators: %s: Post title associated with the thumbnail image.
|
||||
#: templates/loop.php:22
|
||||
#: templates/loop.php:22 templates/loop.php:39
|
||||
msgid "Thumbnail image of %s. Also a link that navigates to it."
|
||||
msgstr "文章 %s 的特色图片。此图片也将链接到对应的文章。"
|
||||
|
||||
#. translators: %s: Post title associated with the thumbnail image.
|
||||
#: templates/loop.php:39
|
||||
msgid "The thhumbnail image link for %s"
|
||||
msgstr "%s 的特色图片链接"
|
||||
|
||||
#. translators: %d: Number of comments.
|
||||
#: templates/loop.php:57
|
||||
#: templates/loop.php:50
|
||||
msgctxt "comment count"
|
||||
msgid "%d Comment"
|
||||
msgid "1 Comment"
|
||||
msgid_plural "%d Comments"
|
||||
msgstr[0] "%d 条评论"
|
||||
|
||||
#. translators: %s: Post publish time.
|
||||
#: templates/loop.php:89 templates/publisher.php:19
|
||||
#: templates/loop.php:82 templates/publisher.php:19
|
||||
msgid "Published on %s"
|
||||
msgstr "发表于 %s"
|
||||
|
||||
#. translators: %s: Post last modified time.
|
||||
#: templates/loop.php:95 templates/publisher.php:25
|
||||
#: templates/loop.php:88 templates/publisher.php:25
|
||||
msgid "Last modified on %s"
|
||||
msgstr "最后编辑于 %s"
|
||||
|
||||
#. translators: %s: Post title.
|
||||
#: templates/loop.php:104
|
||||
#: templates/loop.php:102
|
||||
msgid "Read more of %s"
|
||||
msgstr "阅读 %s 的更多内容"
|
||||
|
||||
|
||||
4
page.php
4
page.php
@ -8,7 +8,7 @@ if ( !defined( 'WPINC' ) ) {
|
||||
|
||||
<?php if ( have_posts() ) :
|
||||
the_post();
|
||||
$mf_id = get_the_ID();
|
||||
$id = get_the_ID();
|
||||
?>
|
||||
<div <?php post_class( "singular" ) ?>>
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
@ -31,4 +31,6 @@ if ( !defined( 'WPINC' ) ) {
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
32
readme.txt
32
readme.txt
@ -1,5 +1,5 @@
|
||||
=== MinimalistFlex ===
|
||||
Stable tag: 1.0.2
|
||||
Stable tag: 1.0.0
|
||||
Contributors: frank419
|
||||
Tags: two-columns ,left-sidebar, right-sidebar, custom-colors, custom-logo, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, sticky-post, theme-options, translation-ready, blog
|
||||
Tested up to: 6.6
|
||||
@ -28,9 +28,6 @@ fully responsive, and looks good on very small screens.
|
||||
We also tried our best to make the theme as accessible as
|
||||
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 ==
|
||||
|
||||
= How do I set default featured images? =
|
||||
@ -51,33 +48,6 @@ As a bonus, we have 4 pre-built color palettes for you.
|
||||
|
||||
== 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 =
|
||||
* Addressed a menu styling issue.
|
||||
* Fixed footer credit not being properly displayed.
|
||||
|
||||
= 1.0.4 =
|
||||
* Addressed a security issue where many places have not used proper escaping / no escaping at all.
|
||||
* Added correct styling for the main content without a sidebar.
|
||||
* Added correct singular placeholders.
|
||||
|
||||
= 1.0.3 =
|
||||
* Addressed an important issue where the menu items cannot be opened due to an improper usage of e.preventDefault().
|
||||
|
||||
= 1.0.2 =
|
||||
* Addressed keyboard navigation issues. Implemented a mechanism to trap focus within the open menu.
|
||||
* Added visual distinction for focused elements.
|
||||
* Added license information for images.
|
||||
* Fixed improper usage of esc_attr on URLs. Used esc_url instead.
|
||||
* Removed plugin functionality: Login / Logout.
|
||||
* Removed menu widget areas, for better accessibility.
|
||||
|
||||
= 1.0.1 =
|
||||
* Addressed clear float issues.
|
||||
|
||||
|
||||
BIN
screenshot.jpg
BIN
screenshot.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 128 KiB |
12
search.php
12
search.php
@ -8,18 +8,18 @@ if ( !defined( 'WPINC' ) ) {
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="minimalistflex-search">
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_title', 'yes' ) === 'yes' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_title', 'yes' ) == 'yes' ): ?>
|
||||
<h1 class="search-title panel">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: The search query. */
|
||||
esc_html__( 'You have searched for: "%s"', 'minimalistflex' ),
|
||||
__( 'You have searched for: "%s"', 'minimalistflex' ),
|
||||
get_search_query()
|
||||
)
|
||||
?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_form', 'yes' ) === 'yes' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_form', 'yes' ) == 'yes' ): ?>
|
||||
<div class="search-form panel">
|
||||
<p>
|
||||
<?php esc_html_e( 'Not finding what you are looking at? You may refine your search below:', 'minimalistflex' ) ?>
|
||||
@ -32,18 +32,18 @@ if ( !defined( 'WPINC' ) ) {
|
||||
<?php the_posts_pagination(); ?>
|
||||
<?php else: ?>
|
||||
<div class="minimalistflex-search">
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_title', 'yes' ) === 'yes' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_title', 'yes' ) == 'yes' ): ?>
|
||||
<h1 class="search-title panel">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: The search query. */
|
||||
esc_html__( 'You have searched for: "%s"', 'minimalistflex' ),
|
||||
__( 'You have searched for: "%s"', 'minimalistflex' ),
|
||||
get_search_query()
|
||||
)
|
||||
?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_form', 'yes' ) === 'yes' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_layout_search_form', 'yes' ) == 'yes' ): ?>
|
||||
<div class="search-form panel">
|
||||
<p>
|
||||
<?php esc_html_e( 'We are unable to find anything with this query. Try refine your search below:', 'minimalistflex' ) ?>
|
||||
|
||||
@ -6,7 +6,7 @@ if ( !defined( 'WPINC' ) ) {
|
||||
|
||||
<?php if ( is_active_sidebar( 'below-content' ) ): ?>
|
||||
<ul class="below-content-widgets">
|
||||
<?php dynamic_sidebar( 'below-content' ); ?>
|
||||
<?php dynamic_sidebar( 'above-content' ); ?>
|
||||
</ul>
|
||||
<?php elseif ( user_can( get_current_user_id(), 'edit_theme_options' ) ): ?>
|
||||
<ul class="below-content-widgets">
|
||||
|
||||
18
sidebar-menu-2.php
Normal file
18
sidebar-menu-2.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if ( !defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'menu-2' ) ): ?>
|
||||
<ul class="menu-2-widgets">
|
||||
<?php dynamic_sidebar( 'menu-2' ); ?>
|
||||
</ul>
|
||||
<?php elseif ( user_can( get_current_user_id(), 'edit_theme_options' ) ): ?>
|
||||
<ul class="menu-2-widgets">
|
||||
<li class="panel widget menu-2-widget warning">
|
||||
<?php esc_html_e( 'Sorry, but no widgets were found in this area.', 'minimalistflex' ); ?>
|
||||
<?php esc_html_e( 'This message is displayed to administrators only.', 'minimalistflex' ); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
22
sidebar-menu.php
Normal file
22
sidebar-menu.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if ( !defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'menu' ) ): ?>
|
||||
<a id="minimalistflex-menu-goto-right" href="#menu-custom" aria-label="<?php esc_attr_e( 'Go to the right of the navigation menu, which conntains an extra widget area.', 'minimalistflex' ) ?>">></a>
|
||||
<ul class="menu-widgets">
|
||||
<?php dynamic_sidebar( 'menu' ); ?>
|
||||
</ul>
|
||||
<a id="minimalistflex-menu-goto-left" href="#minimalistflex-menu-nav-menu" aria-label="<?php esc_attr_e( 'Go to the left of the navigation menu, which is the menu and a menu widget area.', 'minimalistflex' ) ?>"><</a>
|
||||
<?php elseif ( user_can( get_current_user_id(), 'edit_theme_options' ) ): ?>
|
||||
<a id="minimalistflex-menu-goto-right" href="#menu-custom" aria-label="<?php esc_attr_e( 'Go to the right of the navigation menu, which conntains an extra widget area.', 'minimalistflex' ) ?>">></a>
|
||||
<ul class="menu-widgets">
|
||||
<li class="panel widget menu-widget warning">
|
||||
<?php esc_html_e( 'Sorry, but no widgets were found in this area.', 'minimalistflex' ); ?>
|
||||
<?php esc_html_e( 'This message is displayed to administrators only.', 'minimalistflex' ); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="minimalistflex-menu-goto-left" href="#minimalistflex-menu-nav-menu" aria-label="<?php esc_attr_e( 'Go to the left of the navigation menu, which is the menu and a menu widget area.', 'minimalistflex' ) ?>"><</a>
|
||||
<?php endif; ?>
|
||||
11
sidebar.php
11
sidebar.php
@ -23,10 +23,19 @@ if ( !defined( 'WPINC' ) ) {
|
||||
</li>
|
||||
|
||||
<li id="archives" class="panel widget">
|
||||
<h3 class="widget-title"><?php esc_html_e( 'Archives', 'minimalistflex' ); ?></h3>
|
||||
<h3 class="widget-title"><?php _e( 'Archives', 'minimalistflex' ); ?></h3>
|
||||
<ul>
|
||||
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="meta" class="panel widget">
|
||||
<h3 class="widget-title"><?php _e( 'Meta', 'minimalistflex' ); ?></h3>
|
||||
<ul>
|
||||
<?php wp_register(); ?>
|
||||
<li><?php wp_loginout(); ?></li>
|
||||
<?php wp_meta(); ?>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
48
singular.php
48
singular.php
@ -5,61 +5,51 @@ if ( !defined( 'WPINC' ) ) {
|
||||
?>
|
||||
|
||||
<?php
|
||||
$mf_default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
|
||||
$mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
|
||||
$default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
|
||||
$default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
|
||||
?>
|
||||
|
||||
<?php get_header(); ?>
|
||||
|
||||
<?php if ( have_posts() ) :
|
||||
the_post();
|
||||
$mf_id = get_the_author_meta( 'ID' );
|
||||
$id = get_the_author_meta( 'ID' );
|
||||
?>
|
||||
<div <?php post_class( "singular" ) ?>>
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
<div class="singular-image">
|
||||
<?php the_post_thumbnail( 'large' ); ?>
|
||||
</div>
|
||||
<?php elseif ( ( $mf_default_images[0] <> '' || minimalistflex_get_first_image() ) && $mf_default_image_location <> 'no' && $mf_default_image_location <> 'archive' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_default_featured_images_first_image', 'yes' ) === 'yes' && minimalistflex_get_first_image() ): ?>
|
||||
<?php $mf_imgsrc = minimalistflex_get_first_image(); ?>
|
||||
<?php elseif ( ( $default_images[0] <> '' || minimalistflex_get_first_image() ) && $default_image_location <> 'no' && $default_image_location <> 'archive' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_default_featured_images_first_image', 'yes' ) == 'yes' && minimalistflex_get_first_image() ): ?>
|
||||
<?php $imgsrc = minimalistflex_get_first_image(); ?>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
$mf_key = minimalistflex_get_seconds() % count($mf_default_images);
|
||||
$mf_imgsrc = $mf_default_images[$mf_key];
|
||||
$key = minimalistflex_get_seconds() % count($default_images);
|
||||
$imgsrc = $default_images[$key];
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<div class="singular-image">
|
||||
<img src="<?php echo esc_url( $mf_imgsrc ) ?>" aria-label="<?php
|
||||
printf(
|
||||
/* translators: %s: Title of the post. */
|
||||
esc_attr__( 'The thumbnail image for %s.', 'minimalistflex' ),
|
||||
esc_attr( get_the_title() )
|
||||
)
|
||||
?>">
|
||||
<img src="<?php echo esc_url( $imgsrc ) ?>" aria-label="<?php esc_attr_e( 'The thumbnail image. This is a default image so that it\'s purely decorative.', 'minimalistflex' ) ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="singular-main">
|
||||
<div class="singular-post">
|
||||
<h1 class="panel-title"><?php the_title(); ?></h1>
|
||||
<?php get_template_part( 'templates/publisher' ) ?>
|
||||
<div class="panel-main">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( Array(
|
||||
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __( 'Pages: ', 'minimalistflex' ) . '</span>'
|
||||
) ); ?>
|
||||
</div>
|
||||
<h1 class="panel-title"><?php the_title(); ?></h1>
|
||||
<?php get_template_part( 'templates/publisher' ) ?>
|
||||
<div class="panel-main">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( Array(
|
||||
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __('Pages: ', 'minimalistflex') . '</span>'
|
||||
) ); ?>
|
||||
</div>
|
||||
<?php get_sidebar( 'below-content' ) ?>
|
||||
<div class="singular-card">
|
||||
<?php get_template_part( 'templates/author' ) ?>
|
||||
<?php get_template_part( 'templates/metadata' ) ?>
|
||||
</div>
|
||||
<?php get_template_part( 'templates/author' ) ?>
|
||||
<?php get_template_part( 'templates/metadata' ) ?>
|
||||
</div>
|
||||
<?php if ( comments_open() || get_comments_number() ) :
|
||||
comments_template();
|
||||
else: ?>
|
||||
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'minimalistflex' ); ?></p>
|
||||
<p class="no-comments"><?php _e( 'Comments are closed.', 'minimalistflex' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
@ -4,14 +4,14 @@ if ( !defined( 'WPINC' ) ) {
|
||||
}
|
||||
?>
|
||||
|
||||
<?php $mf_userid = get_the_author_meta( 'ID' ) ?>
|
||||
<?php $userid = get_the_author_meta( 'ID' ) ?>
|
||||
<div class="singular-author">
|
||||
<div class="author-card">
|
||||
<div class="author-avatar">
|
||||
<?php echo get_avatar( $mf_userid, 80 ); ?>
|
||||
<?php echo get_avatar( $userid, 80 ); ?>
|
||||
</div>
|
||||
<div class="author-description">
|
||||
<a class="author-link" href="<?php echo esc_url( get_author_posts_url( $mf_userid ) ) ?>"><?php the_author() ?></a>
|
||||
<a class="author-link" href="<?php echo get_author_posts_url( $userid ) ?>"><?php the_author() ?></a>
|
||||
<p class="author-tagline"><?php the_author_meta( 'description' ) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -5,112 +5,104 @@ if ( !defined( 'WPINC' ) ) {
|
||||
?>
|
||||
|
||||
<?php
|
||||
$mf_default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
|
||||
$mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
|
||||
$default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
|
||||
$default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
|
||||
?>
|
||||
|
||||
<?php while ( have_posts() ) :
|
||||
the_post();
|
||||
$mf_id = get_the_author_meta('ID');
|
||||
$mf_post_id = get_the_ID();
|
||||
$id = get_the_author_meta('ID');
|
||||
$post_id = get_the_ID();
|
||||
?>
|
||||
<div <?php post_class("panel"); ?>>
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
<a class="panel-image" href="<?php the_permalink() ?>" aria-label="<?php
|
||||
printf(
|
||||
/* translators: %s: Post title associated with the thumbnail image. */
|
||||
esc_attr__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
|
||||
esc_attr( get_the_title() )
|
||||
__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
|
||||
get_the_title()
|
||||
) ?>">
|
||||
<?php the_post_thumbnail( 'large' ); ?>
|
||||
</a>
|
||||
<?php elseif ( ( $mf_default_images[0] <> '' || minimalistflex_get_first_image() ) && $mf_default_image_location <> 'no' && $mf_default_image_location <> 'single' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_default_featured_images_first_image', 'yes' ) === 'yes' && minimalistflex_get_first_image() ): ?>
|
||||
<?php $mf_imgsrc = minimalistflex_get_first_image(); ?>
|
||||
<?php elseif ( ( $default_images[0] <> '' || minimalistflex_get_first_image() ) && $default_image_location <> 'no' && $default_image_location <> 'single' ): ?>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_default_featured_images_first_image', 'yes' ) == 'yes' && minimalistflex_get_first_image() ): ?>
|
||||
<?php $imgsrc = minimalistflex_get_first_image(); ?>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
$mf_key = minimalistflex_get_seconds() % count($mf_default_images);
|
||||
$mf_imgsrc = $mf_default_images[$mf_key];
|
||||
$key = minimalistflex_get_seconds() % count($default_images);
|
||||
$imgsrc = $default_images[$key];
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<a class="panel-image" href="<?php the_permalink() ?>" aria-label="<?php
|
||||
printf(
|
||||
/* translators: %s: Post title associated with the thumbnail image. */
|
||||
esc_attr__( 'The thhumbnail image link for %s', 'minimalistflex' ),
|
||||
esc_attr( get_the_title() )
|
||||
__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
|
||||
get_the_title()
|
||||
) ?>">
|
||||
<img src="<?php echo esc_url( $mf_imgsrc );?>" aria-label="<?php
|
||||
printf(
|
||||
/* translators: %s: Title of the post. */
|
||||
esc_attr__( 'The thumbnail image for %s.', 'minimalistflex' ),
|
||||
esc_attr( get_the_title() )
|
||||
)
|
||||
?>">
|
||||
<img src="<?php echo esc_url( $imgsrc );?>" aria-label="<?php esc_attr_e( 'The thumbnail image. This is a default image so that it\'s purely decorative.', 'minimalistflex' ) ?>">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="panel-content">
|
||||
<h2 class="panel-title"><?php the_title(); ?></h2>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_interface_comment_count', 'yes' ) == 'yes' ): ?>
|
||||
<div class="panel-comment-count">
|
||||
<?php
|
||||
printf(
|
||||
_nx(
|
||||
'1 Comment',
|
||||
'%d Comments',
|
||||
get_comments_number(),
|
||||
'comment count',
|
||||
'minimalistflex'
|
||||
),
|
||||
number_format_i18n( get_comments_number() )
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<h1 class="panel-title"><?php the_title(); ?></h1>
|
||||
<div class="panel-main">
|
||||
<?php the_excerpt(); ?>
|
||||
<?php wp_link_pages( Array(
|
||||
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __('Pages: ', 'minimalistflex') . '</span>'
|
||||
) ); ?>
|
||||
</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">
|
||||
<?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) ) ?>">
|
||||
<span aria-hidden="true"><?php echo get_avatar( $mf_id, 80 ) ?></span>
|
||||
<span><?php the_author() ?></span>
|
||||
<?php if ( get_theme_mod( 'minimalistflex_interface_publisher', 'yes' ) == 'yes' ): ?>
|
||||
<a class="panel-author" href="<?php echo esc_url( get_author_posts_url($id) ) ?>">
|
||||
<span aria-hidden="true"><?php echo get_avatar( $id, 80 ) ?></span>
|
||||
<?php the_author() ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php $mf_datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
|
||||
<?php if ( $mf_datemode <> 'no' ): ?>
|
||||
<?php $datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
|
||||
<?php if ( $datemode <> 'no' ): ?>
|
||||
<div class="panel-author">
|
||||
<?php if ( $mf_datemode === 'publish' || get_the_modified_date() <> get_the_date() ): ?>
|
||||
<?php if ( $datemode == 'publish' || get_the_modified_date() <> get_the_date() ): ?>
|
||||
<?php printf(
|
||||
/* translators: %s: Post publish time. */
|
||||
esc_html__( 'Published on %s', 'minimalistflex' ),
|
||||
esc_html( get_the_date() )
|
||||
__( 'Published on %s', 'minimalistflex' ),
|
||||
get_the_date()
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?php printf(
|
||||
/* translators: %s: Post last modified time. */
|
||||
esc_html__( 'Last modified on %s', 'minimalistflex' ),
|
||||
esc_html( get_the_modified_date() )
|
||||
__( 'Last modified on %s', 'minimalistflex' ),
|
||||
get_the_modified_date()
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?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() ) ?>">
|
||||
<a class="panel panel-link" href="<?php the_permalink(); ?>">
|
||||
<span aria-hidden="true">
|
||||
<?php echo esc_html( get_theme_mod( 'minimalistflex_interface_readlink', __( 'Read More', 'minimalistflex' ) ) ); ?>
|
||||
</span>
|
||||
<span class="screen-reader-text">
|
||||
<?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
|
||||
printf(
|
||||
/* translators: %s: Post title. */
|
||||
esc_attr__( 'Read more of %s', 'minimalistflex' ),
|
||||
esc_attr( get_the_title() )
|
||||
)
|
||||
?>">
|
||||
<?php echo esc_html( get_theme_mod( 'minimalistflex_interface_readlink', __( 'Read More', 'minimalistflex' ) ) ); ?>
|
||||
__( 'Read more of %s', 'minimalistflex' ),
|
||||
get_the_title()
|
||||
) ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -5,31 +5,31 @@ if ( !defined( 'WPINC' ) ) {
|
||||
?>
|
||||
|
||||
<div class="singular-meta">
|
||||
<?php $mf_tags = get_the_category(); ?>
|
||||
<?php if( $mf_tags ): ?>
|
||||
<?php $tags = get_the_category(); ?>
|
||||
<?php if( $tags ): ?>
|
||||
<div class="singular-categories">
|
||||
<div class="categories-indicator">
|
||||
<?php esc_html_e( 'Categories:', 'minimalistflex' ) ?>
|
||||
</div>
|
||||
<?php foreach( $mf_tags as $mf_tag ) { ?>
|
||||
<?php foreach( $tags as $tag ) { ?>
|
||||
<div class="singular-category">
|
||||
<a href="<?php echo esc_url( get_category_link( $mf_tag ) ) ?>">
|
||||
<?php echo esc_html( $mf_tag->name ) ?>
|
||||
<a href="<?php echo esc_url( get_category_link( $tag ) ) ?>">
|
||||
<?php echo $tag->name; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php $mf_tags = get_the_tags(); ?>
|
||||
<?php if( $mf_tags ): ?>
|
||||
<?php $tags = get_the_tags(); ?>
|
||||
<?php if( $tags ): ?>
|
||||
<div class="singular-categories singular-tags">
|
||||
<div class="categories-indicator tags-indicator">
|
||||
<?php esc_html_e( 'Tags:', 'minimalistflex' ) ?>
|
||||
</div>
|
||||
<?php foreach( $mf_tags as $mf_tag ) { ?>
|
||||
<?php foreach( $tags as $tag ) { ?>
|
||||
<div class="singular-category singular-tag">
|
||||
<a href="<?php echo esc_url( get_tag_link( $mf_tag ) ) ?>">
|
||||
<?php echo esc_html( $mf_tag->name ) ?>
|
||||
<a href="<?php echo esc_url( get_tag_link( $tag ) ) ?>">
|
||||
<?php echo $tag->name; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
@ -4,12 +4,10 @@ if ( !defined( 'WPINC' ) ) {
|
||||
}
|
||||
?>
|
||||
|
||||
<?php $mf_id = get_the_author_meta( 'ID' ); ?>
|
||||
|
||||
<div class="publisher">
|
||||
|
||||
<a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($mf_id) ) ?>">
|
||||
<?php echo get_avatar( $mf_id, 32 ) ?>
|
||||
<a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($id) ) ?>">
|
||||
<?php echo get_avatar( $id, 32 ) ?>
|
||||
<span><?php the_author() ?></span>
|
||||
</a>
|
||||
<div class="publisher-datetime">
|
||||
@ -18,14 +16,14 @@ if ( !defined( 'WPINC' ) ) {
|
||||
<?php if ( $datemode == 'publish' || get_the_modified_date() <> get_the_date() ): ?>
|
||||
<?php printf(
|
||||
/* translators: %s: Post publish time. */
|
||||
esc_html__( 'Published on %s', 'minimalistflex' ),
|
||||
esc_html( get_the_date() )
|
||||
__( 'Published on %s', 'minimalistflex' ),
|
||||
get_the_date()
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?php printf(
|
||||
/* translators: %s: Post last modified time. */
|
||||
esc_html__( 'Last modified on %s', 'minimalistflex' ),
|
||||
esc_html( get_the_modified_date() )
|
||||
__( 'Last modified on %s', 'minimalistflex' ),
|
||||
get_the_modified_date()
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user