Commit 34436ab4 authored by alain's avatar alain 🐙
Browse files

wp updates

parent b09cb08a
...@@ -51,13 +51,13 @@ ...@@ -51,13 +51,13 @@
function read(s, converter) { function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s); var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value; return (typeof converter === 'function') ? converter(value) : value;
} }
var config = $.cookie = function (key, value, options) { var config = $.cookie = function (key, value, options) {
// Write // Write
if (value !== undefined && !$.isFunction(value)) { if (value !== undefined && !(typeof value === 'function')) {
options = $.extend({}, config.defaults, options); options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') { if (typeof options.expires === 'number') {
......
...@@ -620,13 +620,9 @@ var knownMenuFields = { ...@@ -620,13 +620,9 @@ var knownMenuFields = {
caption: 'Embedded page ID', caption: 'Embedded page ID',
defaultValue: 'Select page to display', defaultValue: 'Select page to display',
type: 'text', type: 'text',
visible: false, //Displayed on-demand.
addDropdown: 'ws_embedded_page_selector', addDropdown: 'ws_embedded_page_selector',
display: function(menuItem, displayValue, input) { display: function(menuItem, displayValue, input) {
//Only show this field if the "Embed WP page" template is selected.
input.closest('.ws_edit_field').toggle(menuItem.template_id === wsEditorData.embeddedPageTemplateId);
input.prop('readonly', true); input.prop('readonly', true);
var pageId = parseInt(getFieldValue(menuItem, 'embedded_page_id', 0), 10), var pageId = parseInt(getFieldValue(menuItem, 'embedded_page_id', 0), 10),
blogId = parseInt(getFieldValue(menuItem, 'embedded_page_blog_id', 1), 10), blogId = parseInt(getFieldValue(menuItem, 'embedded_page_blog_id', 1), 10),
...@@ -659,6 +655,11 @@ var knownMenuFields = { ...@@ -659,6 +655,11 @@ var knownMenuFields = {
write: function() { write: function() {
//The user cannot directly edit this field. We deliberately ignore writes. //The user cannot directly edit this field. We deliberately ignore writes.
},
visible: function(menuItem) {
//Only show this field if the "Embed WP page" template is selected.
return (menuItem.template_id === wsEditorData.embeddedPageTemplateId);
} }
}), }),
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Plugin Name: Admin Menu Editor Pro Plugin Name: Admin Menu Editor Pro
Plugin URI: http://adminmenueditor.com/ Plugin URI: http://adminmenueditor.com/
Description: Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more. Description: Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more.
Version: 2.14 Version: 2.14.1
Author: Janis Elsts Author: Janis Elsts
Author URI: http://w-shadow.com/ Author URI: http://w-shadow.com/
Slug: admin-menu-editor-pro Slug: admin-menu-editor-pro
......
...@@ -156,8 +156,9 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ): ...@@ -156,8 +156,9 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ):
if ( $shouldCheck ) { if ( $shouldCheck ) {
$update = $this->updateChecker->checkForUpdates(); $update = $this->updateChecker->checkForUpdates();
$status = ($update === null) ? 'no_update' : 'update_available'; $status = ($update === null) ? 'no_update' : 'update_available';
$lastRequestApiErrors = $this->updateChecker->getLastRequestApiErrors();
if ( ($update === null) && !empty($this->lastRequestApiErrors) ) { if ( ($update === null) && !empty($lastRequestApiErrors) ) {
//Some errors are not critical. For example, if PUC tries to retrieve the readme.txt //Some errors are not critical. For example, if PUC tries to retrieve the readme.txt
//file from GitHub and gets a 404, that's an API error, but it doesn't prevent updates //file from GitHub and gets a 404, that's an API error, but it doesn't prevent updates
//from working. Maybe the plugin simply doesn't have a readme. //from working. Maybe the plugin simply doesn't have a readme.
...@@ -169,7 +170,7 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ): ...@@ -169,7 +170,7 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ):
'puc-bitbucket-http-error', 'puc-bitbucket-http-error',
); );
foreach ($this->lastRequestApiErrors as $item) { foreach ($lastRequestApiErrors as $item) {
$wpError = $item['error']; $wpError = $item['error'];
/** @var WP_Error $wpError */ /** @var WP_Error $wpError */
if ( !in_array($wpError->get_error_code(), $questionableErrorCodes) ) { if ( !in_array($wpError->get_error_code(), $questionableErrorCodes) ) {
...@@ -180,7 +181,7 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ): ...@@ -180,7 +181,7 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ):
if ( $foundCriticalErrors ) { if ( $foundCriticalErrors ) {
$status = 'error'; $status = 'error';
set_site_transient($this->manualCheckErrorTransient, $this->lastRequestApiErrors, 60); set_site_transient($this->manualCheckErrorTransient, $lastRequestApiErrors, 60);
} }
} }
......
...@@ -3,7 +3,7 @@ Contributors: whiteshadow ...@@ -3,7 +3,7 @@ Contributors: whiteshadow
Tags: admin, dashboard, menu, security, wpmu Tags: admin, dashboard, menu, security, wpmu
Requires at least: 4.1 Requires at least: 4.1
Tested up to: 5.7 Tested up to: 5.7
Stable tag: 2.14 Stable tag: 2.14.1
Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more. Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more.
...@@ -83,6 +83,11 @@ Here are some usage tips and other things that can be good to know when using th ...@@ -83,6 +83,11 @@ Here are some usage tips and other things that can be good to know when using th
[Get the latest version here.](http://adminmenueditor.com/updates/) [Get the latest version here.](http://adminmenueditor.com/updates/)
= 2.14.1 (2021-03-15) =
##### Fixed
* Fixed a bug introduced in version 2.14 where the "Embed WP page" feature would no longer display the field that let you choose the page.
* Fixed a jQuery Migrate warning about isFunction() being deprecated.
= 2.14 (2021-03-08) = = 2.14 (2021-03-08) =
##### Added ##### Added
* Added the ability to create menu headings. Headings are unclickable and can be styled separately from regular menu items. By default, their color and background don't change on hover. You can configure headings to act as collapsible sections. When you click a collapsible heading, it will show/hide all of the menu items between that heading and the next one. * Added the ability to create menu headings. Headings are unclickable and can be styled separately from regular menu items. By default, their color and background don't change on hover. You can configure headings to act as collapsible sections. When you click a collapsible heading, it will show/hide all of the menu items between that heading and the next one.
......
{ {
"extends": [ "extends": [
"stylelint-config-wordpress" "stylelint-config-wordpress"
], ],
"rules": { "rules": {
"indentation": "tab", "indentation": "tab",
"no-duplicate-selectors": null, "no-duplicate-selectors": null,
"function-url-quotes": null, "function-url-quotes": null,
"selector-attribute-quotes": null, "selector-attribute-quotes": null,
"declaration-block-no-duplicate-properties": null, "declaration-block-no-duplicate-properties": null,
"function-calc-no-unspaced-operator": null, "function-calc-no-unspaced-operator": null,
"selector-pseudo-class-no-unknown": null, "selector-pseudo-class-no-unknown": null,
"selector-class-pattern": null, "selector-class-pattern": null,
"font-weight-notation": null, "font-weight-notation": null,
"selector-type-no-unknown": null, "selector-type-no-unknown": null,
"max-line-length": null, "max-line-length": null,
"at-rule-empty-line-before": null, "at-rule-empty-line-before": null,
"selector-pseudo-element-colon-notation": null, "selector-pseudo-element-colon-notation": null,
"number-leading-zero": null, "number-leading-zero": null,
"no-descending-specificity": null "no-descending-specificity": null
} }
} }
{ {
"extends": [ "extends": [
"stylelint-config-wordpress/scss" "stylelint-config-wordpress/scss"
], ],
"rules": { "rules": {
"selector-class-pattern": null, "selector-class-pattern": null,
"font-weight-notation": null, "font-weight-notation": null,
"selector-type-no-unknown": null, "selector-type-no-unknown": null,
"max-line-length": null, "max-line-length": null,
"at-rule-empty-line-before": null, "at-rule-empty-line-before": null,
"selector-pseudo-element-colon-notation": null, "selector-pseudo-element-colon-notation": null,
"number-leading-zero": null, "number-leading-zero": null,
"no-descending-specificity": null "no-descending-specificity": null
} }
} }
<?php <?php
/** /**
* The template for displaying 404 pages (not found) * The template for displaying 404 pages (not found)
* *
* @link https://codex.wordpress.org/Creating_an_Error_404_Page * @link https://codex.wordpress.org/Creating_an_Error_404_Page
* *
* @package WordPress * @package WordPress
* @subpackage Twenty_Twenty_One * @subpackage Twenty_Twenty_One
* @since Twenty Twenty-One 1.0 * @since Twenty Twenty-One 1.0
*/ */
get_header(); get_header();
?> ?>
<header class="page-header alignwide"> <header class="page-header alignwide">
<h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1> <h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1>
</header><!-- .page-header --> </header><!-- .page-header -->
<div class="error-404 not-found default-max-width"> <div class="error-404 not-found default-max-width">
<div class="page-content"> <div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentytwentyone' ); ?></p> <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentytwentyone' ); ?></p>
<?php get_search_form(); ?> <?php get_search_form(); ?>
</div><!-- .page-content --> </div><!-- .page-content -->
</div><!-- .error-404 --> </div><!-- .error-404 -->
<?php <?php
get_footer(); get_footer();
<?php <?php
/** /**
* The template for displaying archive pages * The template for displaying archive pages
* *
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
* *
* @package WordPress * @package WordPress
* @subpackage Twenty_Twenty_One * @subpackage Twenty_Twenty_One
* @since Twenty Twenty-One 1.0 * @since Twenty Twenty-One 1.0
*/ */
get_header(); get_header();
$description = get_the_archive_description(); $description = get_the_archive_description();
?> ?>
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
<header class="page-header alignwide"> <header class="page-header alignwide">
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?> <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
<?php if ( $description ) : ?> <?php if ( $description ) : ?>
<div class="archive-description"><?php echo wp_kses_post( wpautop( $description ) ); ?></div> <div class="archive-description"><?php echo wp_kses_post( wpautop( $description ) ); ?></div>
<?php endif; ?> <?php endif; ?>
</header><!-- .page-header --> </header><!-- .page-header -->
<?php while ( have_posts() ) : ?> <?php while ( have_posts() ) : ?>
<?php the_post(); ?> <?php the_post(); ?>
<?php get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) ); ?> <?php get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) ); ?>
<?php endwhile; ?> <?php endwhile; ?>
<?php twenty_twenty_one_the_posts_navigation(); ?> <?php twenty_twenty_one_the_posts_navigation(); ?>
<?php else : ?> <?php else : ?>
<?php get_template_part( 'template-parts/content/content-none' ); ?> <?php get_template_part( 'template-parts/content/content-none' ); ?>
<?php endif; ?> <?php endif; ?>
<?php get_footer(); ?> <?php get_footer(); ?>
/** /**
* Custom Color Overrides * Custom Color Overrides
* *
* This file is automatically populated if the user chooses custom colors in the Customzier. * This file is automatically populated if the user chooses custom colors in the Customzier.
*/ */
/* /*
Adding print support. The print styles are based on the the great work of Adding print support. The print styles are based on the the great work of
Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/. Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/.
*/ */
/*-------------------------------------------------------------- /*--------------------------------------------------------------
>>> TABLE OF CONTENTS: >>> TABLE OF CONTENTS:
---------------------------------------------------------------- ----------------------------------------------------------------
# Margins & paddings # Margins & paddings
# Typography # Typography
# Page breaks # Page breaks
# Links # Links
# Visibility # Visibility
--------------------------------------------------------------*/ --------------------------------------------------------------*/
@media print { @media print {
/* Margins & paddings */ /* Margins & paddings */
@page { @page {
margin: 2cm; margin: 2cm;
} }
.entry .entry-header, .entry .entry-header,
.entry, .entry,
.single .site-main > article > .entry-footer { .single .site-main > article > .entry-footer {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
.site-footer .site-info { .site-footer .site-info {
margin: 0; margin: 0;
} }
.site-header { .site-header {
padding: 0; padding: 0;
} }
/* Fonts */ /* Fonts */
body { body {
font: 13pt Georgia, "Times New Roman", Times, serif; font: 13pt Georgia, "Times New Roman", Times, serif;
font: 13pt var(--global--font-secondary, Georgia, "Times New Roman", Times, serif); font: 13pt var(--global--font-secondary, Georgia, "Times New Roman", Times, serif);
line-height: 1.3; line-height: 1.3;
background: #fff !important; background: #fff !important;
color: #000; color: #000;
} }
.has-background-dark * { .has-background-dark * {
color: #000 !important; color: #000 !important;
} }
h1, h1,
.entry-title, .entry-title,
.singular .entry-title, .singular .entry-title,
.page-title { .page-title {
font-size: 22pt; font-size: 22pt;
font-weight: bold; font-weight: bold;
} }
h2, h2,
h3, h3,
h4, h4,
.has-regular-font-size, .has-regular-font-size,
.has-large-font-size, .has-large-font-size,
h2.author-title, h2.author-title,
p.author-bio, p.author-bio,
.comments-title, .comments-title,
.archive-description { .archive-description {
font-size: 14pt; font-size: 14pt;
margin-top: 25px; margin-top: 25px;
} }
.comment-meta, .comment-meta,
.comment-meta .comment-author .fn { .comment-meta .comment-author .fn {
font-size: 13pt; font-size: 13pt;
} }
/* Page breaks */ /* Page breaks */
a { a {
page-break-inside: avoid; page-break-inside: avoid;
} }
blockquote { blockquote {
page-break-inside: avoid; page-break-inside: avoid;
} }
h1, h1,
h2, h2,
h3, h3,
h4, h4,
h5, h5,
h6 { h6 {
page-break-after: avoid; page-break-after: avoid;
page-break-inside: avoid; page-break-inside: avoid;
} }
img { img {
page-break-inside: avoid; page-break-inside: avoid;
page-break-after: avoid; page-break-after: avoid;
} }
table, table,
pre, pre,
figure { figure {
page-break-inside: avoid; page-break-inside: avoid;
} }
ul, ul,
ol, ol,
dl { dl {
page-break-before: avoid; page-break-before: avoid;
} }
/* Links */ /* Links */
a:link, a:link,
a:visited, a:visited,
a { a {
background: transparent; background: transparent;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
text-align: left; text-align: left;
} }
a[href^=http]:after { a[href^=http]:after {
content: " < " attr(href) "> "; content: " < " attr(href) "> ";
} }