Compare commits

..

68 Commits
v1.0.1 ... main

Author SHA1 Message Date
Frank419
dc62038c6d Fixed translation loaded too early issues, ClassicPress compatibility, as well as non-existent sanitize callbacks issue. 2025-01-28 14:10:20 +08:00
Frank419
856198591a Update READMEs (again) :D 2025-01-28 12:08:01 +08:00
Frank419
4420bc4948 Security changes. 2025-01-28 12:06:55 +08:00
Frank419
13738d3b5f Added some changelogs to the README :) 2025-01-28 12:02:33 +08:00
Frank419
139ffa83b6 Modified the "Light" aka default color palette. 2025-01-28 12:02:19 +08:00
Frank419
ff3cf5e516 Layout modifications. 2025-01-28 12:01:58 +08:00
Frank419
6876dc26a0 Fixed wrong widget displayed for this area. 2025-01-28 12:01:45 +08:00
Frank419
11d7ec19ed Fixed some styling issues and introduced a bit new design. 2025-01-28 12:01:32 +08:00
Frank419
3a1520d3c1 Removed the default background image. Feels too shiny. 2025-01-28 09:11:25 +08:00
Frank419
26fa5a72af Increase the version number. (As usual.) 2024-09-14 21:37:21 +08:00
Frank419
8ab131e720 Updated locale. 2024-09-14 21:36:18 +08:00
Frank419
8ae25523dc Mentioned theme license in the readme. 2024-09-14 21:34:18 +08:00
Frank419
6b21d517c6 Make static text translatable. 2024-09-14 21:34:06 +08:00
Frank419
049b130c14 Re-added release workflow. 2024-08-29 21:52:09 +08:00
Frank419
402e1b099c Misc styling issues. Used variables instead of fixed values. 2024-08-29 18:33:36 +08:00
Frank419
95b297e08a This workflow doesn't work. Removed. 2024-08-29 18:29:50 +08:00
Frank419
b4b7d7d98f Increases version number. 2024-08-29 18:27:14 +08:00
Frank419
374a17039d Fixed menu styling issues. 2024-08-29 18:26:17 +08:00
Frank419
e8449d269d Fixed improper escaping (again). 2024-08-29 17:56:42 +08:00
Frank419
b0f624af0d Fixed too aggressive escaping. 2024-08-29 17:53:50 +08:00
Frank419
d434f7e360 Misc changes for CP compatibility. 2024-08-29 17:28:13 +08:00
Frank419
0192f1f2f2 Misc changes. Updated locale. 2024-08-29 15:52:39 +08:00
Frank419
3cf6389db6 Mass escaping and singular placeholder fix according to the CS check. 2024-08-29 15:48:42 +08:00
Frank419
45e080cfba Prefixed variables with mf_. Avoid conflicting. 2024-08-29 15:33:08 +08:00
Frank419
82b47c9804 Added proper escaping. 2024-08-29 15:32:47 +08:00
Frank419
c42a057571 Miscellaneous changes. Increased the version number. 2024-08-29 15:20:56 +08:00
Frank419
7f3d6330eb Added proper escaping. Imrpoved security. 2024-08-29 15:18:30 +08:00
Frank419
7a913f5e83 Fixed the main content doesn't expand without the sidebar, also added correct scope the arbitary global element styles. 2024-08-29 15:18:13 +08:00
Frank419
e5f36f4c58 Added an id to the style tag. Prepare for improved UX by not using refresh transport one day. 2024-08-29 15:17:14 +08:00
Frank419
6db67ae28b I must say that I'm not familiar with GitHub workflows... 2024-08-29 08:03:47 +08:00
Frank419
57f9d6abea
Create main.yml 2024-08-29 08:02:30 +08:00
Frank419
3ee6a377f3 Modified the workflow to include the correct textdomain. 2024-08-29 07:56:11 +08:00
Frank419
28007ec356 Added .gitignore. 2024-08-29 07:55:52 +08:00
Frank419
f56c0cccd6 Add CP workflow to repo. 2024-08-29 07:53:50 +08:00
Frank419
6d03abd733 ClassicPress rocks! 2024-08-28 21:29:25 +08:00
Frank419
e968df6991 Increase version number. 2024-08-28 16:37:10 +08:00
Frank419
bf6551ad93 Important fix for menu item not able to be visited due to e.preventDefault. 2024-08-28 16:29:32 +08:00
Frank419
24d8b81e06 Update the version number in the WordPress repo readme.txt. 2024-08-28 11:02:10 +08:00
Frank419
52de7e388c Update locales. 2024-08-28 10:58:35 +08:00
Frank419
4235a452f7 Update README. 2024-08-28 10:53:34 +08:00
Frank419
a9de647d1e Modified the tint color for palatte Galatic, as well as included shadow setting in the palette. Primarily for the Minimal palette. 2024-08-28 10:42:52 +08:00
Frank419
0a1fd48a95 Addressed several styling issues, including wrong color being used as well as wrong attribute values. 2024-08-28 10:41:51 +08:00
Frank419
547ec9f082 Changed the screenshot. 2024-08-28 10:41:12 +08:00
Frank419
7b04aa123f Moved the back to top button out of footer. 2024-08-28 10:29:00 +08:00
Frank419
46d390993f Fixed the appearance of the "back to top" button. 2024-08-28 10:15:33 +08:00
Frank419
36b1de5efc Improved focus trapping. Focus trapping now also happens backwards. 2024-08-28 10:13:28 +08:00
Frank419
2067cd62f8 Added shadow to submenus for better visual. 2024-08-28 10:04:08 +08:00
Frank419
1062709ea6 Revert changes to use wp_kses_data instead. wp_filter_post_kses tends to mess up things. 2024-08-27 21:41:38 +08:00
Frank419
7ad5d47bae Modified the submenu background color of the galatic palette. 2024-08-27 21:41:07 +08:00
Frank419
70431a83a5 Fixed the light shadow. Use a smaller alpha instead to provide better visual for any color, not just white. 2024-08-27 21:40:35 +08:00
Frank419
96b7a1b7c5 Added visual distinction for links that opens in a new tab. Also removed shadows from author meta cards. 2024-08-27 21:39:30 +08:00
Frank419
52e0c6309c Used === instead of ==. Improved security. 2024-08-27 18:10:48 +08:00
Frank419
3daee81a3a ACTUALLY removed the menu widget areas. 2024-08-27 18:10:26 +08:00
Frank419
6aa9c5f0ac Fixed aria-label for default featured images (again). 2024-08-27 18:06:27 +08:00
Frank419
01af49757f More descriptive aria-label for the default featured images. 2024-08-27 18:03:24 +08:00
Frank419
d91bc889d7 Used esc_attr__ instead of __ for attributes. Improved security. 2024-08-27 18:02:29 +08:00
Frank419
a4b9be50ce Fixed wrong textdomain. 2024-08-27 18:01:36 +08:00
Frank419
57bf359242 Used wp_filter_post_kses instead of the raw wp_kses_data. 2024-08-27 18:01:02 +08:00
Frank419
e4ca6753ec Addressed an issue that thumbnail images might have extra spacing at the bottom. 2024-08-27 17:56:43 +08:00
Frank419
16d09400c3 Sync readme.txt copyright notices to README.md.
Better done than not do.
2024-08-27 17:52:32 +08:00
Frank419
40247cb781 Update README to include version 1.0.2. 2024-08-27 17:50:41 +08:00
Frank419
b50760288c Updated the Chinese translations. 2024-08-27 17:47:19 +08:00
Frank419
6179c76047 Regenerated the language file. 2024-08-27 17:47:02 +08:00
Frank419
3dd9bc9c22 Modify the color definitions to adapt to the removal of menu widgets. 2024-08-27 17:44:44 +08:00
Frank419
c3ea455ffb Actually remove the definitions of the menu widgets. 2024-08-27 17:43:47 +08:00
Frank419
e467a7032d Changed the appearance of menu, both desktop and mobile.
On desktop, the navigation menu will display normally instead of being wrapped in a modal.
On mobile, the dialog has been refined to remove the widget areas to provide better accessibilty. A focus trap is also implemented to improve accessibility.
2024-08-27 17:43:11 +08:00
Frank419
c524031003 Changed version number, and added a Theme URI. 2024-08-27 15:52:41 +08:00
Frank419
363fc36554 Removed plugin functionality: Login Logout. 2024-08-27 15:51:57 +08:00
35 changed files with 1057 additions and 1000 deletions

View File

@ -0,0 +1,30 @@
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 Normal file
View File

@ -0,0 +1,34 @@
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 Normal file
View File

@ -0,0 +1,4 @@
.git export-ignore
.gitignore export-ignore
.github export-ignore
readme.txt export-ignore

View File

