add_action( ‘shutdown’, ‘advads_schedule_order_notes_to_set_actions_run’ ); /** * Schedule the order notes to set actions run cron event. * * @return void */ function prefix_schedule_order_notes_to_set_actions_run() { // This option is added when no more notes can be found. if ( get_option( ‘prefix_use_order_notes_to_set_actions_run’…Continue reading
add_action( ‘admin_footer’, ‘prefix_mailchimp_stop_sync’ ); /** * Stop the Mailchimp sync from running. * This is a temporary function to stop the sync from running and can be deleted once the sync is stopped. * * @return void */ function prefix_mailchimp_stop_sync()…Continue reading
// 目次からの削除を行うjsの読み込み行う function add_preonly_script() { wp_enqueue_script(‘custom-script’, get_stylesheet_directory_uri() . ‘/js/pre-only.js’, array(‘jquery’), ”, true); } add_action(‘wp_enqueue_scripts’, ‘add_preonly_script’); // パラメータによってclass名の差し替え function custom_preonly($content) { // 現在のURLを取得 $current_url = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”; // URLに’pre’が含まれるかチェック if (strpos($current_url, ‘pre’) !== false) { $content = str_replace(‘ pre_only’, ”, $content); }…Continue reading
function disable_all_admin_notices() { remove_all_actions(‘admin_notices’); } add_action(‘admin_init’, ‘disable_all_admin_notices’);Continue reading
# BEGIN WordPress RewriteEngine On RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPressContinue reading