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
<div class="single-product-banner__content"> | |
<div class="sigle-product__review"> | |
<div class="yotpo bottomLine" | |
data-product-id="{{ product.id }}"> | |
</div> | |
<a class="reviews-wrap__link" href="#single-product__reviews-wrap"></a> | |
{% comment %} |
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_action('updated_post_meta','shop_order_meta_updated', 10, 4); | |
function shop_order_meta_updated($meta_id, $post_id, $meta_key, $meta_value) { | |
$type = get_post_type( $post_id ); | |
if ($type == 'shop_order') { | |
error_log("shop_order_meta_updated"); | |
error_log("shop_order ID:" . $post_id); | |
error_log("meta_key:" . print_r($meta_key, true) ); | |
error_log("meta_value:" . print_r($meta_value, true) ); | |
error_log(wp_debug_backtrace_summary()); |
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
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
php wp-cli.phar --info | |
alias wp="php wp-cli.phar" |
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
/** | |
* 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 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 |
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
Source URL: ^(\/(?!wp-admin|wp-login).*)$ | |
Target URL: https://main-website.com/$1 |
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 | |
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 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 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 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
#find files that have certain string | |
grep -rnl '/home/directory' -e 'string_you_want_to_search' | |
#find lines that have certain string | |
grep 'string_you_want_to_search' '/file/path' | |
#find IP Address for Logs in Cloudways Application | |
find /home/app-directory/logs/php-app.access.log* -type f -exec grep "IP_ADDRESS" {} \; |
NewerOlder