updated theme GeneratePress version 3.6.1
This commit is contained in:
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array('wp-dom-ready', 'wp-element', 'wp-plugins'), 'version' => '53a6a5a937a68e460003');
|
||||
<?php return array('dependencies' => array('wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-plugins'), 'version' => '24bb9110ccf231b1e49f');
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '731b220042b06e3421fb');
|
||||
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '79795830803e662a540e');
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '8b4cabf5d14f1f64f94a');
|
||||
<?php return array('dependencies' => array(), 'version' => 'b9041bb3f75d06782df7');
|
||||
|
||||
@ -1 +1 @@
|
||||
!function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n=function(e){var n=e.targetModal,r=e.openTrigger,o=e.triggers,a=void 0===o?[]:o,i=document.getElementById(n);if(i){var s={openTrigger:r,closeTrigger:"data-gpmodal-close",openClass:"gp-modal--open"},l="";a.length>0&&function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.filter(Boolean).forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),c()})),e.addEventListener("keydown",(function(e){" "!==e.key&&"Enter"!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),c())}))}))}.apply(void 0,t(a))}function c(){i.classList.add("gp-modal--transition"),l=document.activeElement,i.classList.add(s.openClass),u("disable"),i.addEventListener("touchstart",f),i.addEventListener("click",f),document.addEventListener("keydown",g),function(){var e=v();if(0!==e.length){var t=e.filter((function(e){return!e.hasAttribute(s.closeTrigger)}));t.length>0&&t[0].focus(),0===t.length&&e[0].focus()}}(),setTimeout((function(){return i.classList.remove("gp-modal--transition")}),100)}function d(){i.classList.add("gp-modal--transition"),i.removeEventListener("touchstart",f),i.removeEventListener("click",f),document.removeEventListener("keydown",g),u("enable"),l&&l.focus&&l.focus(),i.classList.remove(s.openClass),setTimeout((function(){return i.classList.remove("gp-modal--transition")}),500)}function u(e){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}function f(e){(e.target.hasAttribute(s.closeTrigger)||e.target.parentNode.hasAttribute(s.closeTrigger))&&(e.preventDefault(),e.stopPropagation(),d())}function g(e){27===e.keyCode&&d(),9===e.keyCode&&function(e){var t=v();if(0!==t.length){var n=(t=t.filter((function(e){return null!==e.offsetParent}))).indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}}(e)}function v(){var e=i.querySelectorAll(["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])']);return Array.apply(void 0,t(e))}},r=Object.assign({},{openTrigger:"data-gpmodal-trigger"}),o=t(document.querySelectorAll("[".concat(r.openTrigger,"]"))).reduce((function(e,t){var n=t.attributes[r.openTrigger].value;return e[n]=e[n]||[],e[n].push(t),e}),[]);for(var a in o){var i=o[a];r.targetModal=a,r.triggers=t(i),new n(r)}}();
|
||||
!function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n=function(e){var n=e.targetModal,r=(e.openTrigger,e.triggers),o=void 0===r?[]:r,a=document.getElementById(n);if(a){var i="data-gpmodal-close",l="gp-modal--open",s="";o.length>0&&function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.filter(Boolean).forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),c()})),e.addEventListener("keydown",(function(e){" "!==e.key&&"Enter"!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),c())}))}))}.apply(void 0,t(o))}function c(){a.classList.add("gp-modal--transition"),s=document.activeElement,a.classList.add(l),u("disable"),a.addEventListener("touchstart",f),a.addEventListener("click",f),document.addEventListener("keydown",v),function(){var e=g();if(0!==e.length){var t=e.filter((function(e){return!e.hasAttribute(i)}));t.length>0&&t[0].focus(),0===t.length&&e[0].focus()}}(),setTimeout((function(){return a.classList.remove("gp-modal--transition")}),100)}function d(){a.classList.add("gp-modal--transition"),a.removeEventListener("touchstart",f),a.removeEventListener("click",f),document.removeEventListener("keydown",v),u("enable"),s&&s.focus&&s.focus(),a.classList.remove(l),setTimeout((function(){return a.classList.remove("gp-modal--transition")}),500)}function u(e){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}function f(e){(e.target.hasAttribute(i)||e.target.parentNode.hasAttribute(i))&&(e.preventDefault(),e.stopPropagation(),d())}function v(e){27===e.keyCode&&d(),9===e.keyCode&&function(e){var t=g();if(0!==t.length){var n=(t=t.filter((function(e){return null!==e.offsetParent}))).indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}}(e)}function g(){var e=a.querySelectorAll(["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])']);return Array.apply(void 0,t(e))}},r=Object.assign({},{openTrigger:"data-gpmodal-trigger"}),o=t(document.querySelectorAll("[".concat(r.openTrigger,"]"))).reduce((function(e,t){var n=t.attributes[r.openTrigger].value;return e[n]=e[n]||[],e[n].push(t),e}),[]);for(var a in o){var i=o[a];r.targetModal=a,r.triggers=t(i),new n(r)}}();
|
||||
19
wp-content/themes/generatepress/assets/js/a11y.js
Normal file
19
wp-content/themes/generatepress/assets/js/a11y.js
Normal file
@ -0,0 +1,19 @@
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
// Check if the browser supports querySelector and addEventListener
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
// Get the body element
|
||||
var body = document.body;
|
||||
|
||||
// Add event listener for pointer interactions with passive option
|
||||
body.addEventListener( 'pointerdown', function() {
|
||||
body.classList.add( 'using-mouse' );
|
||||
}, { passive: true } );
|
||||
|
||||
// Add event listener for keyboard interactions
|
||||
body.addEventListener( 'keydown', function() {
|
||||
body.classList.remove( 'using-mouse' );
|
||||
}, { passive: true } );
|
||||
}
|
||||
}() );
|
||||
@ -1,240 +0,0 @@
|
||||
/*
|
||||
* classList.js: Cross-browser full element.classList implementation.
|
||||
* 1.1.20170427
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
* License: Dedicated to the public domain.
|
||||
* See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/*global self, document, DOMException */
|
||||
|
||||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
||||
|
||||
if ("document" in self) {
|
||||
|
||||
// Full polyfill for browsers with no classList support
|
||||
// Including IE < Edge missing SVGElement.classList
|
||||
if (!("classList" in document.createElement("_"))
|
||||
|| document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg","g"))) {
|
||||
|
||||
(function (view) {
|
||||
|
||||
"use strict";
|
||||
|
||||
if (!('Element' in view)) return;
|
||||
|
||||
var
|
||||
classListProp = "classList"
|
||||
, protoProp = "prototype"
|
||||
, elemCtrProto = view.Element[protoProp]
|
||||
, objCtr = Object
|
||||
, strTrim = String[protoProp].trim || function () {
|
||||
return this.replace(/^\s+|\s+$/g, "");
|
||||
}
|
||||
, arrIndexOf = Array[protoProp].indexOf || function (item) {
|
||||
var
|
||||
i = 0
|
||||
, len = this.length
|
||||
;
|
||||
for (; i < len; i++) {
|
||||
if (i in this && this[i] === item) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
// Vendors: please allow content code to instantiate DOMExceptions
|
||||
, DOMEx = function (type, message) {
|
||||
this.name = type;
|
||||
this.code = DOMException[type];
|
||||
this.message = message;
|
||||
}
|
||||
, checkTokenAndGetIndex = function (classList, token) {
|
||||
if (token === "") {
|
||||
throw new DOMEx(
|
||||
"SYNTAX_ERR"
|
||||
, "An invalid or illegal string was specified"
|
||||
);
|
||||
}
|
||||
if (/\s/.test(token)) {
|
||||
throw new DOMEx(
|
||||
"INVALID_CHARACTER_ERR"
|
||||
, "String contains an invalid character"
|
||||
);
|
||||
}
|
||||
return arrIndexOf.call(classList, token);
|
||||
}
|
||||
, ClassList = function (elem) {
|
||||
var
|
||||
trimmedClasses = strTrim.call(elem.getAttribute("class") || "")
|
||||
, classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
|
||||
, i = 0
|
||||
, len = classes.length
|
||||
;
|
||||
for (; i < len; i++) {
|
||||
this.push(classes[i]);
|
||||
}
|
||||
this._updateClassName = function () {
|
||||
elem.setAttribute("class", this.toString());
|
||||
};
|
||||
}
|
||||
, classListProto = ClassList[protoProp] = []
|
||||
, classListGetter = function () {
|
||||
return new ClassList(this);
|
||||
}
|
||||
;
|
||||
// Most DOMException implementations don't allow calling DOMException's toString()
|
||||
// on non-DOMExceptions. Error's toString() is sufficient here.
|
||||
DOMEx[protoProp] = Error[protoProp];
|
||||
classListProto.item = function (i) {
|
||||
return this[i] || null;
|
||||
};
|
||||
classListProto.contains = function (token) {
|
||||
token += "";
|
||||
return checkTokenAndGetIndex(this, token) !== -1;
|
||||
};
|
||||
classListProto.add = function () {
|
||||
var
|
||||
tokens = arguments
|
||||
, i = 0
|
||||
, l = tokens.length
|
||||
, token
|
||||
, updated = false
|
||||
;
|
||||
do {
|
||||
token = tokens[i] + "";
|
||||
if (checkTokenAndGetIndex(this, token) === -1) {
|
||||
this.push(token);
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
while (++i < l);
|
||||
|
||||
if (updated) {
|
||||
this._updateClassName();
|
||||
}
|
||||
};
|
||||
classListProto.remove = function () {
|
||||
var
|
||||
tokens = arguments
|
||||
, i = 0
|
||||
, l = tokens.length
|
||||
, token
|
||||
, updated = false
|
||||
, index
|
||||
;
|
||||
do {
|
||||
token = tokens[i] + "";
|
||||
index = checkTokenAndGetIndex(this, token);
|
||||
while (index !== -1) {
|
||||
this.splice(index, 1);
|
||||
updated = true;
|
||||
index = checkTokenAndGetIndex(this, token);
|
||||
}
|
||||
}
|
||||
while (++i < l);
|
||||
|
||||
if (updated) {
|
||||
this._updateClassName();
|
||||
}
|
||||
};
|
||||
classListProto.toggle = function (token, force) {
|
||||
token += "";
|
||||
|
||||
var
|
||||
result = this.contains(token)
|
||||
, method = result ?
|
||||
force !== true && "remove"
|
||||
:
|
||||
force !== false && "add"
|
||||
;
|
||||
|
||||
if (method) {
|
||||
this[method](token);
|
||||
}
|
||||
|
||||
if (force === true || force === false) {
|
||||
return force;
|
||||
} else {
|
||||
return !result;
|
||||
}
|
||||
};
|
||||
classListProto.toString = function () {
|
||||
return this.join(" ");
|
||||
};
|
||||
|
||||
if (objCtr.defineProperty) {
|
||||
var classListPropDesc = {
|
||||
get: classListGetter
|
||||
, enumerable: true
|
||||
, configurable: true
|
||||
};
|
||||
try {
|
||||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
|
||||
} catch (ex) { // IE 8 doesn't support enumerable:true
|
||||
// adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
|
||||
// modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
|
||||
if (ex.number === undefined || ex.number === -0x7FF5EC54) {
|
||||
classListPropDesc.enumerable = false;
|
||||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
|
||||
}
|
||||
}
|
||||
} else if (objCtr[protoProp].__defineGetter__) {
|
||||
elemCtrProto.__defineGetter__(classListProp, classListGetter);
|
||||
}
|
||||
|
||||
}(self));
|
||||
|
||||
}
|
||||
|
||||
// There is full or partial native classList support, so just check if we need
|
||||
// to normalize the add/remove and toggle APIs.
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var testElement = document.createElement("_");
|
||||
|
||||
testElement.classList.add("c1", "c2");
|
||||
|
||||
// Polyfill for IE 10/11 and Firefox <26, where classList.add and
|
||||
// classList.remove exist but support only one argument at a time.
|
||||
if (!testElement.classList.contains("c2")) {
|
||||
var createMethod = function(method) {
|
||||
var original = DOMTokenList.prototype[method];
|
||||
|
||||
DOMTokenList.prototype[method] = function(token) {
|
||||
var i, len = arguments.length;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
token = arguments[i];
|
||||
original.call(this, token);
|
||||
}
|
||||
};
|
||||
};
|
||||
createMethod('add');
|
||||
createMethod('remove');
|
||||
}
|
||||
|
||||
testElement.classList.toggle("c3", false);
|
||||
|
||||
// Polyfill for IE 10 and Firefox <24, where classList.toggle does not
|
||||
// support the second argument.
|
||||
if (testElement.classList.contains("c3")) {
|
||||
var _toggle = DOMTokenList.prototype.toggle;
|
||||
|
||||
DOMTokenList.prototype.toggle = function(token, force) {
|
||||
if (1 in arguments && !this.contains(token) === !force) {
|
||||
return force;
|
||||
} else {
|
||||
return _toggle.call(this, token);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
testElement = null;
|
||||
}());
|
||||
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
||||
"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],s=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,s=n.length;s>i;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",""+this)}},u=l[n]=[],h=function(){return new l(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",-1!==c(this,t)},u.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do t=e[n]+"",-1===c(this,t)&&(this.push(t),s=!0);while(++n<i);s&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do for(t=n[i]+"",e=c(this,t);-1!==e;)this.splice(e,1),r=!0,e=c(this,t);while(++i<s);r&&this._updateClassName()},u.toggle=function(t,e){t+="";var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},u.toString=function(){return this.join(" ")},s.defineProperty){var f={get:h,enumerable:!0,configurable:!0};try{s.defineProperty(i,e,f)}catch(g){(void 0===g.number||-2146823252===g.number)&&(f.enumerable=!1,s.defineProperty(i,e,f))}}else s[n].__defineGetter__&&i.__defineGetter__(e,h)}}(self),function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;i>n;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}());
|
||||
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
|
||||
// Set our theme version.
|
||||
define( 'GENERATE_VERSION', '3.5.1' );
|
||||
define( 'GENERATE_VERSION', '3.6.1' );
|
||||
|
||||
if ( ! function_exists( 'generate_setup' ) ) {
|
||||
add_action( 'after_setup_theme', 'generate_setup' );
|
||||
|
||||
@ -67,38 +67,37 @@ if ( ! function_exists( 'generate_scripts' ) ) {
|
||||
wp_enqueue_style( 'generate-child', get_stylesheet_uri(), array( 'generate-style' ), filemtime( get_stylesheet_directory() . '/style.css' ), 'all' );
|
||||
}
|
||||
|
||||
if ( function_exists( 'wp_script_add_data' ) ) {
|
||||
wp_enqueue_script( 'generate-classlist', $dir_uri . "/assets/js/classList{$suffix}.js", array(), GENERATE_VERSION, true );
|
||||
wp_script_add_data( 'generate-classlist', 'conditional', 'lte IE 11' );
|
||||
}
|
||||
|
||||
if ( generate_has_active_menu() ) {
|
||||
wp_enqueue_script( 'generate-menu', $dir_uri . "/assets/js/menu{$suffix}.js", array(), GENERATE_VERSION, true );
|
||||
}
|
||||
|
||||
wp_localize_script(
|
||||
'generate-menu',
|
||||
'generatepressMenu',
|
||||
apply_filters(
|
||||
$menu_script_args = apply_filters(
|
||||
'generate_localize_js_args',
|
||||
array(
|
||||
'toggleOpenedSubMenus' => true,
|
||||
'openSubMenuLabel' => esc_attr__( 'Open Sub-Menu', 'generatepress' ),
|
||||
'closeSubMenuLabel' => esc_attr__( 'Close Sub-Menu', 'generatepress' ),
|
||||
'openSubMenuLabel' => esc_attr__( 'Open Sub-Menu', 'generatepress' ),
|
||||
'closeSubMenuLabel' => esc_attr__( 'Close Sub-Menu', 'generatepress' ),
|
||||
)
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
generate_add_inline_script(
|
||||
'generate-menu',
|
||||
$menu_script_args,
|
||||
'generatepressMenu'
|
||||
);
|
||||
}
|
||||
|
||||
if ( 'click' === generate_get_option( 'nav_dropdown_type' ) || 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) {
|
||||
wp_enqueue_script( 'generate-dropdown-click', $dir_uri . "/assets/js/dropdown-click{$suffix}.js", array(), GENERATE_VERSION, true );
|
||||
|
||||
wp_localize_script(
|
||||
$dropdown_click_args = array(
|
||||
'openSubMenuLabel' => esc_attr__( 'Open Sub-Menu', 'generatepress' ),
|
||||
'closeSubMenuLabel' => esc_attr__( 'Close Sub-Menu', 'generatepress' ),
|
||||
);
|
||||
|
||||
generate_add_inline_script(
|
||||
'generate-dropdown-click',
|
||||
'generatepressDropdownClick',
|
||||
array(
|
||||
'openSubMenuLabel' => esc_attr__( 'Open Sub-Menu', 'generatepress' ),
|
||||
'closeSubMenuLabel' => esc_attr__( 'Close Sub-Menu', 'generatepress' ),
|
||||
)
|
||||
$dropdown_click_args,
|
||||
'generatepressDropdownClick'
|
||||
);
|
||||
}
|
||||
|
||||
@ -109,29 +108,33 @@ if ( ! function_exists( 'generate_scripts' ) ) {
|
||||
if ( 'enable' === generate_get_option( 'nav_search' ) ) {
|
||||
wp_enqueue_script( 'generate-navigation-search', $dir_uri . "/assets/js/navigation-search{$suffix}.js", array(), GENERATE_VERSION, true );
|
||||
|
||||
wp_localize_script(
|
||||
$nav_search_args = array(
|
||||
'open' => esc_attr__( 'Open Search Bar', 'generatepress' ),
|
||||
'close' => esc_attr__( 'Close Search Bar', 'generatepress' ),
|
||||
);
|
||||
|
||||
generate_add_inline_script(
|
||||
'generate-navigation-search',
|
||||
'generatepressNavSearch',
|
||||
array(
|
||||
'open' => esc_attr__( 'Open Search Bar', 'generatepress' ),
|
||||
'close' => esc_attr__( 'Close Search Bar', 'generatepress' ),
|
||||
)
|
||||
$nav_search_args,
|
||||
'generatepressNavSearch'
|
||||
);
|
||||
}
|
||||
|
||||
if ( 'enable' === generate_get_option( 'back_to_top' ) ) {
|
||||
wp_enqueue_script( 'generate-back-to-top', $dir_uri . "/assets/js/back-to-top{$suffix}.js", array(), GENERATE_VERSION, true );
|
||||
|
||||
wp_localize_script(
|
||||
'generate-back-to-top',
|
||||
'generatepressBackToTop',
|
||||
apply_filters(
|
||||
'generate_back_to_top_js_args',
|
||||
array(
|
||||
'smooth' => true,
|
||||
)
|
||||
$back_to_top_args = apply_filters(
|
||||
'generate_back_to_top_js_args',
|
||||
array(
|
||||
'smooth' => true,
|
||||
)
|
||||
);
|
||||
|
||||
generate_add_inline_script(
|
||||
'generate-back-to-top',
|
||||
$back_to_top_args,
|
||||
'generatepressBackToTop'
|
||||
);
|
||||
}
|
||||
|
||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||
@ -482,11 +485,12 @@ add_action( 'wp_footer', 'generate_do_a11y_scripts' );
|
||||
* @since 3.1.0
|
||||
*/
|
||||
function generate_do_a11y_scripts() {
|
||||
if ( apply_filters( 'generate_print_a11y_script', true ) ) {
|
||||
// Add our small a11y script inline.
|
||||
printf(
|
||||
'<script id="generate-a11y">%s</script>',
|
||||
'!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var e=document.body;e.addEventListener("mousedown",function(){e.classList.add("using-mouse")}),e.addEventListener("keydown",function(){e.classList.remove("using-mouse")})}}();'
|
||||
if ( apply_filters( 'generate_print_a11y_script', true ) && function_exists( 'wp_print_inline_script_tag' ) ) {
|
||||
wp_print_inline_script_tag(
|
||||
'!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var e=document.body;e.addEventListener("pointerdown",(function(){e.classList.add("using-mouse")}),{passive:!0}),e.addEventListener("keydown",(function(){e.classList.remove("using-mouse")}),{passive:!0})}}();',
|
||||
array(
|
||||
'id' => 'generate-a11y',
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ function generate_do_search_modal() {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="gp-modal gp-search-modal" id="gp-search">
|
||||
<div class="gp-modal gp-search-modal" id="gp-search" role="dialog" aria-modal="true" aria-label="<?php esc_attr_e( 'Search', 'generatepress' ); ?>">
|
||||
<div class="gp-modal__overlay" tabindex="-1" data-gpmodal-close>
|
||||
<div class="gp-modal__container">
|
||||
<?php do_action( 'generate_inside_search_modal' ); ?>
|
||||
@ -37,7 +37,7 @@ function generate_do_search_modal_trigger() {
|
||||
}
|
||||
?>
|
||||
<span class="menu-bar-item">
|
||||
<a href="#" role="button" aria-label="<?php _e( 'Open search', 'generatepress' ); ?>" data-gpmodal-trigger="gp-search"><?php echo generate_get_svg_icon( 'search', true ); // phpcs:ignore -- Escaped in function. ?></a>
|
||||
<a href="#" role="button" aria-label="<?php _e( 'Open search', 'generatepress' ); ?>" aria-haspopup="dialog" aria-controls="gp-search" data-gpmodal-trigger="gp-search"><?php echo generate_get_svg_icon( 'search', true ); // phpcs:ignore -- Escaped in function. ?></a>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -826,3 +826,19 @@ function generate_has_active_menu() {
|
||||
function generate_is_using_dynamic_typography() {
|
||||
return generate_get_option( 'use_dynamic_typography' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add inline script.
|
||||
*
|
||||
* @param string $handle The script handle to attach the inline script to.
|
||||
* @param array $data The data to be passed to the script.
|
||||
* @param string $var The JavaScript variable name to assign the data to.
|
||||
* @param string $position The position to add the inline script.
|
||||
*/
|
||||
function generate_add_inline_script( $handle, $data, $var, $position = 'before' ) {
|
||||
if ( ! empty( $data ) ) {
|
||||
$json_data = wp_json_encode( $data );
|
||||
$inline_script = "var $var = $json_data;";
|
||||
wp_add_inline_script( $handle, $inline_script, $position );
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,10 +4,10 @@ Donate link: https://generatepress.com/ongoing-development/
|
||||
License: GPLv2 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
|
||||
Requires at least: 6.1
|
||||
Requires at least: 6.5
|
||||
Requires PHP: 7.4
|
||||
Tested up to: 6.6
|
||||
Stable tag: 3.5.1
|
||||
Tested up to: 6.9
|
||||
Stable tag: 3.6.1
|
||||
|
||||
GeneratePress is a lightweight WordPress theme built with a focus on speed and usability.
|
||||
|
||||
@ -79,12 +79,6 @@ http://www.gnu.org/licenses/gpl.html
|
||||
Font License: SIL OFL 1.1 - http://scripts.sil.org/OFL
|
||||
Code License: MIT License - http://opensource.org/licenses/mit-license.html
|
||||
|
||||
= classList =
|
||||
|
||||
By Eli Grey, http://eligrey.com
|
||||
License: Dedicated to the public domain.
|
||||
See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
|
||||
|
||||
= selectWoo =
|
||||
|
||||
MIT License: https://github.com/woocommerce/selectWoo/blob/master/LICENSE.md
|
||||
@ -100,6 +94,17 @@ MIT License: https://github.com/JedWatson/react-select/blob/master/LICENSE
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 3.6.1 =
|
||||
* Tweak: Remove conditional IE script to prevent notice in WP 6.9
|
||||
|
||||
= 3.6.0 =
|
||||
* Fix: Inability to add more than one font in the Font Manager
|
||||
* Tweak: Improve accessibility of navigation search modal
|
||||
* Tweak: Better support for full iframed editor
|
||||
* Tweak: Use passive event listening for a11y script
|
||||
* Tweak: Use `wp_print_inline_script_tag` for a11y script
|
||||
* Tweak: Use `wp_add_inline_script()` for inline script variables
|
||||
|
||||
= 3.5.1 =
|
||||
* Tweak: Revert addition of appearance-tools theme support
|
||||
* Fix: Dropdown click conflict with off-canvas panel
|
||||
|
||||
@ -2,21 +2,21 @@
|
||||
Theme Name: GeneratePress
|
||||
Theme URI: https://generatepress.com
|
||||
Author: Tom Usborne
|
||||
Author URI: https://tomusborne.com
|
||||
Author URI: https://generatepress.com/about
|
||||
Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 10kb (gzipped) to your page size. We take full advantage of the block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS, and is translated into over 25 languages by our amazing community of users. A few of our many features include 60+ color controls, powerful dynamic typography, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover), and 9 widget areas. Learn more and check out our powerful premium version at https://generatepress.com
|
||||
Version: 3.5.1
|
||||
Requires at least: 6.1
|
||||
Tested up to: 6.6
|
||||
Version: 3.6.1
|
||||
Requires at least: 6.5
|
||||
Tested up to: 6.9
|
||||
Requires PHP: 7.4
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: generatepress
|
||||
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
|
||||
|
||||
GeneratePress, Copyright 2014-2024 EDGE22 Studios LTD.
|
||||
GeneratePress, Copyright 2014-2025 EDGE22 Studios LTD.
|
||||
GeneratePress is distributed under the terms of the GNU GPL
|
||||
|
||||
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2024 Automattic, Inc.
|
||||
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2025 Automattic, Inc.
|
||||
|
||||
Actual CSS can be found in /assets/css/ folder.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user