// 目次からの削除を行う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
$review_content = ”; $review_content = preg_replace(‘/]*>[\s| ]*/’, ”, $review_content ); // Remove empty paragraphs.Continue reading
add_filter( ‘edd_after_payment_actions_delay’, function( $delay ) { // Change this to the number of seconds you want to delay by. Suggested values are 60 or 90. $delay = 60; return $delay; } );Continue reading
add_filter( ‘edd_use_after_payment_actions’, ‘__return_false’ );Continue reading
function show_loggedin_function( $atts ) { global $current_user, $user_login; get_currentuserinfo(); add_filter(‘widget_text’, ‘do_shortcode’); if ($user_login) return ‘Welcome ‘ . $current_user->display_name . ‘!’; else return ‘Login‘; } add_shortcode( ‘show_loggedin_as’, ‘show_loggedin_function’ );Continue reading
function fulano_prevent_future_type( $post_data ) { if ( $post_data[‘post_status’] == ‘future’ ) { $post_data[‘post_status’] = ‘publish’; } return $post_data; } add_filter(‘wp_insert_post_data’, ‘fulano_prevent_future_type’); remove_action(‘future_post’, ‘_future_post_hook’);Continue reading
add_action( ‘wp_before_admin_bar_render’, function () { global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘wp-logo’ ); }, 0 );Continue reading
add_filter( ‘enable_login_autofocus’, ‘__return_false’ );Continue reading
remove_action( ‘after_password_reset’, ‘wp_password_change_notification’ );Continue reading
add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://netzinformatique.fr/assets/images/logo-k-586×748.png’; $logo_width = 84; $logo_height = 84; printf( ‘.login h1 a {background-image:url(%1$s) !important; margin:0…Continue reading