@ -8,11 +8,11 @@ if ( !defined( 'WPINC' ) ) {
<div class="singular">
<div class="singular-main">
<h1 class="404-title"><?php _e( 'You&apos;ve reached the edge of the world.', 'minimalistflex' ) ?></h1>
<p><?php _e( 'It looks like the page you are looking for doesn&apos;t exist.', 'minimalistflex' ) ?></p>
<p><?php _e( 'What about a search?', 'minimalistflex' ) ?></p>
<h1 class="404-title"><?php esc_html_e( 'You&apos;ve reached the edge of the world.', 'minimalistflex' ) ?></h1>
<p><?php esc_html_e( 'It looks like the page you are looking for doesn&apos;t exist.', 'minimalistflex' ) ?></p>
<p><?php esc_html_e( 'What about a search?', 'minimalistflex' ) ?></p>
<?php get_search_form() ?>
<p><a href="javascript:history.go(-1)"><?php _e( 'Go back', 'minimalistflex' ) ?></a></p>
<p><a href="javascript:history.go(-1)"><?php esc_html_e( 'Go back', 'minimalistflex' ) ?></a></p>
</div>
</div>

View File

@ -19,6 +19,9 @@ fully responsive, and looks good on very small screens.
We also tried our best to make the theme as accessible as
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?
@ -39,8 +42,39 @@ 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)

View File

@ -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>

View File

