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
.list { | |
--list-gap: 24px; | |
--columns: 3; | |
display: flex; | |
justify-content: center; | |
gap: var(--list-gap); | |
flex-direction: column; | |
@media screen and (min-width: 769px) { | |
flex-direction: row; |
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
// ==UserScript== | |
// @name Check advada theme | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-11-07 | |
// @description try to take over the world! | |
// @author You | |
// @match https://* | |
// @match http://* | |
// @grant none | |
// @run-at document-start |
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 | |
//disable author info | |
add_filter( 'wpseo_meta_author', '__return_false' ); | |
add_filter( 'wpseo_schema_graph', function ($data) { | |
foreach ( $data as $key => $value ) { | |
if ( ! empty( $value['@type'] ) && $value['@type'] === 'Article' && ! empty( $value['author'] ) ) { | |
unset( $data[ $key ]['author'] ); | |
} |
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 getScrollBarWidth() { | |
let el = document.createElement("div"); | |
el.style.cssText = "overflow:scroll; visibility:hidden; position:absolute;"; | |
document.body.appendChild(el); | |
let width = el.offsetWidth - el.clientWidth; | |
el.remove(); | |
return width; | |
} | |
document.body.style.setProperty('--scrollbar-width', `${getScrollBarWidth()}px`); |
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 | |
//..... | |
add_action( 'wp_enqueue_scripts', function(){ | |
wp_enqueue_style( 'intTelInput', 'https://cdn.jsdelivr.net/npm/[email protected]/build/css/intlTelInput.min.css' ); | |
wp_register_script( 'iti-config', get_theme_file_uri( '/js/iti-config.js' ), array( 'jquery' ), '1', false ); | |
wp_enqueue_script( 'intTelInput', 'https://cdn.jsdelivr.net/npm/[email protected]/build/js/intlTelInput.min.js', array( 'jquery', 'iti-config' ), '1', true ); | |
wp_localize_script( | |
'intTelInput', |
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 | |
if (!function_exists('array_sort_by_keys_array')) { | |
/** | |
* Сортировка ассоциативного массива в порядке указанном массивом ключей. | |
* | |
* @param array $array Входной массив. | |
* @param array $sorter Массив ключей в нужном порядке. | |
* | |
* @return bool |
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
// On Document Ready... | |
jQuery(document).ready(function ($) { | |
if (typeof Marionette !== 'undefined') { | |
var myCustomFieldController = Marionette.Object.extend({ | |
initialize: function () { | |
var submitChannel = Backbone.Radio.channel('submit'); | |
this.listenTo(submitChannel, 'validate:field', this.validateRequired); | |
var fieldsChannel = Backbone.Radio.channel('fields'); |
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
export default function cf_7() { | |
console.info('cf-7'); | |
let cf_7 = document.querySelectorAll('.wpcf7-form'); | |
if (cf_7 && cf_7.length > 0) { | |
cf_7.forEach(function (cf_7_form) { | |
const submit_button = cf_7_form.querySelector('.wpcf7-submit'); | |
if (submit_button) { | |
cf_7_form.addEventListener('submit', function (event) { | |
submit_button.setAttribute('disabled', ''); |
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
//Change label for file | |
jQuery(document).ready(function ($) { | |
let $file_container = $('.file-upload'); | |
if ($file_container.length > 0) { | |
$file_container.each(function () { | |
let $container = $(this); | |
let $file_input = $container.find('.wpcf7-file'); | |
let $label = $container.find('.file-label__text'); | |
$file_input.change(function () { |
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 | |
add_action('init', function () { | |
add_rewrite_rule('insights/([^/]+)/([^/]+)/?$', 'index.php?category_name=$matches[1]&name=$matches[2]&post_type=post', 'top'); | |
add_rewrite_rule('lp/([^/]+)/?$', 'index.php?name=$matches[1]&post_type=e-landing-page', 'top'); | |
}); | |
add_filter('pre_post_link', function ($permalink, $post, $leavename) { | |
if ($post->post_type === 'post') { | |
$permalink = '/insights' . $permalink; |
NewerOlder