View gist:9197003
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// アイコンを変更 | |
add_action( 'admin_print_styles', 'fuga_dashboard_print_styles' ); | |
function fuga_dashboard_print_styles() { | |
?> | |
<style> | |
/* | |
#dashboard_right_now li a.xxx-count:before, |
View gist:9197044
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// カスタム投稿タイプの記事数をダッシュボードに表示 | |
add_filter( 'dashboard_glance_items', 'hoge_dashboard_glance_items' ); | |
function hoge_dashboard_glance_items( $elements ) { | |
foreach ( array( | |
//'投稿タイプ名' を「,」区切りでココに記述。今回の場合は「お客様の声(voice)」と「商品登録(product)」。 | |
'voice', | |
'product' | |
) as $post_type ) { |
View gist:9197096
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// アイコンを変更 | |
add_action( 'admin_print_styles', 'piyo_dashboard_print_styles' ); | |
function piyo_dashboard_print_styles() { | |
?> | |
<style> | |
/* | |
#adminmenu #menu-posts-yyy div.wp-menu-image:before, |
View settings-user-1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"theme": "◯◯◯.sublime-theme" | |
} |
View settings-user-2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"theme": "◯◯◯.sublime-theme", | |
"color_scheme": "Packages/User/Monokai Bright Modified.tmTheme" | |
} |
View settings-user-3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auto_complete": true, | |
// オートコンプリート | |
"auto_complete_commit_on_tab": true, | |
// 補完候補の選択にタブキーのみを用いる | |
"auto_complete_delay": 50, | |
// 補完候補表示の遅延 | |
"auto_complete_size_limit": 4194304, | |
// オートコンプリートの最大サイズ | |
"auto_indent": true, |
View sublime-keymap-sample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["shift+enter"], "command": "insert", "args": {"characters": "<br />" } }, | |
{ "keys": ["ctrl+enter"], "command": "insert", "args": {"characters": "<br>" } } | |
] |
View snippet-target.sublime-snippet.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content> | |
<![CDATA[ | |
target="_blank"]]> | |
</content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>@tar</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.html</scope> --> | |
</snippet> |
View package-control.sublime-settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auto_upgrade_last_run": null, | |
"installed_packages": | |
[ | |
"AutoFileName", | |
// HTMLファイルを編集中に画像ファイルを予測変換で選択できて、自動で幅・高さも補完される | |
//[Mac] Sublime Text2 > Preferences > Package Settings AutoFileName > Settings - Default | |
// [Win] Preferences > Package Settings AutoFileName > Settings - Default | |
// を開いて、23行目を | |
View gist:9701703
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$map_address = get_post_meta($post -> ID, 'googlemap_address', true); | |
$map_marker = get_post_meta($post -> ID, 'googlemap_label', true); | |
// エスケープ | |
$map_address = esc_html( $map_address ); | |
// 全角英文字・数字など整形 | |
$map_address = mb_convert_kana( $map_address, "nKV", "UTF-8" ); |
OlderNewer