This file contains 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 | |
global $post; | |
if ( is_a($post, 'WP_Post') ) : | |
$post_id = $post->ID; | |
$elementor_data = get_post_meta($post_id, '_elementor_controls_usage', true); | |
$has_fl_map = array_key_exists('fl-map', $elementor_data); |
This file contains 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
/** | |
* VERSION 1 - DEVICE-SPECIFIC + GLOBAL | |
* ----------------------------------------------------------------------------------------------------- | |
*/ | |
const checkIphone = () => { | |
const u = navigator.userAgent | |
return !!u.match(/iPhone/i) | |
}, | |
checkAndroid = () => { |
This file contains 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 | |
$mime_types = array( | |
'.3dm' => 'x-world/x-3dmf', | |
'.3dmf' => 'x-world/x-3dmf', | |
'.a' => 'application/octet-stream', | |
'.aab' => 'application/x-authorware-bin', | |
'.aam' => 'application/x-authorware-map', | |
'.aas' => 'application/x-authorware-seg', | |
'.abc' => 'text/vnd.abc', | |
'.acgi' => 'text/html', |
This file contains 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
/* Copy Button plugin | |
------------------------------------------------------------------------------------------------ | |
@here https://github.com/arronhunt/highlightjs-copy/styles/highlightjs-copy.css | |
*/ | |
.hljs-copy-wrapper { | |
position: relative; | |
overflow: hidden; | |
} | |
.hljs-copy-wrapper:hover .hljs-copy-button, |
This file contains 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
const opts = { | |
// ... | |
} | |
document.querySelectorAll('.my-splide-class').forEach( function(carousel) { | |
const mySplide = new Splide( carousel, opts ); | |
// ... |
This file contains 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 | |
/** | |
* @here https://www.wpexplorer.com/how-to-disable-wordpress-gutenberg-block-patterns/ | |
*/ | |
//Remove core patterns: | |
// | |
//The following code will remove the default core patterns that are installed in WordPress natively. | |
add_action( 'after_setup_theme', function() { |
This file contains 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 get_decorated_diff($old, $new){ | |
$from_start = strspn($old ^ $new, "\0"); | |
$from_end = strspn(strrev($old) ^ strrev($new), "\0"); | |
$old_end = strlen($old) - $from_end; | |
$new_end = strlen($new) - $from_end; | |
$start = substr($new, 0, $from_start); | |
$end = substr($new, $new_end); |
This file contains 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 | |
remove_filter ('single_post_title', 'wptexturize'); | |
remove_filter ('bloginfo', 'wptexturize'); | |
remove_filter ('wp_title', 'wptexturize'); | |
// Additionally, you can remove the filter for other locations as well: | |
remove_filter ('category_description', 'wptexturize'); | |
remove_filter ('list_cats', 'wptexturize'); | |
remove_filter ('comment_author', 'wptexturize'); | |
remove_filter ('comment_text', 'wptexturize'); |
NewerOlder