This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script uodates the variable "--at-header-height" to the height of the Bricks Header dynamically. | |
*/ | |
(() => { | |
const setHeaderHeightVar = () => { | |
const header = document.querySelector("#brx-header"); | |
if (header) { | |
const height = header.offsetHeight; | |
document.body.style.setProperty( | |
"--at-header-height", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class WPE_Simple_REST_Cache { | |
const CACHE_TTL_DEFAULT = 300; // 5 minutes | |
const CACHE_PREFIX = 'wpe_rest_cache_'; | |
/** | |
* Initialise cache hooks. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AB_BricksAPI | |
{ | |
const API_NAMESPACE = "wpe_bricks_ajax/v1"; | |
static function init() | |
{ | |
add_action("rest_api_init", [ | |
__CLASS__, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpe_restrict_bricks_template_access() | |
{ | |
if (!current_user_can("administrator")) { | |
// Prevent access to editing bricks_template | |
add_filter( | |
"user_has_cap", | |
function ($allcaps, $caps, $args) { | |
$post_type = get_post_type($args[2] ?? 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("WPE_JSON_TRANSIENT_NAME", "wpe_dummyjson"); | |
define("WPE_JSON_TRANSIENT_TTL", 60); | |
define("WPE_JSON_ENDPOINT_BASE", "https://dummyjson.com/"); | |
/** Add query type to dropdown */ | |
add_filter("bricks/setup/control_options", function ($control_options) { | |
// Add a new query loop type | |
$control_options["queryTypes"]["wpe_json"] = esc_html__( | |
"DummyJSON", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"at_settings":{"bricks-advanced-themer_frontend_styles":"","bricks-advanced-themer__brxc_theme_settings_tabs":["global-colors","css-variables","builder-tweaks","admin-bar"],"_bricks-advanced-themer__brxc_theme_settings_tabs":"field_645s9g7tddfj2","bricks-advanced-themer__brxc_enable_elements":["darkmode-toggle","darkmode-button"],"_bricks-advanced-themer__brxc_enable_elements":"field_63aabb0ccebeb","bricks-advanced-themer__brxc_enable_disable_bricks_elements":["container","section","block","div","heading","text-basic","text","text-link","button","icon","image","video","nav-nested","dropdown","offcanvas","toggle","divider","icon-box","social-icons","list","accordion","accordion-nested","tabs","tabs-nested","form","map","alert","animated-typing","countdown","counter","pricing-tables","progress-bar","pie-chart","team-members","testimonials","html","code","template","logo","facebook-page","breadcrumbs","image-gallery","audio","carousel","slider","slider-nested","svg","instagram-feed","wordpress","posts","paginat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
/* INIT WPE Object */ | |
window.WPE = window.WPE || { scripts: [] }; | |
const scriptName = 'wpeFocusTrap'; /* Must be unique */ | |
const blockSelector = '.wpe-focus-trap'; | |
class MainClass { | |
constructor() { | |
this.debug = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"content":[{"id":"41c39ea4","settings":{"content_width":"full","flex_direction":"row","flex_align_items":"center","_element_id":"search-container","custom_css":"#search-container{\r\n --open-width: 200px;\r\n}\r\n.search-icon-wrapper {\r\n position: relative;\r\n display: inline-block;\r\n \r\n}\r\n\r\n.search-toggle {\r\n display: none;\r\n}\r\n\r\n.search-icon {\r\n cursor: pointer;\r\n font-size: 20px;\r\n display: inline-block;\r\n padding: 5px;\r\n transition: color 0.3s;\r\n color: #333;\r\n}\r\n\r\n.search-icon:hover {\r\n color: #0073e6;\r\n}\r\n\r\n#search-container .e-search-input {\r\n max-width: 0;\r\n width: var(--open-width)x;\r\n opacity: 0;\r\n transition: max-width 0.6s ease, opacity 0.3s ease;\r\n}\r\n\r\n#search-container:has(:checked) .e-search-input {\r\n max-width: var(--open-width);\r\n opacity: 1;\r\n}","_title":"Search Container"},"elements":[{"id":"6e60c52d","settings":{"html":"<div class=\"search-icon-wrapper\">\r\n <input type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "f05f0d", | |
"name": "Default", | |
"colors": [ | |
{ | |
"hex": "#257cda", | |
"id": "atasgw", | |
"name": "fw-primary" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', () => { | |
// Function to convert Unix timestamp to local date time string | |
function convertUnixToLocalDateTime(unixTimestamp) { | |
const date = new Date(unixTimestamp * 1000); // Convert Unix timestamp to milliseconds | |
const options = { | |
month: 'long', // Full month name | |
day: 'numeric', | |
hour: 'numeric', | |
minute: 'numeric', | |
hour12: true // AM/PM format |
NewerOlder