Skip to content

Instantly share code, notes, and snippets.

@masato-igarashi
masato-igarashi / pll_copy_post_metas.php
Created March 15, 2018 02:48 — forked from qstudio/pll_copy_post_metas.php
WP / PolyLang / Un-Sync Specified Custom Fields
<?php
// filter to exclude specified post_meta from Polylang Sync ##
add_filter( 'pll_copy_post_metas', 'q_pll_copy_post_metas' );
/**
* Remove defined custom fields from Polylang Sync
*
* @since 0.1
* @param Array $metas
@masato-igarashi
masato-igarashi / db-config.php
Last active June 25, 2018 14:34
hyperdbでDBをレプリケーションした際、レプリカラグによるwoocommerce ajaxカート不具合の解消
<?php
$wpdb->save_queries = false;
$wpdb->persistent = false;
$wpdb->max_connections = 0;
$wpdb->check_tcp_responsiveness = true;
//マスターDB設定
//readはスレーブがタイムアウトしたときのために2に設定
$wpdb->add_database(array(
'host' => DB_HOST,