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
// Get the <h5> element with the ID #plugin-block-heading1 | |
const h5Element = document.getElementById('plugin-block-heading1'); | |
if (h5Element) { | |
// Create a new <h2> element | |
const h2 = document.createElement('h2'); | |
// Copy the content of the <h5> to the <h2> | |
h2.innerHTML = h5Element.innerHTML; | |
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
/** | |
* Fix broken return key on checkout page. | |
* | |
* THIS IS A TEMPORARY FIX TILL EDD FIXES THE ISSUE. | |
* | |
* Edd has a stripe script that binds to the entire document and runs | |
* preventDefault on the return key. This is a temporary fix to allow | |
* the return key to work on the checkout page. | |
*/ | |
export const checkoutFixBrokenReturnKey = () => { |
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
selector #pause-button-0 { | |
position: absolute; | |
bottom:5px; | |
right: 5px; | |
z-index: 999; | |
} |
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 shorts category from the blog **/ | |
add_filter( 'pre_get_posts', 'amber_exclude_shorts_category' ); | |
function amber_exclude_shorts_category ( $query ) { | |
if ( $query->is_home && ! is_admin() ) { | |
$query->set( 'cat', '-272' ); | |
} | |
return $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
function my_rule_type_filter($rules){ | |
$rules = edac_remove_element_with_value($rules, 'rule_type', 'warning'); // Removes all warnings | |
return $rules; | |
} | |
add_filter('edac_filter_register_rules','my_rule_type_filter'); |
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
function my_rule_filter($rules){ | |
$rules = edac_remove_element_with_value($rules, 'slug', 'slider_present'); // Replace the slug with the slug of the rule you want to remove. | |
return $rules; | |
} | |
add_filter('edac_filter_register_rules','my_rule_filter'); |
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
function change_max_alt_length( $max ) { | |
return 100; // Shorten alt text max character count to 100 from default (300). | |
} | |
add_filter( 'edac_max_alt_length', 'change_max_alt_length' ); |
NewerOlder