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
/* --- DEPRECATED --- */ | |
/* add .et_pb_lightbox_image clss to content images */ | |
add_filter('the_content', 'divi_add_lightbox'); | |
function divi_add_lightbox($content) { | |
global $post; | |
$pattern ="/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i"; | |
$replacement = '<a$1href=$2$3.$4$5 class="et_pb_lightbox_image" title="'.$post->post_title.'"$6>'; | |
$content = preg_replace($pattern, $replacement, $content); | |
return $content; | |
} |
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 font with icons to Getwid plugin. | |
* Use this code in functions.php or custom plugin. | |
*/ | |
// add hook | |
add_action( 'getwid/icons-manager/init', 'my_theme_getwid_add_custom_icons' ); |
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 Global Styles and SVG Filters from WP 5.9.1 - 2022-02-27 | |
function remove_global_styles_and_svg_filters() { | |
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' ); | |
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' ); | |
} | |
add_action('init', 'remove_global_styles_and_svg_filters'); | |
// This snippet removes the Global Styles and SVG Filters that are mostly if not only used in Full Site Editing in WordPress 5.9.1+ | |
// Detailed discussion at: https://github.com/WordPress/gutenberg/issues/36834 | |
// WP default filters: https://github.com/WordPress/WordPress/blob/7d139785ea0cc4b1e9aef21a5632351d0d2ae053/wp-includes/default-filters.php |
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
--paletteColor1 -----> --theme-palette-color-1 | |
--paletteColor2 -----> --theme-palette-color-2 | |
--paletteColor3 -----> --theme-palette-color-3 | |
--paletteColor4 -----> --theme-palette-color-4 | |
--paletteColor5 -----> --theme-palette-color-5 | |
--paletteColor6 -----> --theme-palette-color-6 | |
--paletteColor7 -----> --theme-palette-color-7 | |
--paletteColor8 -----> --theme-palette-color-8 | |
--fontFamily -----> --theme-font-family |
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
[class*="tag_cloud"] { | |
.tagcloud { | |
display: flex; | |
flex-wrap: wrap; | |
gap: 8px; | |
a { | |
display: flex; | |
align-items: center; | |
height: 36px; |