例: post → news_ja
wp post list --post_type=post --format=ids | sed "s/^\(.*\)$/wp post update \\1 --post_type=news_ja/" | shTODO: taxonomyの変換方法(とりあえず、プラグイン「Taxonomy Switcher」を使った)
例: post → news_ja
wp post list --post_type=post --format=ids | sed "s/^\(.*\)$/wp post update \\1 --post_type=news_ja/" | shTODO: taxonomyの変換方法(とりあえず、プラグイン「Taxonomy Switcher」を使った)
| <?php | |
| // デフォルトのリサイズを無効化 | |
| function disable_image_sizes( $sizes ) { | |
| unset( $sizes['thumbnail'] ); | |
| unset( $sizes['medium'] ); | |
| unset( $sizes['large'] ); | |
| unset( $sizes['medium_large'] ); | |
| unset( $sizes['1536x1536'] ); | |
| unset( $sizes['2048x2048'] ); | |
| return $sizes; |
| const resizeIframeWithKeepingAspectRatio = function () { | |
| $('iframe').each(function () { | |
| const me = $(this); | |
| if (/(youtube\.com|vimeo\.com)/.test(me.attr('src'))) { | |
| const height = me.width() * (me.attr('height') / me.attr('width')); | |
| me.css('height', `${height}px`); | |
| } | |
| }); | |
| }; | |
| $(window).on('resize', resizeIframeWithKeepingAspectRatio); |
現在のページのog:imageを開くブックマークレット
javascript:open(document.querySelector('meta[property="og:image"]').content);
| # 一覧の取得 | |
| grep "something you want" -rl ./ | |
| # .htaccess内の文字列の置換(バックアップファイルを作って、後で削除) | |
| find . -name "*.htaccess" -exec sed -i".backup_mogemoge" "s|/home/users/0/moge|/home/users/0/moge2|" {} \; | |
| find . -name "*.backup_mogemoge" -exec rm {} \; |
MAMPの機能を使ってhttpsでローカルサーバーへアクセスできる用になっても、"Not Secure"のような表示が出てしまうので、これを回避する方法。
.crtファイルをドラッグ&ドロップTrustの項目When using this certificateをAlways Trustに設定して閉じる(パスワード入力)| git rm -r --cached build/ |