mirror of
https://github.com/elementor/hello-theme.git
synced 2025-10-04 15:42:19 +08:00
Merge branch 'fixes/2.4.0' of https://github.com/Obox/hello-theme-1 into fixes/2.4.0
This commit is contained in:
commit
a3f863679e
18 changed files with 282 additions and 979 deletions
65
Gruntfile.js
65
Gruntfile.js
|
@ -4,10 +4,9 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function( grunt ) {
|
||||
|
||||
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks );
|
||||
|
||||
const sass = require('node-sass');
|
||||
|
||||
const sass = require( 'node-sass' );
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig( {
|
||||
|
@ -17,7 +16,7 @@ module.exports = function( grunt ) {
|
|||
|
||||
sass: {
|
||||
options: {
|
||||
implementation: sass
|
||||
implementation: sass,
|
||||
},
|
||||
dist: {
|
||||
files: [ {
|
||||
|
@ -25,9 +24,9 @@ module.exports = function( grunt ) {
|
|||
cwd: 'assets/scss',
|
||||
src: '*.scss',
|
||||
dest: './',
|
||||
ext: '.css'
|
||||
} ]
|
||||
}
|
||||
ext: '.css',
|
||||
} ],
|
||||
},
|
||||
},
|
||||
|
||||
postcss: {
|
||||
|
@ -37,47 +36,47 @@ module.exports = function( grunt ) {
|
|||
|
||||
processors: [
|
||||
require( 'autoprefixer' )( {
|
||||
browsers: 'last 3 versions'
|
||||
} )
|
||||
]
|
||||
browsers: 'last 3 versions',
|
||||
} ),
|
||||
],
|
||||
},
|
||||
files: [ {
|
||||
src: [
|
||||
'*.css',
|
||||
'!*.min.css'
|
||||
]
|
||||
} ]
|
||||
'!*.min.css',
|
||||
],
|
||||
} ],
|
||||
},
|
||||
minify: {
|
||||
options: {
|
||||
processors: [
|
||||
require( 'autoprefixer' )( {
|
||||
browsers: 'last 3 versions'
|
||||
browsers: 'last 3 versions',
|
||||
} ),
|
||||
require( "cssnano" )( {
|
||||
require( 'cssnano' )( {
|
||||
reduceIdents: false,
|
||||
zindex: false,
|
||||
} )
|
||||
]
|
||||
} ),
|
||||
],
|
||||
},
|
||||
files: [ {
|
||||
expand: true,
|
||||
src: [
|
||||
'*.css',
|
||||
'!*.min.css'
|
||||
'!*.min.css',
|
||||
],
|
||||
ext: '.min.css'
|
||||
} ]
|
||||
}
|
||||
ext: '.min.css',
|
||||
} ],
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
styles: {
|
||||
files: [
|
||||
'assets/scss/**/*.scss'
|
||||
'assets/scss/**/*.scss',
|
||||
],
|
||||
tasks: [ 'styles' ]
|
||||
}
|
||||
tasks: [ 'styles' ],
|
||||
},
|
||||
},
|
||||
|
||||
checktextdomain: {
|
||||
|
@ -99,8 +98,8 @@ module.exports = function( grunt ) {
|
|||
'_n:1,2,4d',
|
||||
'_nx:1,2,4c,5d',
|
||||
'_n_noop:1,2,3d',
|
||||
'_nx_noop:1,2,3c,4d'
|
||||
]
|
||||
'_nx_noop:1,2,3c,4d',
|
||||
],
|
||||
},
|
||||
files: {
|
||||
src: [
|
||||
|
@ -112,19 +111,19 @@ module.exports = function( grunt ) {
|
|||
'!tests/**',
|
||||
'!.github/**',
|
||||
'!vendor/**',
|
||||
'!*~'
|
||||
'!*~',
|
||||
],
|
||||
expand: true
|
||||
expand: true,
|
||||
},
|
||||
},
|
||||
|
||||
wp_readme_to_markdown: {
|
||||
readme: {
|
||||
files: {
|
||||
'README.md': 'readme.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
'README.md': 'readme.txt',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
} );
|
||||
|
||||
|
@ -142,7 +141,7 @@ module.exports = function( grunt ) {
|
|||
|
||||
grunt.registerTask( 'styles', [
|
||||
'sass',
|
||||
'postcss'
|
||||
'postcss',
|
||||
] );
|
||||
|
||||
// Default task(s).
|
||||
|
|
|
@ -1,720 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
||||
\*****************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
|
||||
module.exports = _arrayLikeToArray;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
||||
\***************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
|
||||
module.exports = _arrayWithHoles;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
||||
\**********************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
module.exports = _assertThisInitialized;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
||||
\***************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classCallCheck;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/createClass.js":
|
||||
/*!************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
|
||||
\************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
module.exports = _createClass;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/createSuper.js":
|
||||
/*!************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/createSuper.js ***!
|
||||
\************************************************************/
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js");
|
||||
|
||||
var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct */ "./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
|
||||
|
||||
var possibleConstructorReturn = __webpack_require__(/*! ./possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
||||
|
||||
function _createSuper(Derived) {
|
||||
var hasNativeReflectConstruct = isNativeReflectConstruct();
|
||||
return function _createSuperInternal() {
|
||||
var Super = getPrototypeOf(Derived),
|
||||
result;
|
||||
|
||||
if (hasNativeReflectConstruct) {
|
||||
var NewTarget = getPrototypeOf(this).constructor;
|
||||
result = Reflect.construct(Super, arguments, NewTarget);
|
||||
} else {
|
||||
result = Super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return possibleConstructorReturn(this, result);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _createSuper;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
||||
\***************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = _defineProperty;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
||||
\***************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _getPrototypeOf(o) {
|
||||
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
||||
return o.__proto__ || Object.getPrototypeOf(o);
|
||||
};
|
||||
return _getPrototypeOf(o);
|
||||
}
|
||||
|
||||
module.exports = _getPrototypeOf;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/inherits.js":
|
||||
/*!*********************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
|
||||
\*********************************************************/
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js");
|
||||
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function");
|
||||
}
|
||||
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
if (superClass) setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
|
||||
module.exports = _inherits;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
||||
\**********************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
"default": obj
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _interopRequireDefault;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
|
||||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
|
||||
\*************************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _isNativeReflectConstruct() {
|
||||
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
|
||||
try {
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _isNativeReflectConstruct;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
||||
\*********************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _iterableToArrayLimit(arr, i) {
|
||||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
|
||||
try {
|
||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
||||
_arr.push(_s.value);
|
||||
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i["return"] != null) _i["return"]();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
|
||||
return _arr;
|
||||
}
|
||||
|
||||
module.exports = _iterableToArrayLimit;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
||||
/*!****************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
||||
\****************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _nonIterableRest() {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
module.exports = _nonIterableRest;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
|
||||
/*!**************************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
|
||||
\**************************************************************************/
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
|
||||
|
||||
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js");
|
||||
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
||||
return call;
|
||||
}
|
||||
|
||||
return assertThisInitialized(self);
|
||||
}
|
||||
|
||||
module.exports = _possibleConstructorReturn;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
||||
\***************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _setPrototypeOf(o, p) {
|
||||
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
module.exports = _setPrototypeOf;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
|
||||
/*!**************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
||||
\**************************************************************/
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js");
|
||||
|
||||
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
|
||||
|
||||
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
|
||||
|
||||
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
|
||||
|
||||
function _slicedToArray(arr, i) {
|
||||
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
||||
}
|
||||
|
||||
module.exports = _slicedToArray;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
|
||||
/*!*******************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
|
||||
\*******************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
function _typeof(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
module.exports = _typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
module.exports = _typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
module.exports = _typeof;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
||||
/*!***************************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
||||
\***************************************************************************/
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) {
|
||||
if (!o) return;
|
||||
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
||||
if (n === "Map" || n === "Set") return Array.from(o);
|
||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
||||
}
|
||||
|
||||
module.exports = _unsupportedIterableToArray;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./assets/dev/js/editor/component.js":
|
||||
/*!*******************************************!*\
|
||||
!*** ./assets/dev/js/editor/component.js ***!
|
||||
\*******************************************/
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.default = void 0;
|
||||
|
||||
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"));
|
||||
|
||||
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"));
|
||||
|
||||
var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
|
||||
|
||||
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"));
|
||||
|
||||
var _createSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createSuper */ "./node_modules/@babel/runtime/helpers/createSuper.js"));
|
||||
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));
|
||||
|
||||
var _controlsHook = _interopRequireDefault(__webpack_require__(/*! ./hooks/ui/controls-hook */ "./assets/dev/js/editor/hooks/ui/controls-hook.js"));
|
||||
|
||||
var _default = /*#__PURE__*/function (_$e$modules$Component) {
|
||||
(0, _inherits2["default"])(_default, _$e$modules$Component);
|
||||
|
||||
var _super = (0, _createSuper2["default"])(_default);
|
||||
|
||||
function _default() {
|
||||
var _this;
|
||||
|
||||
(0, _classCallCheck2["default"])(this, _default);
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _super.call.apply(_super, [this].concat(args));
|
||||
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "pages", {});
|
||||
return _this;
|
||||
}
|
||||
|
||||
(0, _createClass2["default"])(_default, [{
|
||||
key: "getNamespace",
|
||||
value: function getNamespace() {
|
||||
return 'hello-elementor';
|
||||
}
|
||||
}, {
|
||||
key: "defaultHooks",
|
||||
value: function defaultHooks() {
|
||||
return this.importHooks({
|
||||
ControlsHook: _controlsHook["default"]
|
||||
});
|
||||
}
|
||||
}]);
|
||||
return _default;
|
||||
}($e.modules.ComponentBase);
|
||||
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./assets/dev/js/editor/hooks/ui/controls-hook.js":
|
||||
/*!********************************************************!*\
|
||||
!*** ./assets/dev/js/editor/hooks/ui/controls-hook.js ***!
|
||||
\********************************************************/
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.default = void 0;
|
||||
|
||||
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));
|
||||
|
||||
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"));
|
||||
|
||||
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"));
|
||||
|
||||
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"));
|
||||
|
||||
var _createSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createSuper */ "./node_modules/@babel/runtime/helpers/createSuper.js"));
|
||||
|
||||
var ControlsHook = /*#__PURE__*/function (_$e$modules$hookUI$Af) {
|
||||
(0, _inherits2["default"])(ControlsHook, _$e$modules$hookUI$Af);
|
||||
|
||||
var _super = (0, _createSuper2["default"])(ControlsHook);
|
||||
|
||||
function ControlsHook() {
|
||||
(0, _classCallCheck2["default"])(this, ControlsHook);
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
(0, _createClass2["default"])(ControlsHook, [{
|
||||
key: "getCommand",
|
||||
value: function getCommand() {
|
||||
// Command to listen.
|
||||
return 'document/elements/settings';
|
||||
}
|
||||
}, {
|
||||
key: "getId",
|
||||
value: function getId() {
|
||||
// Unique id for the hook.
|
||||
return 'hello-elementor-editor-controls-handler';
|
||||
}
|
||||
/**
|
||||
* Get Hello Theme Controls
|
||||
*
|
||||
* Returns an object in which the keys are control IDs, and the values are the selectors of the elements that need
|
||||
* to be targeted in the apply() method.
|
||||
*
|
||||
* Example return value:
|
||||
* {
|
||||
* hello_elementor_show_logo: '.site-header .site-header-logo',
|
||||
* hello_elementor_show_menu: '.site-header .site-header-menu',
|
||||
* }
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "getHelloThemeControls",
|
||||
value: function getHelloThemeControls() {
|
||||
var _this = this;
|
||||
|
||||
return {
|
||||
hello_header_logo_display: {
|
||||
selector: '.site-header .custom-logo-link',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_header_menu_display: {
|
||||
selector: '.site-header .menu',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_header_title_display: {
|
||||
selector: '.site-header .site-title',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_header_tagline_display: {
|
||||
selector: '.site-header .site-description',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_header_layout: {
|
||||
selector: '.site-header',
|
||||
callback: function callback($element, args) {
|
||||
var class_prefix = "header-";
|
||||
var input_options = args.container.controls.hello_header_layout.options;
|
||||
var input_value = args.settings.hello_header_layout;
|
||||
|
||||
_this.toggleLayoutClass($element, class_prefix, input_options, input_value);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_display: {
|
||||
selector: '.site-footer .custom-logo-link',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_footer_title_display: {
|
||||
selector: '.site-footer .site-title',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_footer_tagline_display: {
|
||||
selector: '.site-footer .site-description',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_footer_menu_display: {
|
||||
selector: '.site-footer .site-navigation',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_display: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: function callback($element, args) {
|
||||
$element.toggle();
|
||||
}
|
||||
},
|
||||
hello_footer_layout: {
|
||||
selector: '.site-footer',
|
||||
callback: function callback($element, args) {
|
||||
var class_prefix = "footer-";
|
||||
var input_options = args.container.controls.hello_footer_layout.options;
|
||||
var input_value = args.settings.hello_footer_layout;
|
||||
|
||||
_this.toggleLayoutClass($element, class_prefix, input_options, input_value);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Toggle layout classes on containers
|
||||
*
|
||||
* This will cleanly set classes onto which ever container we want to target, removing the old classes and adding the new one
|
||||
*
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "toggleLayoutClass",
|
||||
value: function toggleLayoutClass(element, class_prefix, input_options, input_value) {
|
||||
// Loop through the possible classes and remove the one that's not in use
|
||||
Object.entries(input_options).forEach(function (_ref) {
|
||||
var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
|
||||
key = _ref2[0],
|
||||
value = _ref2[1];
|
||||
|
||||
element.removeClass(class_prefix + key);
|
||||
}); // Append the class which we want to use onto the element
|
||||
|
||||
if ('' != input_value) {
|
||||
element.addClass(class_prefix + input_value);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Set the conditions under which the hook will run.
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "getConditions",
|
||||
value: function getConditions(args) {
|
||||
var isKit = 'kit' === elementor.documents.getCurrent().config.type,
|
||||
changedControls = Object.keys(args.settings),
|
||||
isSingleSetting = 1 === changedControls.length; // If the document is not a kit, or there are no changed settings, or there is more than one single changed
|
||||
// setting, don't run the hook.
|
||||
|
||||
if (!isKit || !args.settings || !isSingleSetting) {
|
||||
return false;
|
||||
} // If the changed control is in the list of theme controls, return true to run the hook.
|
||||
// Otherwise, return false so the hook doesn't run.
|
||||
|
||||
|
||||
return !!Object.keys(this.getHelloThemeControls()).includes(changedControls[0]);
|
||||
}
|
||||
/**
|
||||
* The hook logic.
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "apply",
|
||||
value: function apply(args, result) {
|
||||
var allThemeControls = this.getHelloThemeControls(),
|
||||
// Extract the control ID from the passed args
|
||||
controlId = Object.keys(args.settings)[0],
|
||||
controlConfig = allThemeControls[controlId],
|
||||
// Find the element that needs to be targeted by the control.
|
||||
$element = elementor.$previewContents.find(controlConfig.selector);
|
||||
controlConfig.callback($element, args);
|
||||
}
|
||||
}]);
|
||||
return ControlsHook;
|
||||
}($e.modules.hookUI.After);
|
||||
|
||||
exports.default = ControlsHook;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(__webpack_module_cache__[moduleId]) {
|
||||
/******/ return __webpack_module_cache__[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
(() => {
|
||||
"use strict";
|
||||
/*!**********************************************!*\
|
||||
!*** ./assets/dev/js/editor/hello-editor.js ***!
|
||||
\**********************************************/
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
||||
|
||||
var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "./assets/dev/js/editor/component.js"));
|
||||
|
||||
$e.components.register(new _component["default"]());
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=hello-elementor.js.map
|
2
assets/js/hello-elementor.min.js
vendored
2
assets/js/hello-elementor.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -11,26 +11,29 @@
|
|||
border-radius: 0 0 6px 6px;
|
||||
}
|
||||
|
||||
.elementor-nerd-box {
|
||||
.hello-elementor {
|
||||
|
||||
.elementor-nerd-box-icon {
|
||||
margin: 0;
|
||||
}
|
||||
&.elementor-nerd-box {
|
||||
|
||||
.elementor-nerd-box-message {
|
||||
|
||||
.elementor-nerd-box-title {
|
||||
margin: 24px 0 0;
|
||||
font-size: 16px;
|
||||
.elementor-nerd-box-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.elementor-nerd-box-message {
|
||||
margin: 12px 0 0;
|
||||
font-size: 11px;
|
||||
|
||||
.elementor-nerd-box-title {
|
||||
margin: 24px 0 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.elementor-nerd-box-message {
|
||||
margin: 12px 0 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-nerd-box-link {
|
||||
margin: 24px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-nerd-box-link {
|
||||
margin: 24px 0 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
@at-root {
|
||||
|
||||
& body.rtl {
|
||||
body.rtl & {
|
||||
padding: 30px 60px 30px 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
.elementor-panel-menu-item-theme-style-form-fields {
|
||||
border-radius: 0 0 6px 6px; }
|
||||
|
||||
.elementor-nerd-box .elementor-nerd-box-icon {
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-icon {
|
||||
margin: 0; }
|
||||
|
||||
.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-title {
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-title {
|
||||
margin: 24px 0 0;
|
||||
font-size: 16px; }
|
||||
|
||||
.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-message {
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-message {
|
||||
margin: 12px 0 0;
|
||||
font-size: 11px; }
|
||||
|
||||
.elementor-nerd-box .elementor-nerd-box-link {
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-link {
|
||||
margin: 24px 0 0; }
|
||||
|
|
2
editor.min.css
vendored
2
editor.min.css
vendored
|
@ -1 +1 @@
|
|||
.elementor-panel-menu-item-hello-settings-header{margin-top:15px;border-radius:6px 6px 0 0}.elementor-panel-menu-item-theme-style-form-fields{border-radius:0 0 6px 6px}.elementor-nerd-box .elementor-nerd-box-icon{margin:0}.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-title{margin:24px 0 0;font-size:16px}.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-message{margin:12px 0 0;font-size:11px}.elementor-nerd-box .elementor-nerd-box-link{margin:24px 0 0}
|
||||
.elementor-panel-menu-item-hello-settings-header{margin-top:15px;border-radius:6px 6px 0 0}.elementor-panel-menu-item-theme-style-form-fields{border-radius:0 0 6px 6px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-icon{margin:0}.hello-elementor.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-title{margin:24px 0 0;font-size:16px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-message .elementor-nerd-box-message{margin:12px 0 0;font-size:11px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-link{margin:24px 0 0}
|
|
@ -5,6 +5,8 @@
|
|||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
use Elementor\Plugin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
@ -155,14 +157,19 @@ if ( is_admin() ) {
|
|||
/**
|
||||
* If Elementor is installed and active, we can load the Elementor-specific Settings & Features
|
||||
*/
|
||||
|
||||
// Allow active/inactive via the Experiments
|
||||
require get_template_directory() . '/includes/elementor-functions.php';
|
||||
|
||||
/**
|
||||
* Include customizer registration functions
|
||||
*/
|
||||
if ( is_customize_preview() ) {
|
||||
require get_template_directory() . '/includes/customizer-functions.php';
|
||||
function hello_register_customizer_functions() {
|
||||
if ( hello_header_footer_experiment_active() && is_customize_preview() ) {
|
||||
require get_template_directory() . '/includes/customizer-functions.php';
|
||||
}
|
||||
}
|
||||
add_action( 'init', 'hello_register_customizer_functions' );
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_check_hide_title' ) ) {
|
||||
/**
|
||||
|
@ -174,7 +181,7 @@ if ( ! function_exists( 'hello_elementor_check_hide_title' ) ) {
|
|||
*/
|
||||
function hello_elementor_check_hide_title( $val ) {
|
||||
if ( defined( 'ELEMENTOR_VERSION' ) ) {
|
||||
$current_doc = \Elementor\Plugin::instance()->documents->get( get_the_ID() );
|
||||
$current_doc = Plugin::instance()->documents->get( get_the_ID() );
|
||||
if ( $current_doc && 'yes' === $current_doc->get_settings( 'hide_title' ) ) {
|
||||
$val = false;
|
||||
}
|
||||
|
|
|
@ -182,9 +182,15 @@ function hello_set_theme_ver() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set Theme Version and set default header style when updating
|
||||
* Hello Check Theme Version
|
||||
*
|
||||
* @return void
|
||||
* Fired when the theme is updated, on the hook 'set_site_transient_update_themes'.
|
||||
* This method updates two database options: 'hello_theme_version', and potentially also 'hello_header_footer_experiment'.
|
||||
* 'hello_theme_version' is a new option that is added here in version 2.4.0.
|
||||
* If it does not exist in the database, it means the theme is upgraded to a >=2.4.0 version from a <2.4.0 version.
|
||||
* If the 'hello_theme_version' option has not been set, we default the new Hello Header & Footer experiment to 'inactive'.
|
||||
*
|
||||
* @since 2.4.0
|
||||
*/
|
||||
add_action( 'set_site_transient_update_themes', 'hello_check_theme_ver', 100 );
|
||||
function hello_check_theme_ver() {
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
<?php
|
||||
|
||||
if ( class_exists( 'WP_Customize_Control' ) ) {
|
||||
class Hello_Elementor_Upsell extends WP_Customize_Control {
|
||||
|
||||
// Whitelist content parameter
|
||||
public $content = '';
|
||||
|
||||
/**
|
||||
* Render the control's content.
|
||||
*
|
||||
* Allows the content to be overriden without having to rewrite the wrapper.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @return void
|
||||
*/
|
||||
public function render_content() {
|
||||
$this->print_customizer_upsell();
|
||||
|
||||
if ( isset( $this->description ) ) {
|
||||
echo '<span class="description customize-control-description">' . $this->description . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Customizer deeplinks HTML
|
||||
*
|
||||
* @return string HTML to use in the customizer panel
|
||||
*/
|
||||
|
||||
private function print_customizer_upsell() {
|
||||
if ( ! function_exists( 'get_plugins' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$customizer_content = '';
|
||||
|
||||
// Get Plugins
|
||||
$plugins = get_plugins();
|
||||
|
||||
if ( ! isset( $plugins['elementor/elementor.php'] ) ) {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Install Elementor', 'hello-elementor' ),
|
||||
__( 'Create a cross-site Header and Footer using Elementor & Hello theme', 'hello-elementor' ),
|
||||
wp_nonce_url(
|
||||
add_query_arg(
|
||||
[
|
||||
'action' => 'install-plugin',
|
||||
'plugin' => 'elementor',
|
||||
],
|
||||
admin_url( 'update.php' )
|
||||
),
|
||||
'install-plugin_elementor'
|
||||
),
|
||||
__( 'Install & Activate', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} elseif ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Activate Elementor', 'hello-elementor' ),
|
||||
__( 'Create a cross-site Header and Footer using Elementor & Hello theme', 'hello-elementor' ),
|
||||
wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php', 'activate-plugin_elementor/elementor.php' ),
|
||||
__( 'Activate Elementor', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} elseif ( defined( 'ELEMENTOR_VERSION' ) && version_compare( ELEMENTOR_VERSION, '3.0.12', '<' ) ) {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Update Elementor', 'hello-elementor' ),
|
||||
__( 'You need Elementor version 3.1.0 or above to create a cross-site Header and Footer.', 'hello-elementor' ),
|
||||
wp_nonce_url( 'update-core.php' ),
|
||||
__( 'Update Elementor', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} else {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Set Your Header & Footer', 'hello-elementor' ),
|
||||
__( 'Create cross-site Header and Footer using Elementor & Hello theme', 'hello-elementor' ),
|
||||
wp_nonce_url( 'post.php?post=' . get_option( 'elementor_active_kit' ) . '&action=elementor' ),
|
||||
__( 'Start Here', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
}
|
||||
|
||||
echo $customizer_content;
|
||||
}
|
||||
|
||||
private function get_customizer_upsell_html( $title, $text, $url, $button_text, $image ){
|
||||
return wp_sprintf( '
|
||||
<div class="customize-control-header-footer-holder">
|
||||
<img src="%5$s">
|
||||
<div class="elementor-nerd-box-message">
|
||||
<p class="elementor-panel-heading-title elementor-section-title">%1$s</p>
|
||||
<p class="elementor-section-body">%2$s</p>
|
||||
</div>
|
||||
<a class="button button-primary" target="_blank" href="%3$s">%4$s</a>
|
||||
</div>',
|
||||
$title,
|
||||
$text,
|
||||
$url,
|
||||
$button_text,
|
||||
$image
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
107
includes/controls/hello-elementor-customizer-upsell.php
Normal file
107
includes/controls/hello-elementor-customizer-upsell.php
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?php /**
|
||||
* Hello Elementor custom Customizer control for the promos and cross-sells used in the WP Customizer
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
class Hello_Elementor_Customizer_Upsell extends WP_Customize_Control {
|
||||
|
||||
// Whitelist content parameter
|
||||
public $content = '';
|
||||
|
||||
/**
|
||||
* Render the control's content.
|
||||
*
|
||||
* Allows the content to be overriden without having to rewrite the wrapper.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @return void
|
||||
*/
|
||||
public function render_content() {
|
||||
$this->print_customizer_upsell();
|
||||
|
||||
if ( isset( $this->description ) ) {
|
||||
echo '<span class="description customize-control-description">' . $this->description . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Customizer deeplinks HTML
|
||||
*
|
||||
* @return string HTML to use in the customizer panel
|
||||
*/
|
||||
|
||||
private function print_customizer_upsell() {
|
||||
if ( ! function_exists( 'get_plugins' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$customizer_content = '';
|
||||
|
||||
// Get Plugins
|
||||
$plugins = get_plugins();
|
||||
|
||||
if ( ! isset( $plugins['elementor/elementor.php'] ) ) {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Install Elementor', 'hello-elementor' ),
|
||||
__( 'Create a cross-site Header and Footer using Elementor & Hello theme', 'hello-elementor' ),
|
||||
wp_nonce_url(
|
||||
add_query_arg(
|
||||
[
|
||||
'action' => 'install-plugin',
|
||||
'plugin' => 'elementor',
|
||||
],
|
||||
admin_url( 'update.php' )
|
||||
),
|
||||
'install-plugin_elementor'
|
||||
),
|
||||
__( 'Install & Activate', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} elseif ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Activate Elementor', 'hello-elementor' ),
|
||||
__( 'Create a cross-site Header and Footer using Elementor & Hello theme', 'hello-elementor' ),
|
||||
wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php', 'activate-plugin_elementor/elementor.php' ),
|
||||
__( 'Activate Elementor', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} elseif ( defined( 'ELEMENTOR_VERSION' ) && version_compare( ELEMENTOR_VERSION, '3.0.12', '<' ) ) {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Update Elementor', 'hello-elementor' ),
|
||||
__( 'You need Elementor version 3.1.0 or above to create a cross-site Header and Footer.', 'hello-elementor' ),
|
||||
wp_nonce_url( 'update-core.php' ),
|
||||
__( 'Update Elementor', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} else {
|
||||
$customizer_content .= $this->get_customizer_upsell_html(
|
||||
__( 'Set Your Header & Footer', 'hello-elementor' ),
|
||||
__( 'Create cross-site Header and Footer using Elementor & Hello theme', 'hello-elementor' ),
|
||||
wp_nonce_url( 'post.php?post=' . get_option( 'elementor_active_kit' ) . '&action=elementor' ),
|
||||
__( 'Start Here', 'hello-elementor' ),
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
}
|
||||
|
||||
echo $customizer_content;
|
||||
}
|
||||
|
||||
private function get_customizer_upsell_html( $title, $text, $url, $button_text, $image ){
|
||||
return sprintf( '
|
||||
<div class="customize-control-header-footer-holder">
|
||||
<img src="%5$s">
|
||||
<div class="elementor-nerd-box-message">
|
||||
<p class="elementor-panel-heading-title elementor-section-title">%1$s</p>
|
||||
<p class="elementor-section-body">%2$s</p>
|
||||
</div>
|
||||
<a class="button button-primary" target="_blank" href="%3$s">%4$s</a>
|
||||
</div>',
|
||||
$title,
|
||||
$text,
|
||||
$url,
|
||||
$button_text,
|
||||
$image
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,18 +1,22 @@
|
|||
<?php
|
||||
namespace Elementor\Core\Kits\Documents\Tabs;
|
||||
<?php /**
|
||||
* Hello Elementor additional Footer options
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
namespace Hello_Elementor;
|
||||
|
||||
use Elementor\Plugin;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Background;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Responsive\Responsive;
|
||||
|
||||
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
// Allow active/inactive via the Experiments
|
||||
if ( ! hello_header_footer_experiment_active() ) return;
|
||||
|
||||
class Hello_Settings_Footer extends Tab_Base {
|
||||
|
||||
public function get_id() {
|
||||
|
@ -36,6 +40,7 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
}
|
||||
|
||||
protected function register_tab_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_section',
|
||||
[
|
||||
|
@ -49,9 +54,9 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => __( 'Site Logo', 'hello-elementor' ),
|
||||
'default' => ( false === get_option( 'hello_footer_type_default' ) ? 'yes' : false ),
|
||||
'label_on' => 'Show',
|
||||
'label_off' => 'Hide',
|
||||
'default' => 'yes',
|
||||
'label_on' => __( 'Show', 'hello-elementor' ),
|
||||
'label_off' => __( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-branding',
|
||||
]
|
||||
);
|
||||
|
@ -61,9 +66,9 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => __( 'Tagline', 'hello-elementor' ),
|
||||
'default' => ( false === get_option( 'hello_footer_type_default' ) ? 'yes' : false ),
|
||||
'label_on' => 'Show',
|
||||
'label_off' => 'Hide',
|
||||
'default' => 'yes',
|
||||
'label_on' => __( 'Show', 'hello-elementor' ),
|
||||
'label_off' => __( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-description',
|
||||
]
|
||||
);
|
||||
|
@ -73,9 +78,9 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => __( 'Menu', 'hello-elementor' ),
|
||||
'default' => ( false === get_option( 'hello_footer_type_default' ) ? 'yes' : false ),
|
||||
'label_on' => 'Show',
|
||||
'label_off' => 'Hide',
|
||||
'default' => 'yes',
|
||||
'label_on' => __( 'Show', 'hello-elementor' ),
|
||||
'label_off' => __( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-navigation',
|
||||
]
|
||||
);
|
||||
|
@ -85,9 +90,9 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => __( 'Copyright', 'hello-elementor' ),
|
||||
'default' => ( false === get_option( 'hello_footer_type_default' ) ? 'yes' : false ),
|
||||
'label_on' => 'Show',
|
||||
'label_off' => 'Hide',
|
||||
'default' => 'yes',
|
||||
'label_on' => __( 'Show', 'hello-elementor' ),
|
||||
'label_off' => __( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .copyright',
|
||||
]
|
||||
);
|
||||
|
@ -184,7 +189,7 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Background::get_type(),
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_background',
|
||||
'label' => __( 'Background', 'hello-elementor' ),
|
||||
|
@ -272,7 +277,7 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Typography::get_type(),
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_title_typography',
|
||||
'label' => __( 'Typography', 'hello-elementor' ),
|
||||
|
@ -327,7 +332,7 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Typography::get_type(),
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_tagline_typography',
|
||||
'label' => __( 'Typography', 'hello-elementor' ),
|
||||
|
@ -413,7 +418,7 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Typography::get_type(),
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_menu_typography',
|
||||
'label' => __( 'Typography', 'hello-elementor' ),
|
||||
|
@ -468,7 +473,7 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Typography::get_type(),
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_copyright_typography',
|
||||
'label' => __( 'Typography', 'hello-elementor' ),
|
||||
|
@ -494,8 +499,8 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
|
||||
public function get_additional_tab_content() {
|
||||
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||
return wp_sprintf( '
|
||||
<div class="elementor-nerd-box">
|
||||
return sprintf( '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%4$s" class="elementor-nerd-box-icon">
|
||||
<div class="elementor-nerd-box-message">
|
||||
<p class="elementor-panel-heading-title elementor-nerd-box-title">%1$s</p>
|
||||
|
@ -510,12 +515,12 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} else {
|
||||
return wp_sprintf( '
|
||||
<div class="elementor-nerd-box">
|
||||
return sprintf( '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%4$s" class="elementor-nerd-box-icon">
|
||||
<div class="elementor-nerd-box-message">
|
||||
<p class="elementor-panel-heading-title elementor-nerd-box-title">%1$s</p>
|
||||
<p class="elementor-nerd-box-message">%2$s</p>
|
||||
<p class="elementor-nerd-box-message">%2$s</p>
|
||||
</div>
|
||||
<a class="elementor-button elementor-button-success elementor-nerd-box-link" target="_blank" href="%5$s">%3$s</a>
|
||||
</div>
|
||||
|
@ -529,7 +534,3 @@ class Hello_Settings_Footer extends Tab_Base {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'elementor/kit/register_tabs', function( \Elementor\Core\Kits\Documents\Kit $kit ) {
|
||||
$kit->register_tab( 'hello-settings-footer', Hello_Settings_Footer::class );
|
||||
} );
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
<?php
|
||||
namespace Elementor\Core\Kits\Documents\Tabs;
|
||||
<?php /**
|
||||
* Hello Elementor additional Header options
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
namespace Hello_Elementor;
|
||||
|
||||
use Elementor\Plugin;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Background;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Responsive\Responsive;
|
||||
|
||||
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
// Allow active/inactive via the Experiments
|
||||
if ( ! hello_header_footer_experiment_active() ) return;
|
||||
|
||||
class Hello_Settings_Header extends Tab_Base {
|
||||
|
||||
public function get_id() {
|
||||
|
@ -50,8 +54,8 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => __( 'Site Logo', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => 'Show',
|
||||
'label_off' => 'Hide',
|
||||
'label_on' => __( 'Show', 'hello-elementor' ),
|
||||
'label_off' => __( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -61,8 +65,8 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => __( 'Tagline', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => 'Show',
|
||||
'label_off' => 'Hide',
|
||||
'label_on' => __( 'Show', 'hello-elementor' ),
|
||||
'label_off' => __( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -72,8 +76,8 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => __( 'Menu', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => 'Show',
|
||||
'label_off' => 'Hide',
|
||||
'label_on' => __( 'Show', 'hello-elementor' ),
|
||||
'label_off' => __( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -176,7 +180,7 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Background::get_type(),
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_background',
|
||||
'label' => __( 'Background', 'hello-elementor' ),
|
||||
|
@ -271,7 +275,7 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Typography::get_type(),
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_title_typography',
|
||||
'label' => __( 'Typography', 'hello-elementor' ),
|
||||
|
@ -333,7 +337,7 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Typography::get_type(),
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_tagline_typography',
|
||||
'label' => __( 'Typography', 'hello-elementor' ),
|
||||
|
@ -476,7 +480,7 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Typography::get_type(),
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_menu_typography',
|
||||
'label' => __( 'Typography', 'hello-elementor' ),
|
||||
|
@ -503,8 +507,8 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
|
||||
public function get_additional_tab_content() {
|
||||
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||
return wp_sprintf( '
|
||||
<div class="elementor-nerd-box">
|
||||
return sprintf( '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%4$s" class="elementor-nerd-box-icon">
|
||||
<div class="elementor-nerd-box-message">
|
||||
<p class="elementor-panel-heading-title elementor-nerd-box-title">%1$s</p>
|
||||
|
@ -519,8 +523,8 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
get_template_directory_uri() . '/assets/images/go-pro.svg'
|
||||
);
|
||||
} else {
|
||||
return wp_sprintf( '
|
||||
<div class="elementor-nerd-box">
|
||||
return sprintf( '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%4$s" class="elementor-nerd-box-icon">
|
||||
<div class="elementor-nerd-box-message">
|
||||
<p class="elementor-panel-heading-title elementor-nerd-box-title">%1$s</p>
|
||||
|
@ -538,7 +542,3 @@ class Hello_Settings_Header extends Tab_Base {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'elementor/kit/register_tabs', function( \Elementor\Core\Kits\Documents\Kit $kit ) {
|
||||
$kit->register_tab( 'hello-settings-header', Hello_Settings_Header::class );
|
||||
}, 1, 40 );
|
||||
|
|
|
@ -11,10 +11,8 @@
|
|||
*/
|
||||
add_action( 'customize_register', 'hello_customizer_register' );
|
||||
function hello_customizer_register( $wp_customize ) {
|
||||
// Allow active/inactive via the Experiments
|
||||
if ( ! hello_header_footer_experiment_active() ) return;
|
||||
|
||||
require get_template_directory() . '/includes/controls/customizer-upsell-control.php';
|
||||
require get_template_directory() . '/includes/controls/hello-elementor-customizer-upsell.php';
|
||||
|
||||
$wp_customize->add_section(
|
||||
'hello_theme_options',
|
||||
|
@ -27,7 +25,7 @@ function hello_customizer_register( $wp_customize ) {
|
|||
$wp_customize->add_setting( 'hello-elementor-header-footer', [ 'transport' => 'refresh' ] );
|
||||
|
||||
$wp_customize->add_control(
|
||||
new Hello_Elementor_Upsell(
|
||||
new Hello_Elementor_Customizer_Upsell(
|
||||
$wp_customize,
|
||||
'hello-elementor-header-footer',
|
||||
[
|
||||
|
@ -44,13 +42,8 @@ function hello_customizer_register( $wp_customize ) {
|
|||
*
|
||||
* @return string HTML to use in the customizer panel
|
||||
*/
|
||||
add_action( 'admin_enqueue_scripts', 'hello_admin_print_styles' );
|
||||
function hello_admin_print_styles() {
|
||||
global $wp_customize;
|
||||
|
||||
if ( ! isset( $wp_customize ) ) {
|
||||
return;
|
||||
}
|
||||
add_action( 'admin_enqueue_scripts', 'hello_customizer_print_styles' );
|
||||
function hello_customizer_print_styles() {
|
||||
|
||||
$min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
use Elementor\Plugin;
|
||||
use Elementor\Core\Kits\Documents\Kit;
|
||||
use Elementor\Core\Experiments\Manager as Experiments_Manager;
|
||||
|
||||
/**
|
||||
|
@ -15,8 +16,18 @@ use Elementor\Core\Experiments\Manager as Experiments_Manager;
|
|||
add_action( 'elementor/init', 'hello_elementor_settings_init' );
|
||||
|
||||
function hello_elementor_settings_init() {
|
||||
require 'controls/settings-header.php';
|
||||
require 'controls/settings-footer.php';
|
||||
if ( hello_header_footer_experiment_active() ) {
|
||||
require 'controls/settings-header.php';
|
||||
require 'controls/settings-footer.php';
|
||||
|
||||
add_action( 'elementor/kit/register_tabs', function( Kit $kit ) {
|
||||
$kit->register_tab( 'hello-settings-footer', Hello_Elementor\Hello_Settings_Footer::class );
|
||||
} );
|
||||
|
||||
add_action( 'elementor/kit/register_tabs', function( Kit $kit ) {
|
||||
$kit->register_tab( 'hello-settings-header', Hello_Elementor\Hello_Settings_Header::class );
|
||||
}, 1, 40 );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -123,22 +134,24 @@ function hello_get_footer_layout_class() {
|
|||
}
|
||||
|
||||
add_action( 'elementor/editor/after_enqueue_scripts', function() {
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
if ( hello_header_footer_experiment_active() ) {
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
wp_enqueue_script(
|
||||
'hello-theme-editor',
|
||||
get_template_directory_uri() . '/assets/js/hello-editor' . $suffix . '.js',
|
||||
[ 'jquery', 'elementor-editor' ],
|
||||
HELLO_ELEMENTOR_VERSION,
|
||||
true
|
||||
);
|
||||
wp_enqueue_script(
|
||||
'hello-theme-editor',
|
||||
get_template_directory_uri() . '/assets/js/hello-editor' . $suffix . '.js',
|
||||
[ 'jquery', 'elementor-editor' ],
|
||||
HELLO_ELEMENTOR_VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'hello-editor',
|
||||
get_template_directory_uri() . '/editor' . $suffix . '.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
wp_enqueue_style(
|
||||
'hello-editor',
|
||||
get_template_directory_uri() . '/editor' . $suffix . '.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
}
|
||||
} );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function() {
|
||||
|
@ -152,7 +165,7 @@ add_action( 'wp_enqueue_scripts', function() {
|
|||
true
|
||||
);
|
||||
|
||||
if ( did_action( 'elementor/loaded' ) ) {
|
||||
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||
// Load the kit site-wide
|
||||
Elementor\Plugin::$instance->kits_manager->frontend_before_enqueue_styles();
|
||||
}
|
||||
|
@ -166,13 +179,14 @@ add_action( 'wp_enqueue_scripts', function() {
|
|||
* @return bool
|
||||
*/
|
||||
function hello_get_header_display() {
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
if( isset( $_GET['elementor-preview'] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
hello_elementor_get_setting( 'hello_header_logo_display' )
|
||||
|| hello_elementor_get_setting( 'hello_header_tagline_display' )
|
||||
|| hello_elementor_get_setting( 'hello_header_menu_display' )
|
||||
|| $is_editor
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -182,15 +196,15 @@ function hello_get_header_display() {
|
|||
* @return bool
|
||||
*/
|
||||
function hello_get_footer_display() {
|
||||
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
if( isset( $_GET['elementor-preview'] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
hello_elementor_get_setting( 'hello_footer_logo_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_tagline_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_menu_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_copyright_display' )
|
||||
|| $is_editor
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ $tagline = get_bloginfo( 'description', 'display' );
|
|||
$footer_class = did_action( 'elementor/loaded' ) ? esc_attr( hello_get_footer_layout_class() ) : '';
|
||||
?>
|
||||
<footer id="site-footer" class="site-footer <?php echo $footer_class; ?>" role="contentinfo">
|
||||
<?php if ( did_action( 'elementor/loaded' ) ) : ?>
|
||||
<?php if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) : ?>
|
||||
<div class="site-branding show-<?php echo hello_elementor_get_setting( 'hello_footer_logo_type' ); ?>">
|
||||
<?php if ( has_custom_logo() && ( 'title' !== hello_elementor_get_setting( 'hello_footer_logo_type' ) || $is_editor ) ) : ?>
|
||||
<div class="site-logo <?php echo hello_show_or_hide( 'hello_footer_logo_display' ); ?>">
|
||||
|
|
|
@ -296,8 +296,8 @@ to override any of the settings in this section, add your styling code in the cu
|
|||
flex-direction: column;
|
||||
padding: 30px 0 30px 60px;
|
||||
border-bottom: 1px solid #cccccc; }
|
||||
#comments .comment .comment-body body.rtl,
|
||||
#comments .pingback .comment-body body.rtl {
|
||||
body.rtl #comments .comment .comment-body, body.rtl
|
||||
#comments .pingback .comment-body {
|
||||
padding: 30px 60px 30px 0; }
|
||||
#comments .comment .avatar,
|
||||
#comments .pingback .avatar {
|
||||
|
|
2
theme.min.css
vendored
2
theme.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue