__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import { getOptionFor } from './helpers'
import ctEvents from 'ct-events'
export const getPrefixFor = () => {
if (document.body.classList.contains('blog')) {
return 'blog'
}
if (document.body.classList.contains('single-product')) {
return 'product'
}
if (
document.body.classList.contains('woocommerce-archive') ||
document.body.classList.contains('woocommerce-cart') ||
document.body.classList.contains('woocommerce-checkout') ||
document.body.classList.contains('woocommerce-account') ||
document.body.classList.contains('post-type-archive-product')
) {
return 'woo'
}
if (document.body.classList.contains('search')) {
return 'search'
}
if (document.body.classList.contains('author')) {
return 'author'
}
if (document.body.classList.contains('archive')) {
return 'categories'
}
return false
}
const renderLocalSidebar = prefix => {
if (prefix !== getPrefixFor()) {
return
}
ctEvents.trigger('ct:custom-select:init')
}
const prefixes = ['blog', 'woo', 'search', 'author', 'categories', 'product']
const watchOptionsFor = prefix => {
;[
`${prefix}_has_sidebar`,
`${prefix}_sidebar_position`,
`${prefix}_structure`
].map(id =>
wp.customize(id, val => val.bind(to => renderLocalSidebar(prefix)))
)
}
prefixes.map(prefix => watchOptionsFor(prefix))
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| helpers | Folder | 0775 |
|
|
| single | Folder | 0775 |
|
|
| template-parts | Folder | 0775 |
|
|
| variables | Folder | 0775 |
|
|
| woocommerce | Folder | 0775 |
|
|
| archive.js | File | 1.28 KB | 0775 |
|
| back-to-top-link.js | File | 629 B | 0775 |
|
| builder.js | File | 12.28 KB | 0775 |
|
| comments.js | File | 2.04 KB | 0775 |
|
| featured_image.js | File | 1.32 KB | 0775 |
|
| general.js | File | 469 B | 0775 |
|
| helpers.js | File | 7.86 KB | 0775 |
|
| hero-section.js | File | 13.49 KB | 0775 |
|
| location.js | File | 445 B | 0775 |
|
| misc.js | File | 273 B | 0775 |
|
| pagination.js | File | 3.28 KB | 0775 |
|
| sidebar.js | File | 1.43 KB | 0775 |
|
| single.js | File | 4.6 KB | 0775 |
|
| variables.js | File | 11.33 KB | 0775 |
|