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

wp updates

parent b09cb08a
......@@ -51,13 +51,13 @@
function read(s, converter) {
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) {
// Write
if (value !== undefined && !$.isFunction(value)) {
if (value !== undefined && !(typeof value === 'function')) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
......
......@@ -620,13 +620,9 @@ var knownMenuFields = {
caption: 'Embedded page ID',
defaultValue: 'Select page to display',
type: 'text',
visible: false, //Displayed on-demand.
addDropdown: 'ws_embedded_page_selector',
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);
var pageId = parseInt(getFieldValue(menuItem, 'embedded_page_id', 0), 10),
blogId = parseInt(getFieldValue(menuItem, 'embedded_page_blog_id', 1), 10),
......@@ -659,6 +655,11 @@ var knownMenuFields = {
write: function() {
//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 @@
Plugin Name: Admin Menu Editor Pro
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.
Version: 2.14
Version: 2.14.1
Author: Janis Elsts
Author URI: http://w-shadow.com/
Slug: admin-menu-editor-pro
......
......@@ -156,8 +156,9 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ):
if ( $shouldCheck ) {
$update = $this->updateChecker->checkForUpdates();
$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
//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.
......@@ -169,7 +170,7 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ):
'puc-bitbucket-http-error',
);
foreach ($this->lastRequestApiErrors as $item) {
foreach ($lastRequestApiErrors as $item) {
$wpError = $item['error'];
/** @var WP_Error $wpError */
if ( !in_array($wpError->get_error_code(), $questionableErrorCodes) ) {
......@@ -180,7 +181,7 @@ if ( !class_exists('Puc_v4p10_Plugin_Ui', false) ):
if ( $foundCriticalErrors ) {
$status = 'error';
set_site_transient($this->manualCheckErrorTransient, $this->lastRequestApiErrors, 60);
set_site_transient($this->manualCheckErrorTransient, $lastRequestApiErrors, 60);
}
}
......
......@@ -3,7 +3,7 @@ Contributors: whiteshadow
Tags: admin, dashboard, menu, security, wpmu
Requires at least: 4.1
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.
......@@ -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/)
= 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) =
##### 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.
......
{
"extends": [
"stylelint-config-wordpress"
],
"rules": {
"indentation": "tab",
"no-duplicate-selectors": null,
"function-url-quotes": null,
"selector-attribute-quotes": null,
"declaration-block-no-duplicate-properties": null,
"function-calc-no-unspaced-operator": null,
"selector-pseudo-class-no-unknown": null,
"selector-class-pattern": null,
"font-weight-notation": null,
"selector-type-no-unknown": null,
"max-line-length": null,
"at-rule-empty-line-before": null,
"selector-pseudo-element-colon-notation": null,
"number-leading-zero": null,
"no-descending-specificity": null
}
}
{
"extends": [
"stylelint-config-wordpress"
],
"rules": {
"indentation": "tab",
"no-duplicate-selectors": null,
"function-url-quotes": null,
"selector-attribute-quotes": null,
"declaration-block-no-duplicate-properties": null,
"function-calc-no-unspaced-operator": null,
"selector-pseudo-class-no-unknown": null,
"selector-class-pattern": null,
"font-weight-notation": null,
"selector-type-no-unknown": null,
"max-line-length": null,
"at-rule-empty-line-before": null,
"selector-pseudo-element-colon-notation": null,
"number-leading-zero": null,
"no-descending-specificity": null
}
}
{
"extends": [
"stylelint-config-wordpress/scss"
],
"rules": {
"selector-class-pattern": null,
"font-weight-notation": null,
"selector-type-no-unknown": null,
"max-line-length": null,
"at-rule-empty-line-before": null,
"selector-pseudo-element-colon-notation": null,
"number-leading-zero": null,
"no-descending-specificity": null
}
}
{
"extends": [
"stylelint-config-wordpress/scss"
],
"rules": {
"selector-class-pattern": null,
"font-weight-notation": null,
"selector-type-no-unknown": null,
"max-line-length": null,
"at-rule-empty-line-before": null,
"selector-pseudo-element-colon-notation": null,
"number-leading-zero": null,
"no-descending-specificity": null
}
}
<?php
/**
* The template for displaying 404 pages (not found)
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package WordPress
* @subpackage Twenty_Twenty_One
* @since Twenty Twenty-One 1.0
*/
get_header();
?>
<header class="page-header alignwide">
<h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1>
</header><!-- .page-header -->
<div class="error-404 not-found default-max-width">
<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentytwentyone' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .page-content -->
</div><!-- .error-404 -->
<?php
get_footer();
<?php
/**
* The template for displaying 404 pages (not found)
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package WordPress
* @subpackage Twenty_Twenty_One
* @since Twenty Twenty-One 1.0
*/
get_header();
?>
<header class="page-header alignwide">
<h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1>
</header><!-- .page-header -->
<div class="error-404 not-found default-max-width">
<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentytwentyone' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .page-content -->
</div><!-- .error-404 -->
<?php
get_footer();
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Twenty_One
* @since Twenty Twenty-One 1.0
*/
get_header();
$description = get_the_archive_description();
?>
<?php if ( have_posts() ) : ?>
<header class="page-header alignwide">
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
<?php if ( $description ) : ?>
<div class="archive-description"><?php echo wp_kses_post( wpautop( $description ) ); ?></div>
<?php endif; ?>
</header><!-- .page-header -->
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<?php get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) ); ?>
<?php endwhile; ?>
<?php twenty_twenty_one_the_posts_navigation(); ?>
<?php else : ?>
<?php get_template_part( 'template-parts/content/content-none' ); ?>
<?php endif; ?>
<?php get_footer(); ?>
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Twenty_One
* @since Twenty Twenty-One 1.0
*/
get_header();
$description = get_the_archive_description();
?>
<?php if ( have_posts() ) : ?>
<header class="page-header alignwide">
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
<?php if ( $description ) : ?>
<div class="archive-description"><?php echo wp_kses_post( wpautop( $description ) ); ?></div>
<?php endif; ?>
</header><!-- .page-header -->
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<?php get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) ); ?>
<?php endwhile; ?>
<?php twenty_twenty_one_the_posts_navigation(); ?>
<?php else : ?>
<?php get_template_part( 'template-parts/content/content-none' ); ?>
<?php endif; ?>
<?php get_footer(); ?>
/**
* Custom Color Overrides
*
* This file is automatically populated if the user chooses custom colors in the Customzier.
*/
/**
* Custom Color Overrides
*
* This file is automatically populated if the user chooses custom colors in the Customzier.
*/
@charset "UTF-8";
/**
* These styles should be loaded by the Block Editor only
*/
/* Variables */
:root {
/* Font Family */
/* Font Size */
/* Line Height */
/* Headings */
/* Block: Latest posts */
/* Colors */
/* Body text color, site title, footer text color. */
/* Headings */
/* Mint, default body background */
/* Used for borders (separators) */
/* Spacing */
/* Elevation */
/* Forms */
/* Cover block */
/* Buttons */
/* entry */
/* Header */
/* Main navigation */
/* Pagination */
/* Footer */
/* Block: Pull quote */
/* Block: Table */
/* Widgets */
/* Admin-bar height */
}
/**
* Responsive Styles
*/
/**
* Required Variables
*/
/**
* Root Media Query Variables
*/
/**
* Extends
*/
.default-max-width {
max-width: calc(100vw - 30px);
margin-left: auto;
margin-right: auto;
}
@media only screen and (min-width: 482px) {
.default-max-width {
max-width: min(calc(100vw - 100px), 610px);
}
}
@media only screen and (min-width: 822px) {
.default-max-width {
max-width: min(calc(100vw - 200px), 610px);
}
}
.wide-max-width {
max-width: calc(100vw - 30px);
margin-left: auto;
margin-right: auto;
}
@media only screen and (min-width: 482px) {
.wide-max-width {
max-width: calc(100vw - 100px);
}
}
@media only screen and (min-width: 822px) {
.wide-max-width {
max-width: min(calc(100vw - 200px), 1240px);
}
}
@media only screen and (min-width: 482px) {
.full-max-width {
max-width: 100%;
width: auto;
margin-left: auto;
margin-right: auto;
}
}
blockquote {
padding: 0;
position: relative;
margin: 30px 0 30px 25px;
}
blockquote > * {
margin-top: 20px;
margin-bottom: 20px;
}
blockquote > *:first-child {
margin-top: 0;
}
blockquote > *:last-child {
margin-bottom: 0;
}
blockquote p {
letter-spacing: normal;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 1.25rem;
font-style: normal;
font-weight: 700;
line-height: 1.7;
}
blockquote cite {
font-weight: normal;
color: #28303d;
font-size: 1rem;
letter-spacing: normal;
}
blockquote footer {
font-weight: normal;
color: #28303d;
font-size: 1rem;
letter-spacing: normal;
}
blockquote.alignleft,
blockquote.alignright {
padding-left: inherit;
}
blockquote.alignleft p {
font-size: 1.125rem;
max-width: inherit;
width: inherit;
}
blockquote.alignright p {
font-size: 1.125rem;
max-width: inherit;
width: inherit;
}
blockquote.alignleft cite {
font-size: 1rem;
letter-spacing: normal;
}
blockquote.alignleft footer {
font-size: 1rem;
letter-spacing: normal;
}
blockquote.alignright cite {
font-size: 1rem;
letter-spacing: normal;
}
blockquote.alignright footer {
font-size: 1rem;
letter-spacing: normal;
}
blockquote strong {
font-weight: bolder;
}
blockquote:before {
content: "“";
font-size: 1.25rem;
line-height: 1.7;
position: absolute;
left: -12px;
}
blockquote .wp-block-quote__citation {
color: #28303d;
font-size: 1rem;
font-style: normal;
}
blockquote cite {
color: #28303d;
font-size: 1rem;
font-style: normal;
}
blockquote footer {
color: #28303d;
font-size: 1rem;
font-style: normal;
}
@media only screen and (max-width: 481px) {
blockquote {
padding-left: 13px;
}
blockquote:before {
left: 0;
}
}
img {
display: block;
height: auto;
max-width: 100%;
}
/* Classic editor images */
.entry-content img {
max-width: 100%;
}
/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object,
video {
max-width: 100%;
}
/* Media captions */
figcaption {
color: currentColor;
font-size: 1rem;
line-height: 1.7;
margin-top: 10px;
margin-bottom: 20px;
text-align: center;
}