@ -8,42 +8,42 @@ if ( !defined( 'WPINC' ) ) {
<?php if ( have_posts() ) : ?>
<div class="minimalistflex-author">
<?php $id = get_the_author_meta( 'ID' ); ?>
<?php $mf_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( $id, 'administrator' ) && get_theme_mod( 'minimalistflex_layout_author_admin', 'yes' ) == 'yes' ) {
<div class="author-page-avatar<?php if ( user_can( $mf_id, 'administrator' ) && get_theme_mod( 'minimalistflex_layout_author_admin', 'yes' ) === 'yes' ) {
echo ' author-admin';
} ?>" aria-hidden="true">
<?php echo get_avatar( $id, 150 ); ?>
<?php echo get_avatar( $mf_id, 150 ); ?>
</div>
</h1>
<div class="author-details">
<?php
$titles = Array(
$mf_titles = Array(
esc_html__( 'User description', 'minimalistflex' ),
esc_html__( 'Registration time', 'minimalistflex' ),
esc_html__( 'Website', 'minimalistflex' ),
esc_html__( 'Email', 'minimalistflex' )
);
$metas = Array(
$mf_metas = Array(
'description',
'user_registered',
'user_url',
'user_email'
);
$i = 0;
$mf_i = 0;
?>
<?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' ): ?>
<?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' ): ?>
<div class="author-detail">
<h2><?php echo $titles[$i] ?></h2>
<?php echo esc_html( $meta ) ?>
<h2><?php echo $mf_titles[$mf_i] // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></h2>
<?php echo esc_html( $mf_meta ) ?>
</div>
<?php endif; ?>
<?php $i++; ?>
<?php $mf_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' ),
get_the_author_meta( 'display_name' )
esc_html( get_the_author_meta( 'display_name' ) )
)
?>
</h2>

View File

@ -16,15 +16,15 @@ if ( post_password_required() ) {
<?php
printf(
/* translators: %1$s: Number of comments. %2$s: Post title. */
_nx(
'One comment on "%2$s"',
esc_html( _nx(
'%1$s comment on "%2$s"',
'%1$s comments on "%2$s"',
get_comments_number(),
'comments title',
'minimalistflex'
),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
) ),
esc_html( number_format_i18n( get_comments_number() ) ),
'<span>' . esc_html( 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 _e( 'Comment navigation', 'minimalistflex' ); ?></h1>
<div class="previous"><?php previous_comments_link( __( '&larr; Older Comments', 'minimalistflex' ) ); ?></div>
<div class="next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'minimalistflex' ) ); ?></div>
<h1 class="screen-reader-text section-heading"><?php esc_html_e( 'Comment navigation', 'minimalistflex' ); ?></h1>
<div class="previous"><?php previous_comments_link( esc_html__( '&larr; Older Comments', 'minimalistflex' ) ); ?></div>
<div class="next"><?php next_comments_link( esc_html__( 'Newer Comments &rarr;', 'minimalistflex' ) ); ?></div>
</nav>
<?php endif; ?>
<?php if ( ! comments_open() && get_comments_number() ) : ?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'minimalistflex' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'minimalistflex' ); ?></p>
<?php endif; ?>
<?php endif; ?>

View File

@ -9,24 +9,24 @@ if ( !defined( 'WPINC' ) ) {
<?php
if( is_home() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
} elseif ( is_front_page() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
} elseif ( is_search() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
} elseif ( is_archive() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
} elseif( is_author() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
} elseif( is_single() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
} elseif( is_page() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
}
?>
<?php if ( $sidebar <> 'no' ): ?>
<?php if ( $mf_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="#main-content" aria-label="<?php esc_attr_e( 'Back to top', 'minimalistflex' ) ?>">:D</a></li>
<?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 endif; ?>
</ul>
<footer class="minimalistflex-footer">
<div class="minimalistflex-footer-widgets-container">
<?php $sidebars = get_theme_mod( 'minimalistflex_footer_widget_layout', 'one' ); ?>
<?php $mf_sidebars = get_theme_mod( 'minimalistflex_footer_widget_layout', 'one' ); ?>
<?php
get_sidebar( 'footer' );
if ( $sidebars == 'two' || $sidebars == 'three' ) {
if ( $mf_sidebars === 'two' || $mf_sidebars === 'three' ) {
get_sidebar( 'footer-2' );
}
if ( $sidebars == 'three' ) {
if ( $mf_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 get_bloginfo( 'name' ) ?></a>
<a href="<?php echo esc_url( home_url() ); ?>" class="blog-title-link"><?php echo wp_kses_data( get_bloginfo( 'name' ) ) ?></a>
</div>
<?php if( get_bloginfo( 'description' ) ): ?>
<div class="footer-blog-tagline">
<?php echo get_bloginfo( 'description' ); ?>
<?php echo wp_kses_data( get_bloginfo( 'description' ) ) ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="footer-credits">
<?php $footer_type = get_theme_mod( 'minimalistflex_footer_type', 'both' ); ?>
<?php if ( $footer_type == 'both' || $footer_type == 'custom' ): ?>
<?php $mf_footer_type = get_theme_mod( 'minimalistflex_footer_type', 'both' ); ?>
<?php if ( $mf_footer_type === 'both' || $mf_footer_type === 'custom' ): ?>
<?php echo wp_kses_data( get_theme_mod( 'minimalistflex_footer_text' ) ) ?>
<?php endif; ?>
<?php if ( $footer_type == 'both' || $footer_type == 'minimalistflex' ): ?>
<?php if ( $mf_footer_type === 'both' || $mf_footer_type === 'minimalistflex' ): ?>
<?php
printf(
/* translators: %s: Link to theme author website. */
__( 'Theme <a href="%s">MinimalistFlex</a>.', 'minimalistflex' ),
wp_kses_data( __( 'Theme <a href="%s">MinimalistFlex</a>.', 'minimalistflex' ) ),
esc_url( 'https://onmyodev.com/' )
)
?>

View File

@ -3,9 +3,16 @@ 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',
@ -16,7 +23,9 @@ 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( 'custom-logo', Array(
'width' => '80',
'height' => '80'
@ -34,12 +43,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' => 'An abstract default header image.'
'description' => esc_html__( 'An abstract default header image.', 'minimalistflex' )
),
'lines' => Array(
'url' => get_template_directory_uri() . '/defaults/header2.png',
'thumbnail_url' => get_template_directory_uri() . '/defaults/header2.png',
'description' => 'A default header image that contains three lines.'
'description' => esc_html__( 'A default header image that contains three lines.', 'minimalistflex' )
)
) );
@ -53,6 +62,7 @@ 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' );
@ -62,24 +72,6 @@ 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',
@ -147,16 +139,13 @@ function minimalistflex_register_menus() {
add_action( 'init', 'minimalistflex_register_menus' );
function minimalistflex_dynamic_css() {
require_once 'includes/color-definitions.php';
require_once 'includes/colors.php';
require_once 'includes/languages.php';
}
add_action( 'wp_footer', 'minimalistflex_dynamic_css' );
load_theme_textdomain( 'minimalistflex', get_template_directory() . '/languages' );
require_once 'includes/customizer.php';
function minimalistflex_custom_excerpt_length() {
return intval( get_theme_mod( 'minimalistflex_interface_excerpt', '55' ) );
}

View File

@ -22,101 +22,90 @@ if ( function_exists( 'wp_body_open' ) ) {
<?php
if( is_home() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
$header = get_theme_mod( 'minimalistflex_layout_home_header', 'yes' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_home_sidebar', 'right' );
$mf_header = get_theme_mod( 'minimalistflex_layout_home_header', 'yes' );
} elseif ( is_front_page() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
$header = get_theme_mod( 'minimalistflex_layout_front_header', 'yes' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_front_sidebar', 'right' );
$mf_header = get_theme_mod( 'minimalistflex_layout_front_header', 'yes' );
} elseif ( is_search() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
$header = get_theme_mod( 'minimalistflex_layout_search_header', 'yes' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_search_sidebar', 'right' );
$mf_header = get_theme_mod( 'minimalistflex_layout_search_header', 'yes' );
} elseif ( is_author() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
$header = get_theme_mod( 'minimalistflex_layout_author_header', 'yes' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_author_sidebar', 'right' );
$mf_header = get_theme_mod( 'minimalistflex_layout_author_header', 'yes' );
} elseif ( is_archive() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
$header = get_theme_mod( 'minimalistflex_layout_archive_header', 'yes' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_archive_sidebar', 'right' );
$mf_header = get_theme_mod( 'minimalistflex_layout_archive_header', 'yes' );
} elseif ( is_single() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
$header = get_theme_mod( 'minimalistflex_layout_singular_header', 'yes' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_singular_sidebar', 'right' );
$mf_header = get_theme_mod( 'minimalistflex_layout_singular_header', 'yes' );
} elseif ( is_page() ) {
$sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
$header = get_theme_mod( 'minimalistflex_layout_page_header', 'yes' );
$mf_sidebar = get_theme_mod( 'minimalistflex_layout_page_sidebar', 'right' );
$mf_header = get_theme_mod( 'minimalistflex_layout_page_header', 'yes' );
}
$link = get_theme_mod( 'minimalistflex_header_link' );
$label = get_theme_mod( 'minimalistflex_header_label' );
$mf_link = get_theme_mod( 'minimalistflex_header_link' );
$mf_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() && $header == 'yes' ): ?>
<?php if( get_header_image() && $mf_header === 'yes' ): ?>
<header class="minimalistflex-header-image">
<?php if ( strlen( $link ) ): ?>
<a href="<?php echo esc_url( $link ) ?>" aria-label="<?php
if ( strlen( $label ) ) {
echo esc_attr( $label );
<?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 );
} else {
esc_attr_e( 'The header image link.', 'minimalistflex' );
}
?>">
<?php endif; ?>
<img src="<?php header_image(); ?>" aria-label="<?php
if ( strlen( $label ) ) {
if ( strlen( $mf_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( $label )
esc_attr( $mf_label )
);
} else {
esc_attr_e( 'The header image.', 'minimalistflex' );
}
?>">
<?php if ( strlen( $link ) ): ?>
<?php if ( strlen( $mf_link ) ): ?>
</a>
<?php endif; ?>
</header>
<?php endif; ?>
<nav class="minimalistflex-header">
<header class="minimalistflex-header">
<?php if ( has_custom_logo() ): ?>
<?php echo get_custom_logo(); ?>
<?php echo get_custom_logo() // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?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 get_bloginfo( 'name' ) ?></a>
<a href="<?php echo esc_url( home_url() ); ?>" class="blog-title-link"><?php echo wp_kses_data( get_bloginfo( 'name' ) ) ?></a>
</h1>
<?php endif; ?>
<div class="spacer"></div>
<?php if ( has_nav_menu( 'main-menu' ) || is_active_sidebar( 'menu' ) || is_active_sidebar( 'menu-2' ) ): ?>
<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' ) ): ?>
<button id="menu-toggle" aria-label="<?php esc_attr_e( 'Toggle navigation dropdown', 'minimalistflex' ) ?>">
<i id="menu-toggle-icon"></i>
</button>
<?php endif; ?>
<div class="minimalistflex-menu-container">
<div class="minimalistflex-menu">
<nav 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; ?>
<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>
<?php endif; ?>
</header>
<main class="minimalistflex-master <?php echo 'minimalistflex-sidebar-layout-' . $sidebar ?>">
<main class="minimalistflex-master <?php echo 'minimalistflex-sidebar-layout-' . esc_attr( $mf_sidebar ) ?>">
<article class="minimalistflex-content" id="main-content">

View File

@ -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' ), rand(), true);
wp_enqueue_script('color-palette-script', get_template_directory_uri().'/js/color-palette.js', array( 'jquery' ), null, true);
}
public function render_content()

View File

@ -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' ), rand(), true);
wp_enqueue_script('multi-image-script', get_template_directory_uri().'/js/multi-image.js', array( 'jquery' ), null, true);
}
public function render_content()

View File

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

View File

@ -5,24 +5,23 @@ if ( !defined( 'WPINC' ) ) {
?>
<?php
require_once 'color-definitions.php';
global $colors;
require 'color-definitions.php';
?>
<style>
<style id="minimalistflex-color-css">
:root {
--minimalistflex-header: <?php
$header_textcolor = get_header_textcolor();
if ( preg_match( '/#/', $header_textcolor ) ) {
echo $header_textcolor;
echo esc_html( $header_textcolor );
} else {
echo '#' . $header_textcolor;
echo esc_html( '#' . $header_textcolor );
}
?>;
<?php $color_keys = array_keys( $colors ); ?>
<?php foreach( $color_keys as $color_key ): ?>
--minimalistflex-<?php echo $color_key; ?>: <?php echo esc_html( get_theme_mod( 'minimalistflex_color_' . $color_key, $colors[$color_key] ) ); ?>;
--minimalistflex-<?php echo esc_html( $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' ) {
@ -31,12 +30,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(200, 200, 200, 0.19);
--minimalistflex-shadow-light: rgba(0, 0, 0, 0.05);
<?php endif; ?>
}

View File

@ -3,21 +3,21 @@ if ( !defined( 'WPINC' ) ) {
die;
}
require_once 'color-definitions.php';
require_once 'sanitize-callbacks.php';
function minimalistflex_customizer_enqueue_scripts() {
require_once 'color-definitions.php';
wp_enqueue_script( 'minimalistflex_color_palette', get_template_directory_uri() . '/js/color-palette.js', Array( 'jquery' ), null, true );
}
require_once 'sanitize-callbacks.php';
add_action( 'customize_controls_enqueue_scripts', 'minimalistflex_customizer_enqueue_scripts' );
function minimalistflex_default_featured_image_register( $wp_customize ) {
require_once 'class-multi-image-control.php';
$wp_customize -> add_section( 'minimalistflex_default_featured_image', Array(
'title' => __( 'Default Featured Images', 'minimalistflex' ),
'description' => __( 'The theme can provide the following images as a fallback when there\'s no featured image set for a post. You can also select where to display those images.', 'minimalistflex' ),
'title' => esc_html__( 'Default Featured Images', 'minimalistflex' ),
'description' => esc_html__( 'The theme can provide the following images as a fallback when there\'s no featured image set for a post. You can also select where to display those images.', 'minimalistflex' ),
'priority' => 50,
'capability' => 'edit_theme_options'
) );
@ -41,42 +41,43 @@ function minimalistflex_default_featured_image_register( $wp_customize ) {
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
) );
$wp_customize -> add_control( new MinimalistFlex_Multi_Image_Custom_Control( $wp_customize, 'minimalistflex_default_featured_images', Array(
'label' => __( 'Default Images', 'minimalistflex' ),
'description' => __( 'Click on "Add Image" to add an image. Click on the image to remove it. There\'s no limit on how many images you can add.', 'minimalistflex' ),
'label' => esc_html__( 'Default Images', 'minimalistflex' ),
'description' => esc_html__( 'Click on "Add Image" to add an image. Click on the image to remove it. There\'s no limit on how many images you can add.', 'minimalistflex' ),
'priority' => 20,
'section' => 'minimalistflex_default_featured_image',
'suggest_label' => __( 'Suggested Images', 'minimalistflex' ),
'suggest_description' => __( 'We have prepared some pre-built, generic purpose images for you to choose from. Click on an image will add it into the selection.', 'minimalistflex' ),
'suggest_label' => esc_html__( 'Suggested Images', 'minimalistflex' ),
'suggest_description' => esc_html__( 'We have prepared some pre-built, generic purpose images for you to choose from. Click on an image will add it into the selection.', 'minimalistflex' ),
'suggest_images' => Array( '/defaults/1.png', '/defaults/2.png', '/defaults/3.png', '/defaults/4.png', '/defaults/5.png', '/defaults/6.png' )
) ) );
$wp_customize -> add_control( 'minimalistflex_default_featured_images_location', Array(
'label' => __( 'Location', 'minimalistflex' ),
'description' => __( 'You may decide if and where should the default image show.', 'minimalistflex' ),
'label' => esc_html__( 'Location', 'minimalistflex' ),
'description' => esc_html__( 'You may decide if and where should the default image show.', 'minimalistflex' ),
'type' => 'radio',
'priority' => 10,
'section' => 'minimalistflex_default_featured_image',
'choices' => Array(
'both' => __( 'Always', 'minimalistflex' ),
'archive' => __( 'Archive Page Only', 'minimalistflex' ),
'single' => __( 'Single Page Only', 'minimalistflex' ),
'no' => __( 'Never', 'minimalistflex' )
'both' => esc_html__( 'Always', 'minimalistflex' ),
'archive' => esc_html__( 'Archive Page Only', 'minimalistflex' ),
'single' => esc_html__( 'Single Page Only', 'minimalistflex' ),
'no' => esc_html__( 'Never', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_default_featured_images_first_image', Array(
'label' => __( 'Display First Image', 'minimalistflex' ),
'description' => __( 'The theme can also retrieve the first image in a post if possible. When no image was found, the theme can fallback to the default images set below.', 'minimalistflex' ),
'label' => esc_html__( 'Display First Image', 'minimalistflex' ),
'description' => esc_html__( 'The theme can also retrieve the first image in a post if possible. When no image was found, the theme can fallback to the default images set below.', 'minimalistflex' ),
'type' => 'radio',
'priority' => 15,
'section' => 'minimalistflex_default_featured_image',
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' ),
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' ),
)
) );
}
add_action( 'customize_register', 'minimalistflex_default_featured_image_register' );
function minimalistflex_customize_color_register( $wp_customize ) {
require_once 'color-definitions.php';
require_once 'class-color-palette-control.php';
$wp_customize -> add_setting( 'minimalistflex_color_placeholder', Array(
@ -85,14 +86,11 @@ function minimalistflex_customize_color_register( $wp_customize ) {
) );
$wp_customize -> add_control( new MinimalistFlex_Color_Palette_Custom_Control( $wp_customize, 'minimalistflex_color_placeholder', Array(
'priority' => 1,
'label' => __( 'Color Palettes', 'minimalistflex' ),
'description' => __( 'We had prepared some fine tuned color palettes for you. Select an option and it will automatically apply the palette to your site.', 'minimalistflex' ),
'label' => esc_html__( 'Color Palettes', 'minimalistflex' ),
'description' => esc_html__( 'We had prepared some fine tuned color palettes for you. Select an option and it will automatically apply the palette to your site.', 'minimalistflex' ),
'section' => 'colors'
) ) );
global $colors;
global $labels;
global $desciprtions;
$color_keys = array_keys( $colors );
foreach( $color_keys as $color_key ) {
$wp_customize -> add_setting( 'minimalistflex_color_' . $color_key, Array(
@ -117,30 +115,28 @@ function minimalistflex_customize_color_register( $wp_customize ) {
) );
$wp_customize -> add_control( 'minimalistflex_color_disable_shadow', Array(
'type' => 'radio',
'label' => __( 'Disable Shadows', 'minimalistflex' ),
'description' => __( 'This option lets you disable the shadow on the site. It should only affect the shadow created by the theme.', 'minimalistflex' ),
'label' => esc_html__( 'Disable Shadows', 'minimalistflex' ),
'description' => esc_html__( 'This option lets you disable the shadow on the site. It should only affect the shadow created by the theme.', 'minimalistflex' ),
'priority' => 2,
'section' => 'colors',
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> get_control( 'background_color' ) -> description = __( 'The default background setting from the WordPress core. If set, it will blend with the content &amp; sidebar background colors set below.', 'minimalistflex' );
$wp_customize -> get_control( 'header_textcolor' ) -> description = __( 'The default header text setting from the WordPress core. Used on the header and the toggle button.', 'minimalistflex' );
$wp_customize -> get_control( 'background_color' ) -> description = esc_html__( 'The default background setting from the WordPress core. If set, it will blend with the content &amp; sidebar background colors set below.', 'minimalistflex' );
$wp_customize -> get_control( 'header_textcolor' ) -> description = esc_html__( 'The default header text setting from the WordPress core. Used on the header and the toggle button.', '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' => __( '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' )
'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' )
);
function minimalistflex_customize_author_elements_register( $wp_customize ) {
global $metadatas;
$metadata_keys = array_keys( $metadatas );
foreach( $metadata_keys as $metadata_key ) {
$wp_customize -> add_setting( 'minimalistflex_layout_author_elements_' . $metadata_key, Array(
@ -155,12 +151,12 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
'type' => 'radio',
'priority' => 45,
'capability' => 'edit_theme_options',
'label' => __( 'Metadatas', 'minimalistflex' ),
'label' => esc_html__( 'Metadatas', 'minimalistflex' ),
'description' => $metadatas[$metadata_key],
'section' => 'minimalistflex_layout_author',
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
} else {
@ -171,8 +167,8 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
'description' => $metadatas[$metadata_key],
'section' => 'minimalistflex_layout_author',
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
}
@ -180,11 +176,10 @@ function minimalistflex_customize_author_elements_register( $wp_customize ) {
}
function minimalistflex_customize_register( $wp_customize ) {
// Start adding panels.
$wp_customize -> add_panel( 'minimalistflex_layout', Array(
'title' => _x( 'Layout', 'customizer panel' , 'minimalistflex' ),
'description' => __( 'Here you may configure how different pages on your site looks like.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may configure how different pages on your site looks like.', 'minimalistflex' ),
'priority' => 70,
'capability' => 'edit_theme_options'
) );
@ -192,62 +187,62 @@ function minimalistflex_customize_register( $wp_customize ) {
// Start adding sections.
$wp_customize -> add_section( 'minimalistflex_layout_home', Array(
'title' => _x( 'Blog Page', 'customizer section' , 'minimalistflex' ),
'description' => __( 'Here you may customize the layout of your blog page.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may customize the layout of your blog page.', 'minimalistflex' ),
'panel' => 'minimalistflex_layout',
'priority' => 10,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_layout_front', Array(
'title' => _x( 'Front Page', 'customizer section' , 'minimalistflex' ),
'description' => __( 'Here you may customize the layout of your front page. Only takes effect when using a static front page.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may customize the layout of your front page. Only takes effect when using a static front page.', 'minimalistflex' ),
'panel' => 'minimalistflex_layout',
'priority' => 12,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_layout_archive', Array(
'title' => _x( 'Archives', 'customizer section' , 'minimalistflex' ),
'description' => __( 'Here you may customize the layout of your archive pages.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may customize the layout of your archive pages.', 'minimalistflex' ),
'panel' => 'minimalistflex_layout',
'priority' => 15,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_layout_search', Array(
'title' => _x( 'Search Results', 'customizer section' , 'minimalistflex' ),
'description' => __( 'Here you may customize the layout of your search result pages.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may customize the layout of your search result pages.', 'minimalistflex' ),
'panel' => 'minimalistflex_layout',
'priority' => 17,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_layout_author', Array(
'title' => _x( 'Author Pages', 'customizer section' , 'minimalistflex' ),
'description' => __( 'Here you may customize the layout of your author pages.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may customize the layout of your author pages.', 'minimalistflex' ),
'panel' => 'minimalistflex_layout',
'priority' => 20,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_layout_singular', Array(
'title' => _x( 'Single Posts', 'customizer section' , 'minimalistflex' ),
'description' => __( 'Here you may customize the layout of your posts.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may customize the layout of your posts.', 'minimalistflex' ),
'panel' => 'minimalistflex_layout',
'priority' => 25,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_layout_page', Array(
'title' => _x( 'Pages', 'customizer section' , 'minimalistflex' ),
'description' => __( 'Here you may customize the layout of your pages.', 'minimalistflex' ),
'description' => esc_html__( 'Here you may customize the layout of your pages.', 'minimalistflex' ),
'panel' => 'minimalistflex_layout',
'priority' => 30,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_interface', Array(
'title' => _x( 'Interface &amp; Elements', 'customizer section' , 'minimalistflex' ),
'description' => __( 'You may customize your site\'s interface and the elements displayed here.', 'minimalistflex' ),
'description' => esc_html__( 'You may customize your site\'s interface and the elements displayed here.', 'minimalistflex' ),
'priority' => 71,
'capability' => 'edit_theme_options'
) );
$wp_customize -> add_section( 'minimalistflex_footer', Array(
'title' => _x( 'Footer', 'customizer section', 'minimalistflex' ),
'description' => __( 'You may customize how your footer looks like here.', 'minimalistflex' ),
'description' => esc_html__( 'You may customize how your footer looks like here.', 'minimalistflex' ),
'priority' => 140,
'capability' => 'edit_theme_options'
) );
@ -444,7 +439,7 @@ function minimalistflex_customize_register( $wp_customize ) {
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'transport' => 'refresh',
'default' => __( 'Read More', 'minimalistflex' ),
'default' => esc_html__( 'Read More', 'minimalistflex' ),
'sanitize_callback' => 'esc_html'
) );
$wp_customize -> add_setting( 'minimalistflex_interface_thumbnail_height', Array(
@ -464,20 +459,20 @@ function minimalistflex_customize_register( $wp_customize ) {
'capability' => 'edit_theme_options',
'transport' => 'refresh',
'default' => 'both',
'sanitize_callback' => 'minimalistflex_sanitize_radio_callback'
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
) );
$wp_customize -> add_setting( 'minimalistflex_footer_text', Array(
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'transport' => 'refresh',
'sanitize_callback' => 'wp_filter_post_kses'
'sanitize_callback' => 'wp_kses_data'
) );
$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_callback'
'sanitize_callback' => 'minimalistflex_sanitize_radio_cb'
) );
// Start binding controls (UI).
@ -485,26 +480,26 @@ function minimalistflex_customize_register( $wp_customize ) {
'type' => 'url',
'priority' => 50,
'section' => 'header_image',
'label' => __( 'Header Image Link', 'minimalistflex' ),
'description' => __( 'You may link the header image to a URL. Leave blank if you do not want to do so.', 'minimalistflex' )
'label' => esc_html__( 'Header Image Link', 'minimalistflex' ),
'description' => esc_html__( 'You may link the header image to a URL. Leave blank if you do not want to do so.', 'minimalistflex' )
) );
$wp_customize -> add_control( 'minimalistflex_header_label', Array(
'type' => 'text',
'priority' => 40,
'section' => 'header_image',
'label' => __( 'Header Image Label', 'minimalistflex' ),
'description' => __( 'You may provide a description of your header image. Also will become the label of the link if set. Should be set for better accessibility.', 'minimalistflex' )
'label' => esc_html__( 'Header Image Label', 'minimalistflex' ),
'description' => esc_html__( 'You may provide a description of your header image. Also will become the label of the link if set. Should be set for better accessibility.', 'minimalistflex' )
) );
$wp_customize -> add_control( 'minimalistflex_layout_home_sidebar', Array(
'type' => 'radio',
'priority' => 10,
'section' => 'minimalistflex_layout_home',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_home_header', Array(
@ -512,10 +507,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15,
'section' => 'minimalistflex_layout_home',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_front_sidebar', Array(
@ -523,11 +518,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10,
'section' => 'minimalistflex_layout_front',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_front_header', Array(
@ -535,10 +530,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15,
'section' => 'minimalistflex_layout_front',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_archive_sidebar', Array(
@ -546,11 +541,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10,
'section' => 'minimalistflex_layout_archive',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_archive_header', Array(
@ -558,10 +553,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15,
'section' => 'minimalistflex_layout_archive',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_archive_title', Array(
@ -569,10 +564,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20,
'section' => 'minimalistflex_layout_archive',
'label' => _x( 'Title', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the archive title.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the archive title.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_search_sidebar', Array(
@ -580,11 +575,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10,
'section' => 'minimalistflex_layout_search',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_search_header', Array(
@ -592,10 +587,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15,
'section' => 'minimalistflex_layout_search',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_search_title', Array(
@ -603,10 +598,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20,
'section' => 'minimalistflex_layout_search',
'label' => _x( 'Search Query', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the search query.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the search query.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_search_form', Array(
@ -614,10 +609,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20,
'section' => 'minimalistflex_layout_search',
'label' => _x( 'Search Form', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to also display the search form.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to also display the search form.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_author_sidebar', Array(
@ -625,11 +620,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10,
'section' => 'minimalistflex_layout_author',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_author_header', Array(
@ -637,10 +632,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15,
'section' => 'minimalistflex_layout_author',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_author_title', Array(
@ -648,10 +643,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 20,
'section' => 'minimalistflex_layout_author',
'label' => _x( 'Author Name', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the author name.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the author name.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_author_admin', Array(
@ -659,10 +654,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 40,
'section' => 'minimalistflex_layout_author',
'label' => _x( 'Admin Status', 'layout' , 'minimalistflex' ),
'description' => __( 'Show an indicator in the bottom-right of the avatar if the author is an admin.', 'minimalistflex' ),
'description' => esc_html__( 'Show an indicator in the bottom-right of the avatar if the author is an admin.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_singular_sidebar', Array(
@ -670,11 +665,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10,
'section' => 'minimalistflex_layout_singular',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_singular_header', Array(
@ -682,10 +677,10 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15,
'section' => 'minimalistflex_layout_singular',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_page_sidebar', Array(
@ -693,11 +688,11 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 10,
'section' => 'minimalistflex_layout_page',
'label' => _x( 'Sidebar', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the sidebar, and its location.', 'minimalistflex' ),
'choices' => Array(
'left' => __( 'Left sidebar', 'minimalistflex' ),
'right' => __( 'Right sidebar', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'left' => esc_html__( 'Left sidebar', 'minimalistflex' ),
'right' => esc_html__( 'Right sidebar', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_layout_page_header', Array(
@ -705,130 +700,130 @@ function minimalistflex_customize_register( $wp_customize ) {
'priority' => 15,
'section' => 'minimalistflex_layout_page',
'label' => _x( 'Header Image', 'layout' , 'minimalistflex' ),
'description' => __( 'Select whether to display the header image.', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to display the header image.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_interface_scroll_top', Array(
'type' => 'radio',
'priority' => 10,
'section' => 'minimalistflex_interface',
'label' => __( 'Scroll to top button', 'minimalistflex' ),
'description' => __( 'Whether to display a "Scroll to top" button in the bottom-right corner.', 'minimalistflex' ),
'label' => esc_html__( 'Scroll to top button', 'minimalistflex' ),
'description' => esc_html__( 'Whether to display a "Scroll to top" button in the bottom-right corner.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_interface_excerpt', Array(
'type' => 'number',
'priority' => 20,
'section' => 'minimalistflex_interface',
'label' => __( 'Excerpt Word Count', 'minimalistflex' ),
'description' => __( 'The word count of the excerpts on any archive page and the blog page.', 'minimalistflex' )
'label' => esc_html__( 'Excerpt Word Count', 'minimalistflex' ),
'description' => esc_html__( 'The word count of the excerpts on any archive page and the blog page.', 'minimalistflex' )
) );
$wp_customize -> add_control( 'minimalistflex_interface_autoh2label', Array(
'type' => 'radio',
'priority' => 25,
'section' => 'minimalistflex_interface',
'label' => __( 'Auto h2 Label', 'minimalistflex' ),
'description' => __( 'The theme can automatically theme and label the h2 elements in single posts and pages, providing a better visual. May not work well in all circumstances, use with caution.', 'minimalistflex' ),
'label' => esc_html__( 'Auto h2 Label', 'minimalistflex' ),
'description' => esc_html__( 'The theme can automatically theme and label the h2 elements in single posts and pages, providing a better visual. May not work well in all circumstances, use with caution.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_interface_comment_count', Array(
'type' => 'radio',
'priority' => 30,
'section' => 'minimalistflex_interface',
'label' => __( 'Comment Count', 'minimalistflex' ),
'description' => __( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ),
'label' => esc_html__( 'Comment Count', 'minimalistflex' ),
'description' => esc_html__( 'Whether to display the comment count of the posts listed in an archive page.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_interface_publisher', Array(
'type' => 'radio',
'priority' => 35,
'section' => 'minimalistflex_interface',
'label' => __( 'Publisher', 'minimalistflex' ),
'description' => __( 'Whether to display the publisher.', 'minimalistflex' ),
'label' => esc_html__( 'Publisher', 'minimalistflex' ),
'description' => esc_html__( 'Whether to display the publisher.', 'minimalistflex' ),
'choices' => Array(
'yes' => __( 'Yes', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'yes' => esc_html__( 'Yes', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_interface_date', Array(
'type' => 'radio',
'priority' => 40,
'section' => 'minimalistflex_interface',
'label' => __( 'Publish Date', 'minimalistflex' ),
'description' => __( 'Whether to display the published date.', 'minimalistflex' ),
'label' => esc_html__( 'Publish Date', 'minimalistflex' ),
'description' => esc_html__( 'Whether to display the published date.', 'minimalistflex' ),
'choices' => Array(
'publish' => __( 'Yes, publish time only.', 'minimalistflex' ),
'modify' => __( 'Yes, and display modified time if possible.', 'minimalistflex' ),
'no' => __( 'No', 'minimalistflex' )
'publish' => esc_html__( 'Yes, publish time only.', 'minimalistflex' ),
'modify' => esc_html__( 'Yes, and display modified time if possible.', 'minimalistflex' ),
'no' => esc_html__( 'No', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_interface_readlink', Array(
'type' => 'text',
'priority' => 45,
'section' => 'minimalistflex_interface',
'label' => __( 'Read More Link', 'minimalistflex' ),
'description' => __( 'The text for the "Read More" links.', 'minimalistflex' )
'label' => esc_html__( 'Read More Link', 'minimalistflex' ),
'description' => esc_html__( 'The text for the "Read More" links.', 'minimalistflex' )
) );
$wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height', Array(
'type' => 'radio',
'priority' => 50,
'section' => 'minimalistflex_interface',
'label' => __( 'Thumbnail Images Size', 'minimalistflex' ),
'description' => __( 'Select whether to enable flexible height for your thumbnail images, or use a fixed height.', 'minimalistflex' ),
'label' => esc_html__( 'Thumbnail Images Size', 'minimalistflex' ),
'description' => esc_html__( 'Select whether to enable flexible height for your thumbnail images, or use a fixed height.', 'minimalistflex' ),
'choices' => Array(
'fixed' => __( 'Fixed', 'minimalistflex' ),
'auto' => __( 'Flexible', 'minimalistflex' )
'fixed' => esc_html__( 'Fixed', 'minimalistflex' ),
'auto' => esc_html__( 'Flexible', 'minimalistflex' )
)
) );
$wp_customize -> add_control( 'minimalistflex_interface_thumbnail_height_px', Array(
'type' => 'number',
'priority' => 51,
'section' => 'minimalistflex_interface',
'label' => __( 'Height', 'minimalistflex' ),
'description' => __( 'Enter your desired height here. Should be in pixels.', 'minimalistflex' ),
'label' => esc_html__( 'Height', 'minimalistflex' ),
'description' => esc_html__( 'Enter your desired height here. Should be in pixels.', 'minimalistflex' ),
) );
$wp_customize -> add_control( 'minimalistflex_footer_type', Array(
'type' => 'radio',
'priority' => 9,
'section' => 'minimalistflex_footer',
'label' => __( 'Footer Options', 'minimalistflex' ),
'description' => __( 'Choose what to display in your footer credit section.', 'minimalistflex' ),
'label' => esc_html__( 'Footer Options', 'minimalistflex' ),
'description' => esc_html__( 'Choose what to display in your footer credit section.', 'minimalistflex' ),
'choices' => Array(
'both' => __( 'Both MinimalistFlex credits and custom footer text.', 'minimalistflex' ),
'minimalistflex' => __( 'MinimalistFlex credits only.', 'minimalistflex' ),
'custom' => __( 'Custom footer text only.', 'minimalistflex' ),
'none' => __( 'Neither.', 'minimalistflex' )
'both' => esc_html__( 'Both MinimalistFlex credits and custom footer text.', 'minimalistflex' ),
'minimalistflex' => esc_html__( 'MinimalistFlex credits only.', 'minimalistflex' ),
'custom' => esc_html__( 'Custom footer text only.', 'minimalistflex' ),
'none' => esc_html__( 'Neither.', 'minimalistflex' )
)
) );
$wp_customize -> add_control( new WP_Customize_Code_Editor_Control( $wp_customize, 'minimalistflex_footer_text', Array(
'code_type' => 'htmlmixed',
'priority' => 15,
'section' => 'minimalistflex_footer',
'label' => __( 'Custom Footer Text', 'minimalistflex' ),
'description' => __( 'Here you may set a custom footer text to be displayed in the footer credits. HTML allowed.', 'minimalistflex' )
'label' => esc_html__( 'Custom Footer Text', 'minimalistflex' ),
'description' => esc_html__( 'Here you may set a custom footer text to be displayed in the footer credits. HTML allowed.', 'minimalistflex' )
) ) );
$wp_customize -> add_control( 'minimalistflex_footer_widget_layout', Array(
'type' => 'radio',
'priority' => 10,
'section' => 'minimalistflex_footer',
'label' => __( 'Footer Widget Layout', 'minimalistflex' ),
'description' => __( 'Choose the layout of the footer widgets.', 'minimalistflex' ),
'label' => esc_html__( 'Footer Widget Layout', 'minimalistflex' ),
'description' => esc_html__( 'Choose the layout of the footer widgets.', 'minimalistflex' ),
'choices' => Array(
'one' => __( 'One column. Only shows the "Footer" widget area.', 'minimalistflex' ),
'two' => __( 'Two columns. Also shows the "Footer 2" widget area.', 'minimalistflex' ),
'three' => __( 'Three columns. Also shows the "Footer 3" widget area (aka all areas).', 'minimalistflex' )
'one' => esc_html__( 'One column. Only shows the "Footer" widget area.', 'minimalistflex' ),
'two' => esc_html__( 'Two columns. Also shows the "Footer 2" widget area.', 'minimalistflex' ),
'three' => esc_html__( 'Three columns. Also shows the "Footer 3" widget area (aka all areas).', 'minimalistflex' )
)
) );

View File

@ -1,6 +1,7 @@
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")
@ -23,6 +24,7 @@ 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")
@ -40,11 +42,12 @@ 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("#ffffff")
wp.customize("minimalistflex_color_footer-bg").set("#333333")
wp.customize("minimalistflex_color_footer-text").set("#000000")
wp.customize("minimalistflex_color_footer-bg").set("#ffffff")
})
$("#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")
@ -67,6 +70,7 @@ 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")
@ -75,10 +79,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("#663196")
wp.customize("minimalistflex_color_header-sidebar").set("#4f2675")
wp.customize("minimalistflex_color_level1").set("#e7d2fa")
wp.customize("minimalistflex_color_level2").set("#d9c4f2")
wp.customize("minimalistflex_color_tint").set("#e7d2fa")
wp.customize("minimalistflex_color_tint").set("#d3a7f9")
wp.customize("minimalistflex_color_tint-dark").set("#3e2555")
wp.customize("minimalistflex_color_tint-alt").set("#20152a")
wp.customize("minimalistflex_color_tint-contrast").set("#20152a")
@ -89,6 +93,7 @@ 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")

View File

@ -7,4 +7,14 @@ 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()
})
})

View File

@ -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.0\n"
"Project-Id-Version: MinimalistFlex 1.0.5\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-08-19T23:54:44+00:00\n"
"POT-Creation-Date: 2024-09-14T13:34:32+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,6 +19,11 @@ 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!"
@ -76,7 +81,7 @@ msgstr ""
#. translators: %1$s: Number of comments. %2$s: Post title.
#: comments.php:19
msgctxt "comments title"
msgid "One comment on \"%2$s\""
msgid "%1$s comment on \"%2$s\""
msgid_plural "%1$s comments on \"%2$s\""
msgstr[0] ""
msgstr[1] ""
@ -94,7 +99,7 @@ msgid "Newer Comments &rarr;"
msgstr ""
#: comments.php:51
#: singular.php:52
#: singular.php:58
msgid "Comments are closed."
msgstr ""
@ -107,79 +112,69 @@ msgstr ""
msgid "Theme <a href=\"%s\">MinimalistFlex</a>."
msgstr ""
#: functions.php:59
msgctxt "sidebar name"
msgid "Menu"
#: functions.php:37
msgid "An abstract default header image."
msgstr ""
#: functions.php:61
msgid "Widgets in this area will be shown at the right in the main navigation menu dropdown."
#: functions.php:42
msgid "A default header image that contains three lines."
msgstr ""
#: 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
#: functions.php:67
msgctxt "sidebar name"
msgid "Main Sidebar"
msgstr ""
#: functions.php:79
#: functions.php:69
msgid "Widgets in this area will be shown on all posts and pages."
msgstr ""
#: functions.php:86
#: functions.php:76
msgctxt "sidebar name"
msgid "Above Content"
msgstr ""
#: functions.php:88
#: functions.php:78
msgid "Widgets in this area will be shown above the main content."
msgstr ""
#: functions.php:95
#: functions.php:85
msgctxt "sidebar name"
msgid "Below Content"
msgstr ""
#: functions.php:97
#: functions.php:87
msgid "Widgets in this area will be shown below the main content."
msgstr ""
#: functions.php:104
#: functions.php:94
msgctxt "sidebar name"
msgid "Footer"
msgstr ""
#: functions.php:106
#: functions.php:96
msgid "Widgets in this area will be shown in the footer. Always shows."
msgstr ""
#: functions.php:113
#: functions.php:103
msgctxt "sidebar name"
msgid "Footer 2"
msgstr ""
#: functions.php:115
#: functions.php:105
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:122
#: functions.php:112
msgctxt "sidebar name"
msgid "Footer 3"
msgstr ""
#: functions.php:124
#: functions.php:114
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:136
#: functions.php:126
msgid "Main Menu"
msgstr ""
@ -200,12 +195,16 @@ msgstr ""
msgid "The header image."
msgstr ""
#: header.php:93
#: header.php:92
msgid "This element sends you to the last menu item."
msgstr ""
#: header.php:94
msgid "Toggle navigation dropdown"
msgstr ""
#: header.php:105
msgid "Here goes the \"Menu 2\" widget area. This text does not trigger anything."
#: header.php:101
msgid "This element sends you back to the close menu button."
msgstr ""
#: includes/class-color-palette-control.php:35
@ -306,7 +305,7 @@ msgid "Navigation Menu Background"
msgstr ""
#: includes/color-definitions.php:44
msgid "Navigation Menu Sidebar Background"
msgid "Navigation Menu Submenu Background"
msgstr ""
#: includes/color-definitions.php:45
@ -378,7 +377,7 @@ msgid "The background color of the navigation menu dropdown."
msgstr ""
#: includes/color-definitions.php:65
msgid "The background color of the sidebar of the navigation menu dropdown."
msgid "The background color of the submenus of the navigation menu dropdown."
msgstr ""
#: includes/color-definitions.php:66
@ -623,7 +622,7 @@ msgid "You may customize how your footer looks like here."
msgstr ""
#: includes/customizer.php:447
#: templates/loop.php:96
#: templates/loop.php:108
msgid "Read More"
msgstr ""
@ -903,8 +902,8 @@ msgid "Admin"
msgstr ""
#: page.php:24
#: singular.php:42
#: templates/loop.php:66
#: singular.php:48
#: templates/loop.php:73
msgid "Pages: "
msgstr ""
@ -931,8 +930,6 @@ 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 ""
@ -941,22 +938,10 @@ 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 ""
@ -969,13 +954,10 @@ msgstr ""
msgid "Archives"
msgstr ""
#: 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."
#. translators: %s: Title of the post.
#: singular.php:36
#: templates/loop.php:45
msgid "The thumbnail image for %s."
msgstr ""
#: templates/empty.php:3
@ -984,31 +966,36 @@ 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 ""
#: templates/loop.php:50
#. 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
msgctxt "comment count"
msgid "1 Comment"
msgid "%d Comment"
msgid_plural "%d Comments"
msgstr[0] ""
msgstr[1] ""
#. translators: %s: Post publish time.
#: templates/loop.php:82
#: templates/loop.php:89
#: templates/publisher.php:19
msgid "Published on %s"
msgstr ""
#. translators: %s: Post last modified time.
#: templates/loop.php:88
#: templates/loop.php:95
#: templates/publisher.php:25
msgid "Last modified on %s"
msgstr ""
#. translators: %s: Post title.
#: templates/loop.php:102
#: templates/loop.php:104
msgid "Read more of %s"
msgstr ""

Binary file not shown.

View File

@ -2,19 +2,23 @@
# 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-08-19T23:54:44+00:00\n"
"PO-Revision-Date: 2024-08-20 07:55+0800\n"
"POT-Creation-Date: 2024-09-14T13:34:32+00:00\n"
"PO-Revision-Date: 2024-09-14 21:35+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.05.2\n"
"X-Generator: Lokalize 24.08.0\n"
"X-Domain: crystal\n"
"Plural-Forms: nplurals=1; plural=0;\n"
@ -23,6 +27,11 @@ 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 ""
@ -95,7 +104,7 @@ msgstr "%s 的所有文章"
#. translators: %1$s: Number of comments. %2$s: Post title.
#: comments.php:19
msgctxt "comments title"
msgid "One comment on \"%2$s\""
msgid "%1$s comment on \"%2$s\""
msgid_plural "%1$s comments on \"%2$s\""
msgstr[0] "「%2$s」上有 %1$s 条评论"
@ -111,7 +120,7 @@ msgstr "&larr; 更早的评论"
msgid "Newer Comments &rarr;"
msgstr "更新的评论 &rarr;"
#: comments.php:51 singular.php:52
#: comments.php:51 singular.php:58
msgid "Comments are closed."
msgstr "评论已关闭。"
@ -124,72 +133,56 @@ msgstr "返回页首"
msgid "Theme <a href=\"%s\">MinimalistFlex</a>."
msgstr "<a href=\"%s\">MinimalistFlex</a> 主题。"
#: functions.php:59
msgctxt "sidebar name"
msgid "Menu"
msgstr "菜单"
#: functions.php:37
msgid "An abstract default header image."
msgstr "一个抽象的页眉图片。"
#: functions.php:61
msgid ""
"Widgets in this area will be shown at the right in the main navigation menu "
"dropdown."
msgstr "在此区域中的小工具将会显示在导航菜单下拉菜单的右侧。"
#: functions.php:42
msgid "A default header image that contains three lines."
msgstr "一个包含了三条线段的页眉图片。"
#: 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
#: functions.php:67
msgctxt "sidebar name"
msgid "Main Sidebar"
msgstr "主要侧栏"
#: functions.php:79
#: functions.php:69
msgid "Widgets in this area will be shown on all posts and pages."
msgstr "在此区域中的小工具将会显示在所有的文章和页面中。"
#: functions.php:86
#: functions.php:76
msgctxt "sidebar name"
msgid "Above Content"
msgstr "主要内容上方"
#: functions.php:88
#: functions.php:78
msgid "Widgets in this area will be shown above the main content."
msgstr "在此区域中的小工具将会显示在主要内容的上方。"
#: functions.php:95
#: functions.php:85
msgctxt "sidebar name"
msgid "Below Content"
msgstr "主要内容下方"
#: functions.php:97
#: functions.php:87
msgid "Widgets in this area will be shown below the main content."
msgstr "在此区域中的小工具将会显示在主要内容的下方。"
#: functions.php:104
#: functions.php:94
msgctxt "sidebar name"
msgid "Footer"
msgstr "页脚"
#: functions.php:106
#: functions.php:96
msgid "Widgets in this area will be shown in the footer. Always shows."
msgstr "在此区域中的小工具将会显示在页脚中。此小工具区域始终显示。"
#: functions.php:113
#: functions.php:103
msgctxt "sidebar name"
msgid "Footer 2"
msgstr "页脚 2"
#: functions.php:115
#: functions.php:105
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 "
@ -198,12 +191,12 @@ msgstr ""
"在此区域中的小工具将会在页脚中显示,以形成多栏布局。仅当被设置为显示时才会显"
"示。宽度为其它页脚小工具区域的两倍。"
#: functions.php:122
#: functions.php:112
msgctxt "sidebar name"
msgid "Footer 3"
msgstr "页脚 3"
#: functions.php:124
#: functions.php:114
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."
@ -211,7 +204,7 @@ msgstr ""
"在此区域中的小工具将会在页脚中显示,以形成多栏布局。仅当被设置为显示时才会显"
"示。"
#: functions.php:136
#: functions.php:126
msgid "Main Menu"
msgstr "主菜单"
@ -232,14 +225,17 @@ msgstr "页眉图片链接,此链接会转至「%s」。"
msgid "The header image."
msgstr "页眉图片。"
#: header.php:93
#: header.php:92
msgid "This element sends you to the last menu item."
msgstr "此元素将自动转至最后一个菜单项。"
#: header.php:94
msgid "Toggle navigation dropdown"
msgstr "展开或收起导航菜单下拉菜单"
#: header.php:105
msgid ""
"Here goes the \"Menu 2\" widget area. This text does not trigger anything."
msgstr "以下是「菜单 2」小工具中的小工具。此文本并不会链接到任何内容。"
#: header.php:101
msgid "This element sends you back to the close menu button."
msgstr "此元素将自动转至关闭菜单按钮。"
#: includes/class-color-palette-control.php:35
msgctxt "color palette"
@ -312,7 +308,7 @@ msgstr "强调色 B"
#: includes/color-definitions.php:37
msgid "Tint C"
msgstr "强调色 A"
msgstr "强调色 C"
#: includes/color-definitions.php:38
msgid "Contrast (Light)"
@ -339,8 +335,8 @@ msgid "Navigation Menu Background"
msgstr "导航菜单背景"
#: includes/color-definitions.php:44
msgid "Navigation Menu Sidebar Background"
msgstr "导航菜单侧边栏背景"
msgid "Navigation Menu Submenu Background"
msgstr "导航菜单子菜单背景"
#: includes/color-definitions.php:45
msgid "Navigation Menu"
@ -411,8 +407,8 @@ msgid "The background color of the navigation menu dropdown."
msgstr "导航菜单下拉菜单的背景色。"
#: includes/color-definitions.php:65
msgid "The background color of the sidebar of the navigation menu dropdown."
msgstr "导航菜单下拉菜单的侧边栏的背景颜色。"
msgid "The background color of the submenus of the navigation menu dropdown."
msgstr "导航菜单下拉菜单的子菜单的背景颜色。"
#: includes/color-definitions.php:66
msgid "The text color of the navigation menu dropdown."
@ -661,7 +657,7 @@ msgstr "页脚"
msgid "You may customize how your footer looks like here."
msgstr "您可以在此配置您站点的页脚。"
#: includes/customizer.php:447 templates/loop.php:96
#: includes/customizer.php:447 templates/loop.php:108
msgid "Read More"
msgstr "阅读更多"
@ -941,7 +937,7 @@ msgstr "文章作者"
msgid "Admin"
msgstr "管理员"
#: page.php:24 singular.php:42 templates/loop.php:66
#: page.php:24 singular.php:48 templates/loop.php:73
msgid "Pages: "
msgstr "页面:"
@ -965,27 +961,15 @@ 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-menu-2.php:15 sidebar-menu.php:18 sidebar.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 "抱歉,但是在此区域中没有找到任何小工具。 "
@ -998,42 +982,44 @@ msgstr "已显示一些默认的小工具。"
msgid "Archives"
msgstr "归档页"
#: 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 "特色图像。此图像为默认图像,其仅为装饰性的。"
#. translators: %s: Title of the post.
#: singular.php:36 templates/loop.php:45
msgid "The thumbnail image for %s."
msgstr "%s 的特色图像"
#: 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:39
#: templates/loop.php:22
msgid "Thumbnail image of %s. Also a link that navigates to it."
msgstr "文章 %s 的特色图片。此图片也将链接到对应的文章。"
#: templates/loop.php:50
#. 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
msgctxt "comment count"
msgid "1 Comment"
msgid "%d Comment"
msgid_plural "%d Comments"
msgstr[0] "%d 条评论"
#. translators: %s: Post publish time.
#: templates/loop.php:82 templates/publisher.php:19
#: templates/loop.php:89 templates/publisher.php:19
msgid "Published on %s"
msgstr "发表于 %s"
#. translators: %s: Post last modified time.
#: templates/loop.php:88 templates/publisher.php:25
#: templates/loop.php:95 templates/publisher.php:25
msgid "Last modified on %s"
msgstr "最后编辑于 %s"
#. translators: %s: Post title.
#: templates/loop.php:102
#: templates/loop.php:104
msgid "Read more of %s"
msgstr "阅读 %s 的更多内容"

View File

@ -8,7 +8,7 @@ if ( !defined( 'WPINC' ) ) {
<?php if ( have_posts() ) :
the_post();
$id = get_the_ID();
$mf_id = get_the_ID();
?>
<div <?php post_class( "singular" ) ?>>
<?php if ( has_post_thumbnail() ): ?>
@ -31,6 +31,4 @@ if ( !defined( 'WPINC' ) ) {
</div>
<?php endif; ?>
<?php ?>
<?php get_footer(); ?>

View File

@ -1,5 +1,5 @@
=== MinimalistFlex ===
Stable tag: 1.0.0
Stable tag: 1.0.2
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,6 +28,9 @@ 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? =
@ -48,6 +51,33 @@ 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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -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. */
__( 'You have searched for: "%s"', 'minimalistflex' ),
esc_html__( '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. */
__( 'You have searched for: "%s"', 'minimalistflex' ),
esc_html__( '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' ) ?>

View File

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

View File

@ -1,18 +0,0 @@
<?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; ?>

View File

@ -1,22 +0,0 @@
<?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' ) ?>">&gt;</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' ) ?>">&lt;</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' ) ?>">&gt;</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' ) ?>">&lt;</a>
<?php endif; ?>

View File

@ -23,19 +23,10 @@ if ( !defined( 'WPINC' ) ) {
</li>
<li id="archives" class="panel widget">
<h3 class="widget-title"><?php _e( 'Archives', 'minimalistflex' ); ?></h3>
<h3 class="widget-title"><?php esc_html_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; ?>

View File

@ -5,35 +5,42 @@ if ( !defined( 'WPINC' ) ) {
?>
<?php
$default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
$default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
$mf_default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
$mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
?>
<?php get_header(); ?>
<?php if ( have_posts() ) :
the_post();
$id = get_the_author_meta( 'ID' );
$mf_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 ( ( $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 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 else: ?>
<?php
$key = minimalistflex_get_seconds() % count($default_images);
$imgsrc = $default_images[$key];
$mf_key = minimalistflex_get_seconds() % count($mf_default_images);
$mf_imgsrc = $mf_default_images[$mf_key];
?>
<?php endif; ?>
<div class="singular-image">
<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' ) ?>">
<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() )
)
?>">
</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">
@ -42,14 +49,17 @@ $default_image_location = get_theme_mod( 'minimalistflex_default_featured_images
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __( 'Pages: ', 'minimalistflex' ) . '</span>'
) ); ?>
</div>
</div>
<?php get_sidebar( 'below-content' ) ?>
<div class="singular-card">
<?php get_template_part( 'templates/author' ) ?>
<?php get_template_part( 'templates/metadata' ) ?>
</div>
</div>
<?php if ( comments_open() || get_comments_number() ) :
comments_template();
else: ?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'minimalistflex' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'minimalistflex' ); ?></p>
<?php endif; ?>
</div>
<?php else: ?>

712
style.css

File diff suppressed because it is too large Load Diff

View File

@ -4,14 +4,14 @@ if ( !defined( 'WPINC' ) ) {
}
?>
<?php $userid = get_the_author_meta( 'ID' ) ?>
<?php $mf_userid = get_the_author_meta( 'ID' ) ?>
<div class="singular-author">
<div class="author-card">
<div class="author-avatar">
<?php echo get_avatar( $userid, 80 ); ?>
<?php echo get_avatar( $mf_userid, 80 ); ?>
</div>
<div class="author-description">
<a class="author-link" href="<?php echo get_author_posts_url( $userid ) ?>"><?php the_author() ?></a>
<a class="author-link" href="<?php echo esc_url( get_author_posts_url( $mf_userid ) ) ?>"><?php the_author() ?></a>
<p class="author-tagline"><?php the_author_meta( 'description' ) ?></p>
</div>
</div>

View File

@ -5,104 +5,112 @@ if ( !defined( 'WPINC' ) ) {
?>
<?php
$default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
$default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
$mf_default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
$mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
?>
<?php while ( have_posts() ) :
the_post();
$id = get_the_author_meta('ID');
$post_id = get_the_ID();
$mf_id = get_the_author_meta('ID');
$mf_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. */
__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
get_the_title()
esc_attr__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
esc_attr( get_the_title() )
) ?>">
<?php the_post_thumbnail( 'large' ); ?>
</a>
<?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 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 else: ?>
<?php
$key = minimalistflex_get_seconds() % count($default_images);
$imgsrc = $default_images[$key];
$mf_key = minimalistflex_get_seconds() % count($mf_default_images);
$mf_imgsrc = $mf_default_images[$mf_key];
?>
<?php endif; ?>
<a class="panel-image" href="<?php the_permalink() ?>" aria-label="<?php
printf(
/* translators: %s: Post title associated with the thumbnail image. */
__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
get_the_title()
esc_attr__( 'The thhumbnail image link 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' ) ?>">
<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() )
)
?>">
</a>
<?php endif; ?>
<div class="panel-content">
<?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>
<h2 class="panel-title"><?php the_title(); ?></h2>
<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($id) ) ?>">
<span aria-hidden="true"><?php echo get_avatar( $id, 80 ) ?></span>
<?php the_author() ?>
<?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>
</a>
<?php endif; ?>
<?php $datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
<?php if ( $datemode <> 'no' ): ?>
<?php $mf_datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
<?php if ( $mf_datemode <> 'no' ): ?>
<div class="panel-author">
<?php if ( $datemode == 'publish' || get_the_modified_date() <> get_the_date() ): ?>
<?php if ( $mf_datemode === 'publish' || get_the_modified_date() <> get_the_date() ): ?>
<?php printf(
/* translators: %s: Post publish time. */
__( 'Published on %s', 'minimalistflex' ),
get_the_date()
esc_html__( 'Published on %s', 'minimalistflex' ),
esc_html( get_the_date() )
) ?>
<?php else: ?>
<?php printf(
/* translators: %s: Post last modified time. */
__( 'Last modified on %s', 'minimalistflex' ),
get_the_modified_date()
esc_html__( 'Last modified on %s', 'minimalistflex' ),
esc_html( get_the_modified_date() )
) ?>
<?php endif; ?>
</div>
<?php endif; ?>
<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 if ( get_theme_mod( 'minimalistflex_interface_comment_count', 'yes' ) === 'yes' ): ?>
<div class="panel-comment-count">
<a href="<?php echo esc_url( get_comments_link() ) ?>">
<?php
printf(
/* translators: %d: Number of comments. */
esc_html( _nx(
'%d Comment',
'%d Comments',
get_comments_number(),
'comment count',
'minimalistflex'
) ),
esc_html( number_format_i18n( get_comments_number() ) )
);
?>
</a>
</div>
<?php endif; ?>
</div>
<div class="panel-link-container">
<a class="panel panel-link" href="<?php the_permalink(); ?>" aria-label="<?php
printf(
/* translators: %s: Post title. */
__( 'Read more of %s', 'minimalistflex' ),
get_the_title()
) ?>
</span>
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' ) ) ); ?>
</a>
</div>
</div>

View File

@ -5,31 +5,31 @@ if ( !defined( 'WPINC' ) ) {
?>
<div class="singular-meta">
<?php $tags = get_the_category(); ?>
<?php if( $tags ): ?>
<?php $mf_tags = get_the_category(); ?>
<?php if( $mf_tags ): ?>
<div class="singular-categories">
<div class="categories-indicator">
<?php esc_html_e( 'Categories:', 'minimalistflex' ) ?>
</div>
<?php foreach( $tags as $tag ) { ?>
<?php foreach( $mf_tags as $mf_tag ) { ?>
<div class="singular-category">
<a href="<?php echo esc_url( get_category_link( $tag ) ) ?>">
<?php echo $tag->name; ?>
<a href="<?php echo esc_url( get_category_link( $mf_tag ) ) ?>">
<?php echo esc_html( $mf_tag->name ) ?>
</a>
</div>
<?php } ?>
</div>
<?php endif; ?>
<?php $tags = get_the_tags(); ?>
<?php if( $tags ): ?>
<?php $mf_tags = get_the_tags(); ?>
<?php if( $mf_tags ): ?>
<div class="singular-categories singular-tags">
<div class="categories-indicator tags-indicator">
<?php esc_html_e( 'Tags:', 'minimalistflex' ) ?>
</div>
<?php foreach( $tags as $tag ) { ?>
<?php foreach( $mf_tags as $mf_tag ) { ?>
<div class="singular-category singular-tag">
<a href="<?php echo esc_url( get_tag_link( $tag ) ) ?>">
<?php echo $tag->name; ?>
<a href="<?php echo esc_url( get_tag_link( $mf_tag ) ) ?>">
<?php echo esc_html( $mf_tag->name ) ?>
</a>
</div>
<?php } ?>

View File

@ -4,10 +4,12 @@ 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($id) ) ?>">
<?php echo get_avatar( $id, 32 ) ?>
<a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($mf_id) ) ?>">
<?php echo get_avatar( $mf_id, 32 ) ?>
<span><?php the_author() ?></span>
</a>
<div class="publisher-datetime">
@ -16,14 +18,14 @@ if ( !defined( 'WPINC' ) ) {
<?php if ( $datemode == 'publish' || get_the_modified_date() <> get_the_date() ): ?>
<?php printf(
/* translators: %s: Post publish time. */
__( 'Published on %s', 'minimalistflex' ),
get_the_date()
esc_html__( 'Published on %s', 'minimalistflex' ),
esc_html( get_the_date() )
) ?>
<?php else: ?>
<?php printf(
/* translators: %s: Post last modified time. */
__( 'Last modified on %s', 'minimalistflex' ),
get_the_modified_date()
esc_html__( 'Last modified on %s', 'minimalistflex' ),
esc_html( get_the_modified_date() )
) ?>
<?php endif; ?>
<?php endif; ?>