Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
俺のフックが名古屋でもこんなに簡単なわけがない。
Search
Takuro Hishikawa
August 31, 2013
Technology
2
830
俺のフックが名古屋でもこんなに簡単なわけがない。
WordPressのフィルターフック、アクションフックの動作原理と使い方を実例多めに解説した資料です。
Takuro Hishikawa
August 31, 2013
Tweet
Share
More Decks by Takuro Hishikawa
See All by Takuro Hishikawa
Mautic Meetup Tokyo #8 Mautic 3 is coming! (Japanese)
hissy
0
32
Introducing concrete5 PWA add-on (Japanese)
hissy
0
1.2k
Mautic Glossary (ja) 2019
hissy
1
140
CMS導入プロジェクトを成功させるために 押さえておくべき5つの手順
hissy
4
1.1k
Mautic Glossary (ja)
hissy
1
850
Mautic Updates 2016-09
hissy
0
840
MauticSummerGamesTokyo
hissy
1
490
Mautic Updates 2016-07
hissy
0
360
CMS for the future
hissy
4
3.7k
Other Decks in Technology
See All in Technology
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
Terraform Stacks入門 #HashiTalks
msato
0
360
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
0
130
The Rise of LLMOps
asei
7
1.7k
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
複雑なState管理からの脱却
sansantech
PRO
1
150
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Building Applications with DynamoDB
mza
90
6.1k
Designing for Performance
lara
604
68k
Making Projects Easy
brettharned
115
5.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
A designer walks into a library…
pauljervisheath
204
24k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Transcript
໊ݹ Ͱ ԶͷϑοΫ͕͜Μͳʹ ؆୯ͳΘ͚͕ͳ͍ɻ ԶͷϑοΫ͕͜Μͳʹ ؆୯ͳΘ͚͕ͳ͍ɻ ore no hook ga
konna ni kantan na wakega nai. 8PSE'FT/BHPZB !)JTTZ/$ 1
͜Μͳઆ໌Έͨ͜ͱ͋Γ·ͤΜ͔ʁ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ൈਮͷ<>Λফ͢ʹɺGVODUJPOTQIQʹҎԼͷίʔυΛ
ίϐʔˍϖʔετ͠·͠ΐ͏ɻ 2
͜Εɺ࣮ʮϑοΫʯͱ͍͍·͢ɻ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ൈਮͷ<>Λফ͢ʹɺGVODUJPOTQIQʹҎԼͷίʔυΛ
ίϐʔˍϖʔετ͠·͠ΐ͏ɻ 3
ϑοΫͷதͰ͜ΕʮϑΟϧλʔϑοΫʯ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ൈਮͷ<>Λফ͢ʹɺGVODUJPOTQIQʹҎԼͷίʔυΛ
ίϐʔˍϖʔετ͠·͠ΐ͏ɻ 4
ࠓʮϑοΫʯͷ͘͠Έʹ͍ͭͯͷ͓ɻ 5
ϑοΫʹ̎ͭ͋Δɻ ΞΫγϣϯϑοΫ ϑΟϧλʔϑοΫ 6
8PSE1SFTTΛྉཧͩͱ ߟ͑ͯΈ·͠ΐ͏ 7
8PSE1SFTTͷॲཧ Ϩγϐ௨Γ࡞ΒΕΔ ྉཧͷΑ͏ͳͷ 8
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ 9
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ શͯͷॲཧʹॱ൪͕͋Γ·͕͢ɺ ͦΕͧΕಠཱ͍ͯ͠·͢ɻ 10
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ ༹͖ཛΛՃ͑Δɻ ॲཧΛՃ 11
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ ༹͖ཛΛՃ͑Δɻ ॲཧΛՃ ΞΫγϣϯϑοΫ 12
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ ༹͖ཛΛՃ͑Δɻ Ͳ͜ʹՃ͔ͨ͠ʁ 13
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ ༹͖ཛΛՃ͑Δɻ ʮ;ΜΘΓ͢Δ·Ͱ ࠞͥͨޙʯ 14
ΞΫγϣϯϑοΫΛॻ͍ͯΈͨ function ༹͖ཛΛՃ͑Δ() { } add_action(';ΜΘΓ͢Δ·Ͱࠞͥ ͨޙ', '༹͖ཛΛՃ͑Δ'); 15
ΞΫγϣϯϑοΫΛॻ͍ͯΈͨ function ༹͖ཛΛՃ͑Δ() { } add_action(';ΜΘΓ͢Δ·Ͱࠞͥ ͨޙ', '༹͖ཛΛՃ͑Δ'); ॲཧΛՃ͢Δ ॴΛࢦఆͯ͠ʜ
16
ΞΫγϣϯϑοΫΛॻ͍ͯΈͨ function ༹͖ཛΛՃ͑Δ() { } add_action(';ΜΘΓ͢Δ·Ͱࠞͥ ͨޙ', '༹͖ཛΛՃ͑Δ'); ࣮ߦ͢ΔॲཧΛ ໊ؔͰࢦఆ
17
ΞΫγϣϯϑοΫΛॻ͍ͯΈͨ function ༹͖ཛΛՃ͑Δ() { } add_action(';ΜΘΓ͢Δ·Ͱࠞͥ ͨޙ', '༹͖ཛΛՃ͑Δ'); ϑοΫʹՃ͑Δ ॲཧؔʢGVODUJPOʣͰॻ͖·͢
18
ͳͥ͜ΜͳΊΜͲ͍͘͞ ͜ͱΛ͢Δͷ͔ʁ 19
Ϩγϐιʔείʔυ Ξοϓσʔτ͞ΕΔɻ ॻ͖͑ͯ͠·͏ͱ͋ͱ ͰͲ͜Λฤू͔ͨ͠Θ͔Β ͳ͘ͳΔɻ 20
ΧελϚΠζϑοΫͰߦ͏ͷ͕ݪଇɻ ςϯϓϨʔτʹॻ͍ͯ͠·͏ͱɺςʔϚ Λม͑ͨ࣌ʹॲཧ͕ফ͑ͯ͠·͏ɻ 8FC੍࡞ऀ͠͠αΠτͷςʔϚมΘ Βͳ͍ͷͩͱࢥ͏͕ɺҰԠಛघͳྫͰຊདྷ Ϣʔβʔ͕ม͑Δͷ 21
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ 22
όλʔHΛࠞͥΔɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰࠞͥΔɻ όχϥΤοηϯεΛՃ͑Δɻ Ϩγϐͷதʹෳͷॲཧʹ ڞ௨ͨ͠ಈ࡞͕͋Γ·͢ɻ 23
όλʔHΛΑࠞͥ͘Δɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰΑࠞͥ͘Δɻ όχϥΤοηϯεΛՃ͑Δɻ ʮࠞͥΔʯΛ ʮΑࠞͥ͘Δʯʹ ϑΟϧλʔΛ͔͚ͨ 24
όλʔHΛΑࠞͥ͘Δɻ ࠭HΛՃ͑Δɻ ;ΜΘΓ͢Δ·ͰΑࠞͥ͘Δɻ όχϥΤοηϯεΛՃ͑Δɻ ʮࠞͥΔʯΛ ʮΑࠞͥ͘Δʯʹ ϑΟϧλʔΛ͔͚ͨ ϑΟϧλʔϑοΫ
25
ϑΟϧλʔϑοΫΛॻ͍ͯΈͨ function ࠞͥΔʹΑ͘Λ͢ ($text) { return ‘Α͘’ . $text; }
add_filter('ࠞͥΔ', 'ࠞͥΔʹ Α͘Λ͢'); 26
όλʔHΛΑࠞͥ͘Δɻ ;ΜΘΓ͢Δ·ͰΑࠞͥ͘Δɻ όχϥΤοηϯεΛՃ͑Δɻ ʮ࠭HΛՃ͑Δʯ Λॲཧ͠ͳ͍ 27
όλʔHΛΑࠞͥ͘Δɻ ;ΜΘΓ͢Δ·ͰΑࠞͥ͘Δɻ όχϥΤοηϯεΛՃ͑Δɻ ʮ࠭HΛՃ͑Δʯ Λॲཧ͠ͳ͍ ͜ΕϑΟϧλʔϑοΫ 28
ϑΟϧλʔϑοΫΛॻ͍ͯΈͨ function Ί͓ͯ͘() { return false; } add_filter('࠭ΛՃ͑Δ͔Ͳ͏ ͔', 'Ί͓ͯ͘');
29
ΞΫγϣϯϑοΫͷ͓͞Β͍ function ༹͖ཛΛՃ͑Δ() { } add_action(';ΜΘΓ͢Δ·Ͱࠞͥ ͨޙ', '༹͖ཛΛՃ͑Δ'); ͋͘·ͰॲཧͷՃɻ 30
ϑΟϧλʔϑοΫͷ͓͞Β͍ function ࠞͥΔʹΑ͘Λ͢ ($text) { return ‘Α͘’ . $text; }
add_filter('ࠞͥΔ', 'ࠞͥΔʹ Α͘Λ͢'); ͋͘·Ͱطଘͷॲཧͷมߋɻ 31
ΞΫγϣϯϑοΫجຊతʹ طଘͷॲཧͷมߋͰ͖ͳ͍ɻ ϑΟϧλʔϑοΫجຊతʹॲཧࣗମΛ Ճ͢Δ͜ͱͰ͖ͳ͍ɻ 32
ͨͩ͠ɺྫ֎ʜ άϩʔόϧมΛ͑ΞΫγϣϯϑΟ ϧλʔͰطଘͷॲཧͷ݁ՌΛมߋͨ͠ ΓϑΟϧλʔ͢Δ͜ͱ͕Ͱ͖Δɻ άϩʔόϧมςʔϚϓϥάΠϯΛ·͍ͨͰ 8PSE1SFTTͷॲཧதͰڞ௨Ͱ༻Ͱ͖Δม QPTU XQ@RVFSZ XQ@SFXSJUFͳͲ ҰԠɺมΛͯ͠ϑΟϧλʔͷΑ͏ʹ͑ͯ͠·͏ʜʢ͍͜͠ʣ
33
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); 34
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ϑΟϧλʔϑοΫͷొ
35
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ϑΟϧλʔΛ࣮ߦ͢Δ
໊ؔ 36
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ϑΟϧλʔΛ࣮ߦ͢Δ
ؔ 37
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ԿΒ͔ͷΛड͚औͬͯʜ
38
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ۭͷจࣈྻΛฦ͍ͯ͠Δ
39
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ͜ͷNPSF
ԿʹΘΕͯΔͷʜ 40
ιʔεΛಡΉ͔͠ͳ͍ʂ 41
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ϑοΫΛొ͢Δॲཧ໊
42
಄ͷίʔυΛ͏͍ͪͲݟͯΈ·͠ΐ͏ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); BQQMZ@pMUFST
FYDFSQU@NPSF Ͱ8PSE1SFTTͷιʔείʔυΛݕࡧʂ 43
8PSE1SFTTίΞϑΝΠϧͷ֘ͷίʔυ function wp_trim_excerpt($text = '') { $raw_excerpt = $text; if
( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); } return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); } wp-includes/formatting.phpʢൈਮʣ 44
8PSE1SFTTίΞϑΝΠϧͷ֘ͷίʔυ function wp_trim_excerpt($text = '') { $raw_excerpt = $text; if
( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); } return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); } BQQMZ@pMUFST ϑΟϧλʔΛ͔͚Δ wp-includes/formatting.phpʢൈਮʣ 45
8PSE1SFTTίΞϑΝΠϧͷ֘ͷίʔυ function wp_trim_excerpt($text = '') { $raw_excerpt = $text; if
( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); } return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); } ઌ΄ͲͷNPSFͷத͕໌ɻ ֯εϖʔε <>ͩͬͨɻ wp-includes/formatting.phpʢൈਮʣ 46
಄ͷίʔυʹ͖ͬͯ·ͨ͠ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ͭ·Γ͜ͷNPSF
bbb<>`ͱ͍͏จࣈྻͰͨ͠ 47
಄ͷίʔυʹ͖ͬͯ·ͨ͠ function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); ϑΟϧλʔϑοΫΛͬͯ
ۭͷจࣈྻΛฦ͢͜ͱͰʜ 48
8PSE1SFTTίΞϑΝΠϧͷ֘ͷίʔυ function wp_trim_excerpt($text = '') { $raw_excerpt = $text; if
( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); } return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); } ίΞϑΝΠϧதͷFYDFSQU@NPSFʹ ೖ͞ΕΔ͕มΘΔ wp-includes/formatting.phpʢൈਮʣ 49
ʜʜ͍͖ͯͯΔ͔ʔͬʂʁ 50
Ͱ͞Βʹ࣮ફฤɻ 51
8PSE1SFTTͷΧςΰϦʔΟδΣοτ ฒͼॱΛม͍͑ͨͳ͊ʜ 52
ฒͼॱͷઃఆ͕ͳ͍ʜ 53
ͯ͜͜͞Ͱ࣭ɻ ΧςΰϦʔΟδΣοτ͕දࣔ͢Δ ΧςΰϦʔͷฒͼॱΛม͍͑ͨɻ ͜ΕΞΫγϣϯϑοΫʁ ϑΟϧλʔϑοΫʁ 54
֘෦ͷίʔυ /** * Categories widget class * * @since 2.8.0
*/ class WP_Widget_Categories extends WP_Widget { ... ! ! $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); ... ! ! <ul> <?php ! ! $cat_args['title_li'] = ''; ! ! wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> ! ! </ul> ... wp-includes/default-widget.phpʢൈਮʣ 55
֘෦ͷίʔυ /** * Categories widget class * * @since 2.8.0
*/ class WP_Widget_Categories extends WP_Widget { ... ! ! $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); ... ! ! <ul> <?php ! ! $cat_args['title_li'] = ''; ! ! wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> ! ! </ul> ... XQ@MJTU@DBUFHPSJFT ؔͰ ΧςΰϦʔͷҰཡΛग़ྗͯ͠ΔΑ͏ͩɻ wp-includes/default-widget.phpʢൈਮʣ 56
֘෦ͷίʔυ /** * Categories widget class * * @since 2.8.0
*/ class WP_Widget_Categories extends WP_Widget { ... ! ! $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); ... ! ! <ul> <?php ! ! $cat_args['title_li'] = ''; ! ! wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> ! ! </ul> ... ΦϓγϣϯDBU@BSHTʹ ϑΟϧλʔΛ௨ͯ͋͠Δʂ ͜ΕͰฒͼॱมߋͰ͖ͦ͏ɻ wp-includes/default-widget.phpʢൈਮʣ 57
֘෦ͷίʔυ /** * Categories widget class * * @since 2.8.0
*/ class WP_Widget_Categories extends WP_Widget { ... ! ! $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); ... ! ! <ul> <?php ! ! $cat_args['title_li'] = ''; ! ! wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> ! ! </ul> ... ΦϓγϣϯDBU@BSHT ྻͳΜͩͳɻ ฒͼॱ໊લॱʹͳ͍ͬͯΔͳɻ wp-includes/default-widget.phpʢൈਮʣ 58
֘෦ͷίʔυ /** * Categories widget class * * @since 2.8.0
*/ class WP_Widget_Categories extends WP_Widget { ... ! ! $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); ... ! ! <ul> <?php ! ! $cat_args['title_li'] = ''; ! ! wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> ! ! </ul> ... ϑΟϧλʔ໊ ʮXJEHFU@DBUFHPSJFT@BSHTʯ͔ɻ wp-includes/default-widget.phpʢൈਮʣ 59
GVODUJPOTQIQʹهࡌ͢Δίʔυ function change_widget_category_orderby( $cat_args ) { $cat_args['orderby'] = 'count'; $cat_args['order']
= 'DESC'; return $cat_args; } add_filter( 'widget_categories_args', 'change_widget_category_orderby' ); 60
GVODUJPOTQIQʹهࡌ͢Δίʔυ function change_widget_category_orderby( $cat_args ) { $cat_args['orderby'] = 'count'; $cat_args['order']
= 'DESC'; return $cat_args; } add_filter( 'widget_categories_args', 'change_widget_category_orderby' ); XQ@MJTU@DBUFHPSJFT ͷ ΦϓγϣϯΛྻͰड͚औͬͯʜ ˢ ͜Ε͕ιʔεΛಡ·ͳ͍ͱ͔Βͳ͍ 61
GVODUJPOTQIQʹهࡌ͢Δίʔυ function change_widget_category_orderby( $cat_args ) { $cat_args['orderby'] = 'count'; $cat_args['order']
= 'DESC'; return $cat_args; } add_filter( 'widget_categories_args', 'change_widget_category_orderby' ); มߋ͍ͨ͠ΦϓγϣϯΛ ઃఆͯ͠ʜ ˢ ͬͪ͜$PEFYͷXQ@MJTU@DBUFHPSJFTͷ ϖʔδΛݟͳ͍ͱ͔Βͳ͍ 62
GVODUJPOTQIQʹهࡌ͢Δίʔυ function change_widget_category_orderby( $cat_args ) { $cat_args['orderby'] = 'count'; $cat_args['order']
= 'DESC'; return $cat_args; } add_filter( 'widget_categories_args', 'change_widget_category_orderby' ); ฦ͢ 63
Ͱ͖ͨʂ ΧςΰϦʔͷ ߘॱ ߱ॱ 64
͜ͷΑ͏ʹɺϑΟϧλʔϑοΫ ϑΟϧλʔ͞ΕΔ͕ͲΜͳͰ ϑΟϧλʔϑοΫͰฦ͕ͨ͠ ͦͷޙͲͷΑ͏ʹΘΕΔͷ͔ɺ ϑοΫʹΑͬͯҟͳΔ͠ɺ ιʔεΛݟͳ͍ͱ͔Βͳ͍ɻ 65
͞ΒʹɺΞΫγϣϯϑοΫ 8PSE1SFTT͕ͲΜͳॱ൪Ͱ ԿΛॲཧ͍ͯ͠Δͷ͔ɺ ͋ΔఔΘ͔ͬͯͳ͍ͱ Ͳ͜ʹϑοΫ͍͍ͯ͠ͷ͔ ͔Βͳ͍ɻ 66
͑ʁ݁ہ ͍͠͡Όͳ͍͔ͬͯʜʁ ? 67
ԶͷϑοΫ ͕ͦΜͳʹ ؆୯ͳΘ͚͕ͳ͍ʂ ԶͷϑοΫ ͕ͦΜͳʹ ؆୯ͳΘ͚͕ͳ͍ʂ 68
ϑΟϧλʔϑοΫͷσόοάʹ %FCVH#BS&YUFOEFSϓϥάΠϯͷ 7BSJBCMF-PPLVQػೳ͕ศར IUUQXPSEQSFTTPSHFYUFOEQMVHJOTEFCVHCBSFYUFOEFS Ͱ ΞΫγϣϯϑοΫͱϑΟϧλʔϑοΫͷ ҧ͍ɺجຊతͳߟ͑ํΛ͓͚ͬͯ ͦΜͳʹා͘ͳ͍Αʂ 69
Ͱ࠷ޙʹ࿅शɻ 70
XQMPHJOQIQΛΧελϚΠζͯ͠ΈΑ͏ XQMPHJOQIQϩάΠϯը໘ ݟͨΛΧελϚΠζͰ͖Δ֤छͷ ΞΫγϣϯˍϑΟϧλʔϑοΫ͕͋Δ ͙͢ʹ֬ೝͰ͖Δ͠Өڹൣғগͳ͍ͷ Ͱ࿅श͖ 71
XQMPHJOQIQͷϑΟϧλʔϑοΫ $login_header_url = __( 'http://wordpress.org/' ); ... $login_header_url = apply_filters(
'login_headerurl', $login_header_url ); ... <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1> wp-login.phpʢൈਮʣ 72
XQMPHJOQIQͷϑΟϧλʔϑοΫ $login_header_url = __( 'http://wordpress.org/' ); ... $login_header_url = apply_filters(
'login_headerurl', $login_header_url ); ... <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1> wp-login.phpʢൈਮʣ มMPHJO@IFBEFS@VSMʹ 8PSE1SFTTެࣜαΠτͷ63-͕ ֨ೲ͞Ε͍ͯΔ ʢ༁ϑΝΠϧʹΑ࣮ͬͯࡍʹ KBXPSEQSFTTPSHʹͳΔʣ 73
XQMPHJOQIQͷϑΟϧλʔϑοΫ $login_header_url = __( 'http://wordpress.org/' ); ... $login_header_url = apply_filters(
'login_headerurl', $login_header_url ); ... <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1> wp-login.phpʢൈਮʣ มMPHJO@IFBEFS@VSMʹ ϑΟϧλʔ͕ద༻͞Ε͍ͯΔ 74
XQMPHJOQIQͷϑΟϧλʔϑοΫ $login_header_url = __( 'http://wordpress.org/' ); ... $login_header_url = apply_filters(
'login_headerurl', $login_header_url ); ... <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1> wp-login.phpʢൈਮʣ มMPHJO@IFBEFS@VSM͕ ΘΕ͍ͯΔͷϩάΠϯ ϑΥʔϜͷϩΰͷϦϯΫઌ 75
GVODUJPOTQIQ͔ΒϦϯΫઌΛม͑ͯΈΑ͏ function change_login_headerurl( $login_headerurl ) { ! return 'http://2013.wordfes.org/'; }
add_filter( 'login_headerurl', 'change_login_headerurl' ); 76
XQMPHJOQIQͷΞΫγϣϯϑοΫ <?php do_action('login_footer'); ?> wp-login.phpʢൈਮʣ ΞΫγϣϯϑοΫ͕࣮ߦ͞ΕΔͷ EP@BDUJPOؔ ॲཧͷʮՃʯͳͷͰɺ طଘͷΛ͏͜ͱͳ͘ γϯϓϧͰ͢Ͷɻ
77
XQMPHJOQIQͷΞΫγϣϯϑοΫ function login_footer_message() { ! echo '<h1 style="text- align:center">ͭͳ͕Ζ·͍ʂ</h1>'; }
add_action( 'login_footer', 'login_footer_message' ); ϝοηʔδΛՃͯ͠Έͨ 78
࿅शɿϩάΠϯΤϥʔϝοηʔδ echo '<div id="login_error">' . apply_filters('login_errors', $errors) . "</div>\n"; wp-login.phpʢൈਮʣ
ΤϥʔϝοηʔδͷʮɻʯΛ ʮὑʯʹม͑ͯΈ·͠ΐ͏ʂ ղͪ͜Β IUUQTHJTUHJUIVCDPNIJTTZ DGCB 79
ϑοΫ͕ා͘ͳ͘ͳ͔ͬͨͳʁʁ 80
ϑοΫʹؔ͢ΔϒϩάΛ৭ʑΞοϓͯ͠·͢ɻ ϑΟϧλʔϑοΫɿΧελϜϝχϡʔͷ߲ʹ༩͞ΕΔΫϥεΛΧελϚΠζ͢Δ IUUQOPUOJMDSFBUJWFDPNCMPHBSDIJWFT ϑΟϧλʔϑοΫɿݕࡧ݁ՌͰߘλΠϓ͝ͱʹҧ͏ςϯϓϨʔτϑΝΠϧΛ͏ IUUQOPUOJMDSFBUJWFDPNCMPHBSDIJWFT ΞΫγϣϯϑοΫɿςʔϚ͔Β+BWBTDSJQU$44ΛಡΈࠐΉॻ͖ํ·ͱΊ IUUQOPUOJMDSFBUJWFDPNCMPHBSDIJWFT ΞΫγϣϯϑοΫɿπʔϧόʔΛΧελϚΠζ͢Δ IUUQOPUOJMDSFBUJWFDPNCMPHBSDIJWFT ΞΫγϣϯϑοΫɿύϯͣ͘φϏήʔγϣϯʢ#SFBEDSVNC/BW95ʣΛΧελϚΠζ͢Δ
IUUQOPUOJMDSFBUJWFDPNCMPHBSDIJWFT ϑΟϧλʔϑοΫɿΪϟϥϦʔΛΧελϚΠζ͖ͯ͠ͳK2VFSZϓϥάΠϯΛ͏ IUUQOPUOJMDSFBUJWFDPNCMPHBSDIJWFT 81
5IBOLT 82