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.
......
......@@ -17,13 +17,6 @@
--table--stripes-background-color: rgba(240, 240, 240, 0.15);
}
.is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button),
.is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav {
background: #000;
color: #fff;
text-decoration: none;
}
.is-dark-theme.is-dark-theme img {
filter: brightness(0.85) contrast(1.1);
}
......
......@@ -17,13 +17,6 @@
--table--stripes-background-color: rgba(240, 240, 240, 0.15);
}
.is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button),
.is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav {
background: #000;
color: #fff;
text-decoration: none;
}
.is-dark-theme.is-dark-theme img {
filter: brightness(0.85) contrast(1.1);
}
......
......@@ -44,7 +44,9 @@ function darkModeInitialLoad() {
}
function darkModeRepositionTogglerOnScroll() {
var prevScroll = window.scrollY || document.documentElement.scrollTop,
var toggler = document.getElementById( 'dark-mode-toggler' ),
prevScroll = window.scrollY || document.documentElement.scrollTop,
currentScroll,
checkScroll = function() {
......@@ -53,13 +55,16 @@ function darkModeRepositionTogglerOnScroll() {
currentScroll + ( window.innerHeight * 1.5 ) > document.body.clientHeight ||
currentScroll < prevScroll
) {
document.getElementById( 'dark-mode-toggler' ).classList.remove( 'hide' );
toggler.classList.remove( 'hide' );
} else if ( currentScroll > prevScroll && 250 < currentScroll ) {
document.getElementById( 'dark-mode-toggler' ).classList.add( 'hide' );
toggler.classList.add( 'hide' );
}
prevScroll = currentScroll;
};
if ( toggler ) {
window.addEventListener( 'scroll', checkScroll );
}
}
darkModeInitialLoad();
......
......@@ -7,7 +7,7 @@ Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the
Requires at least: 5.3
Tested up to: 5.6
Requires PHP: 5.6
Version: 1.1
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyone
......
......@@ -227,7 +227,7 @@ $baseline-unit: 10px;
--widget--spacing-menu: calc(0.66 * var(--global--spacing-unit));
/* Admin-bar height */
--global--admin-bar--height: 0;
--global--admin-bar--height: 0px;
}
.admin-bar {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment