Skip to content

Instantly share code, notes, and snippets.

for wpconfig in /var/www/*/wp-config.php; do \
echo; site=${wpconfig%\/wp-config.php}; site=${site#\/var\/www\/}; \
gp wp $site doctor check --all
echo
done
@robi09
robi09 / rm_mysql.md
Created July 1, 2019 12:14 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@robi09
robi09 / gist:cc573baceba7f81e0f7d92f4059a971a
Created April 8, 2019 00:47 — forked from jmslbam/gist:f5a921c399d8fe6dc762
FacetWP Selections with reset
<div id="selected-filters" class="selected-filters">
<h4><?php _e('Selected filters','rc'); ?>:</h4>
<?php echo facetwp_display('selections'); ?>
<span class="facetwp-reset" onclick="FWP.reset()"><?php _e('reset all filters','rc'); ?></span>
</div>
@robi09
robi09 / functions.php
Created March 12, 2019 18:52 — forked from nullvariable/functions.php
don't send user count to wp.org stats.
<?php
add_filter( 'core_version_check_query_args', 'hide_stats', 99 );
function hide_stats( $query ) {
$query['blogs'] = 1;
$query['users'] = 1;
return $query;
}
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@robi09
robi09 / gist:289e00a1bc3dcb3b3a26
Created January 22, 2016 08:26 — forked from corsonr/gist:3d0425deaa80c601d454
WooCommerce: custom variations settings
<?php
// Add Variation Settings
add_action( 'woocommerce_product_after_variable_attributes', 'variation_settings_fields', 10, 3 );
// Save Variation Settings
add_action( 'woocommerce_save_product_variation', 'save_variation_settings_fields', 10, 2 );
/**
* Create new fields for variations

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3
# restart Sublime Text 3 and you should have Package Control working
<?php
/*
* Resize images dynamically using wp built in functions
* Victor Teixeira
*
* php 5.2+
*
* Exemplo de uso:
*
* <?php