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 | |
/* | |
Plugin Name: Deactivate Plugins Locally | |
Description: Deactivate specific plugins on your local environment if defined in a wp-config-local.php file. | |
Version: 1.0 | |
*/ | |
require_once(ABSPATH . 'wp-admin/includes/plugin.php'); | |
if ( defined( 'LOCAL_DISABLED_PLUGINS' ) ) { // If defined in wp-config-local.php | |
$plugins_to_disable = unserialize( LOCAL_DISABLED_PLUGINS ); |
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 lstreng_author_any_post_types $query ) { | |
// apply changes only for author archive page | |
if ( ! is_author() || ! $query->is_main_query() ) | |
return; | |
$query->set('post_type', 'any'); | |
} | |
add_action( 'pre_get_posts', 'lstreng_author_any_post_types' ); |
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 to update all Gravity Forms 'State' dropdown field (based on field id #6), from full state name values to abbreviated state values if logged into the site. | |
* Use once, then remove the code. | |
*/ | |
function lstreng_update_all_gravity_forms() { | |
// only load for admin panel | |
if ( is_admin() ) { | |
// load all forms | |
$forms = GFAPI::get_forms(); |
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
/** | |
* CSS Dark Mode | |
* | |
* Declare color-scheme: light dark in the :root. | |
* Then use the light-dark() function to set both colors. | |
**/ | |
:root { | |
color-scheme: light dark; | |
--bg-color: light-dark(white, black); |
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
/** | |
* Adding alternative text for screen readers to pseudo elements. | |
* | |
* https://developer.mozilla.org/en-US/docs/Web/CSS/content#adding_an_image_with_alternative_text | |
**/ | |
.location { | |
&::before { | |
/* fallback content */ | |
content: url(images/backgrounds/location.svg) ' - Alt text is not supported'; |
OlderNewer