-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
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 |
<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> |
<?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' ); |
$icons = array( | |
'asterisk' => 'asterisk', | |
'plus' => 'plus', | |
'euro' => 'euro', | |
'eur' => 'eur', | |
'minus' => 'minus', | |
'cloud' => 'cloud', | |
'envelope' => 'envelope', | |
'pencil' => 'pencil', | |
'glass' => 'glass', |
function redirect_login_page() { | |
$login_page = home_url('/login/'); | |
$page_viewed = basename($_SERVER['REQUEST_URI']); | |
if($page_viewed == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET') { | |
wp_redirect($login_page); | |
exit; | |
} | |
} | |
add_action('init','redirect_login_page'); |
/** | |
* Get text domain | |
*/ | |
if(!function_exists('get_textdomain')) { | |
function get_textdomain() { | |
$default_headers = array( 'td' => 'Text Domain'); | |
$text_domain = get_file_data(get_stylesheet_uri(), $default_headers ); | |
if(array_key_exists('td', $text_domain)) { | |
return $text_domain['td']; |
add_filter( 'woocommerce_ajax_variation_threshold', 'woocommerce_ajax_variation_threshold', 10, 2 ); | |
function woocommerce_ajax_variation_threshold( $qty, $product ) { | |
return 10000; | |
} |
/** | |
* Display the logo in your theme using the following functions: the_site_logo() and get_the_site_logo() | |
* Check if logo exists using the following function: has_custom_logo() | |
* The the_site_logo() function output is <a href="%1$s" class="site-logo-link"><img class="site-logo" data-size="%2$s" /></a>. Make sure you use the appropriate CSS classes in your theme Front End. | |
* The function has this filter apply_filters( 'get_the_site_logo', $html, $size ); | |
* Use "site_logo" id in JS to create Customizer Transport | |
*/ | |
/** | |
* Check WordPress version |