Category: Admin
pre_onlyとnow_dispのコンテンツを非表示
// 目次からの削除を行う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
Disable All Admin Notices individually
function disable_all_admin_notices() { remove_all_actions(‘admin_notices’); } add_action(‘admin_init’, ‘disable_all_admin_notices’);Continue reading
Fix 500 Internal Server Error
# 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
Untitled Snippet
alert(‘Xss’);Continue reading
Untitled Snippet
Web 1920 – 2 תכנים מקוריים בקרוב יעלו חדשות היום ערוץ לייב גיימרים ניו יורק LOST IN THE CITY גם הוא וגם היא TWIST IT TOP שלכת קוניצ’יוואה תחזית מיוחדת עדמתי סוף טוב נלחם TOP 3,445 לראשונה בישראל – ספריית…Continue reading
Framework_Fluid_CSS
:root { /* Text Size Scale */ –text-xs: clamp(0.72rem, calc(0.82rem + -0.13vw), 0.79rem); –text-s: clamp(0.89rem, calc(0.88rem + 0.02vw), 0.90rem); –text-m: clamp(1.00rem, calc(0.95rem + 0.23vw), 1.13rem); –text-l: clamp(1.13rem, calc(1.02rem + 0.51vw), 1.41rem); –text-xl: clamp(1.27rem, calc(1.09rem + 0.90vw), 1.76rem); –text-2xl: clamp(1.42rem, calc(1.14rem…Continue reading
Untitled Snippet
Untitled Snippet
wpadmin add phone number with address in orders page
add_action( ‘manage_shop_order_posts_custom_column’ , ‘custom_orders_list_column_content’, 50, 2 ); function custom_orders_list_column_content( $column, $post_id ) { global $the_order, $post; if ( $column == ‘shipping_address’ ) { if( $phone = $the_order->get_billing_phone() ){ $phone_wp_dashicon = ‘ ‘; echo ‘‘. $phone.’‘; } } if ( ‘order_status’…Continue reading