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
/** | |
* For developers: WordPress debugging mode. | |
* | |
* Change this to true to enable the display of notices during development. | |
* It is strongly recommended that plugin and theme developers use WP_DEBUG | |
* in their development environments. | |
*/ | |
define('WP_DEBUG', true); | |
if( isset($_GET['debug']) && str_contains($_SERVER['SERVER_NAME'], "stonedigital.dev") ) { | |
// Only allow debug toggle in staging websites |
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
open /Applications/MySQLWorkbench.app |
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 | |
add_action('admin_init', function () { | |
// Redirect any user trying to access comments page | |
global $pagenow; | |
if ($pagenow === 'edit-comments.php') { | |
wp_safe_redirect(admin_url()); | |
exit; | |
} | |
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
# Shopify # | |
################### | |
config.yml | |
config/settings_data.json | |
# OS generated files # | |
###################### | |
.DS_Store | |
.DS_Store? | |
._* |
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
.line-clamp { | |
display: -webkit-box; | |
-webkit-line-clamp: 3; | |
-webkit-box-orient: vertical; | |
overflow: hidden; | |
} |
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 | |
// Place in functions.php | |
add_filter('comments_open', '__return_false', 20, 2); | |
add_filter('pings_open', '__return_false', 20, 2); | |
add_filter('comments_array', '__return_empty_array', 10, 2); | |
add_action('admin_init', array($this, 'remove_comments_links_from_dashboard')); | |
add_action('admin_menu', array($this, 'remove_comments_page_in_menu')); | |
function remove_comments_page_in_menu() { | |
remove_menu_page('edit-comments.php'); |
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
<!-- Bad --> | |
<div class="layout-col-4"> | |
<?php | |
if ( is_active_sidebar( 'footer_sidebar_one' ) ) { | |
?> | |
<div id="footer-sidebar-one" class="footer-sidebar widget-area" role="complementary"> | |
<?php | |
dynamic_sidebar( 'footer_sidebar_one' ); | |
?> | |
</div><!-- #footer_sidebar --> |
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
// Bad | |
var sync1 = jQuery("#sync1"); | |
sync1.owlCarousel({ | |
items: 1, | |
slideSpeed: 2000 | |
}); | |
// Good | |
let productPageMainSlider = jQuery(".product-page__main-slider"); | |
productPageMainSlider.owlCarousel({ |
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 add_custom_image_sizes() { | |
global $_wp_additional_image_sizes; | |
print '<pre>'; | |
print_r( $_wp_additional_image_sizes ); | |
print '</pre>'; | |
} | |
add_action( 'after_setup_theme', 'add_custom_image_sizes' ); |
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
sudo nano /etc/hosts | |
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |