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
/** | |
* Add Oxygen's global colors to Gutenberg's backend editor palette | |
*/ | |
function pavenum_gutenberg_oxygen_palette() { | |
$gutenberg_colors = []; | |
$oxy_colors = oxy_get_global_colors(); | |
foreach( $oxy_colors['colors'] as $oxy_color) { | |
$gutenberg_colors[] = [ 'name' => $oxy_color['name'], 'slug' => 'color-' . $oxy_color['id'], 'color' => $oxy_color['value'] ]; |
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
/* I'll put here different examples of dynamic query for Oxygen repeater : | |
* - Use one of the following repeater_dynamic_query definitions | |
* in code block just BEFORE the repeater | |
* - Set the repeater custom query settings : post type, number of posts, order... | |
* - Add the remove_action in a code block AFTER the repeater | |
*/ | |
/**************************************************************************************************** | |
* Display related posts for any CPT with taxonomy: |
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 | |
/* | |
* 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 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 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
/** | |
* Oxy-Dummy activation (thank you Sridhar Katakam) | |
* Paste this code snippet in your Oxygen's customization plugin | |
* or copy the file to /wp-content/plugins/customization-plugin/ | |
*/ | |
remove_filter( 'template', 'ct_oxygen_template_name' ); | |
remove_filter( 'template_directory', 'ct_disable_theme_load', 1, 1 ); | |
remove_filter( 'stylesheet_directory', 'ct_disable_theme_load', 1, 1 ); |
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 | |
add_shortcode( 'pavenum_video', function( $atts ) { | |
$a = shortcode_atts( array( | |
'id' => '', | |
'ratio' => '', | |
/*'legend' => '',*/ | |
'alt' => '' | |
), $atts ); |
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
window.addEventListener( 'DOMContentLoaded', ()=> { | |
const body = document.body, | |
scrollUp = "scroll-up", | |
scrollDown = "scroll-down", | |
offset = 0; | |
let lastScroll = window.pageYOffset; | |
if ( lastScroll > offset ) { | |
body.classList.add(scrollUp); |
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
//** 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() { |
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
body { | |
--base: 20; | |
--scale-headings: 1.44; | |
--scale-mobile: 0.7; | |
--scale-mobile-headings: 0.4; | |
--scale-icons: 1.4; | |
--min-viewport: 480; | |
--max-viewport: 1600; | |
--max-size: var(--base); | |
} |
NewerOlder