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
jQuery("h1, h2, h3, h4, h5, h6").each(function() { | |
jQuery(this).html(function(index, text) { | |
return text.replace( /([',.;:?!])/g, '<span class="special">$1</span>' ); | |
}); | |
}); |
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 | |
/* | |
* Put following code BEFORE running the query (WP loop, Oxygen's repeater, etc.) | |
* What it does: | |
* - updates query with right page number variable to display the correct page | |
* - assigns the query to wp_query so that pagination links work | |
*/ | |
function handle_pagination_on_frontpage( $query ) { |
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
add_filter( 'script_loader_tag', 'yankiara_defer_scripts', 10, 3 ); | |
function yankiara_defer_scripts( $tag, $handle, $src ) { | |
$defer = array( 'script-handle-1', 'script-handle-2', 'script-handle-3' ); | |
if ( in_array( $handle, $defer ) ) | |
return '<script src="' . $src . '" defer="defer" type="text/javascript"></script>' . "\n"; | |
return $tag; | |
} |
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
:root { | |
--columns-gap: 1rem; | |
} | |
@media (min-width:782px) { | |
.wp-block-column:not(:first-child) { | |
margin-left: var(--columns-gap); | |
} | |
} | |
@media (min-width:600px) and (max-width:781px) { |
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 | |
/* WARNING: Advanced SQL table modifications, USE AT YOUR OWN RISKS */ | |
/* IMPORTANT: You need to RESIGN SHORTCODES after executing this script */ | |
global $wpdb; | |
$sql = 'SELECT meta_id, meta_value | |
FROM ' . $wpdb->postmeta . ' | |
WHERE meta_key = "ct_builder_shortcodes"'; |
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_filter('fluentform_rendering_field_data_select', function ($data, $form) { | |
if ($form->id != 10) | |
return $data; | |
if (\FluentForm\Framework\Helpers\ArrayHelper::get($data, 'attributes.name') != 'poste') | |
return $data; | |
$jobs = get_posts( [ 'post_type' => 'job' ] ); | |
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 plang() { | |
if ( function_exists('pll_current_language') ) | |
return pll_current_language('slug'); | |
else | |
return 'fr'; | |
} | |
function phome() { |
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
//** Oxygen Composite Elements Settings Section **// | |
//** Edit the variables below to change the behavior of the element. **// | |
var closeOtherToggles = true; // Set this to true to close all other accordions when an accordion is expanded. | |
//** That's it, stop editing! **/ | |
jQuery(document).ready(function(){ | |
// Expand the content when row is clicked. | |
jQuery('body').on('click', '.oxel_accordion__row', function() { |