-
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'); |
/** | |
* 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 |
if(!function_exists('revive_home_sections')) { | |
function revive_home_sections() { | |
$array = array(); | |
$dir = R_PATH . "/parts/home/order/*"; | |
foreach(glob($dir) as $file) { | |
if(!is_dir($file)) { | |
$array[substr(basename($file), 0, strpos(basename($file), "."))] = ucfirst(str_replace('_', ' ', substr(substr(basename($file), 0, strpos(basename($file), ".")), 2))); |
if(!function_exists('array_key_check')) { | |
function array_key_check($key = NULL, $array = NULL) { | |
if($key == NULL or $array == NULL) { | |
return NULL; | |
} else { | |
if(array_key_exists($key, $array)) { | |
if(!empty($array[$key])) { | |
return TRUE; | |
} |