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
// Remove Google Fonts from Oxygen | |
remove_action('wp_head', 'add_web_font',0); |
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
/** | |
* Loads CSS inside the Oxygen Builder | |
*/ | |
add_action( 'plugins_loaded', 'lit_oxy_builder_css' ); | |
function lit_oxy_builder_css() { | |
if( class_exists( 'CT_Component' ) ) { | |
add_action( 'oxygen_enqueue_ui_scripts', 'lit_oxy_ui_scripts' ); | |
} | |
} |
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
// Remove default Oxygen.css | |
add_action( 'oxygen_enqueue_scripts', 'lit_dequeue_scripts' ); | |
function lit_dequeue_scripts() { | |
wp_dequeue_style("oxygen"); | |
} |
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_action( 'enqueue_block_editor_assets', 'lit_add_gutenberg_styles' ); | |
/** | |
* Add backend styles for Gutenberg | |
*/ | |
function lit_add_gutenberg_styles() { | |
wp_enqueue_style( 'custom-gutenberg-editor-styles', plugin_dir_url( __FILE__ ) . '/editor-styles.css'); | |
} |
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
/* Main column width */ | |
.wp-block { | |
max-width: 900px; | |
} | |
/* Width of "wide" blocks */ | |
.wp-block[data-align="wide"] { | |
max-width: 1100px; | |
} |
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
remove_action("wp_footer", "ct_footer_script_hook", 20); |
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
jQuery(function( $ ){ | |
var element = $( ".element-class" ); | |
function fade_element() { | |
window_scroll = $(this).scrollTop(); | |
element.css({ | |
'opacity' : 1-(window_scroll/300), | |
'transform' : "translate(0,"+ +(window_scroll/2) + "px)" }); | |
}); |
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_shortcode( 'show_if_amp', 'lit_show_on_amp_only' ); | |
/** | |
* Add a custom shortcode to show content if we're on amp page. | |
* | |
* Sample usage: [show_if_amp]content[/show_if_amp] | |
* | |
* @param array $atts An associative array of attributes, or an empty string if no attributes are given. | |
* @param string $content The enclosed content. | |
* @return void|string Enclosed content for amp pages and non-amp pages | |
*/ |
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_action( 'wp_print_styles', 'lit_deregister_editor_styles', 100 ); | |
/** | |
* Removes WP block editor styles | |
*/ | |
function lit_deregister_editor_styles() { | |
if ( !is_singular('post') ) { // If isn't a single post, remove excess block libary CSS | |
wp_dequeue_style( 'wp-block-library' ); | |
} | |
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_action( 'plugins_loaded', 'lit_oxy_gtm' ); | |
function lit_oxy_gtm() { | |
if( class_exists( 'CT_Component' ) ) { | |
add_action( 'ct_before_builder', 'lit_add_gtm_tag' ); | |
} | |
} |
OlderNewer