Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's New in Twenty Seventeen

Kite
January 21, 2017

What's New in Twenty Seventeen

WordPress 4.7 では
多くの新機能が追加されました。
最新のデフォルトテーマ 
Twenty Seventeen を使って
それらを最大限に体験してみよう。

Kite

January 21, 2017
Tweet

More Decks by Kite

Other Decks in Programming

Transcript

  1. IN TWENTY SEVENTEEN
    WHAT’S NEW
    ࠷৽ͷσϑΥϧτςʔϚ

    Twenty Seventeen ͔ΒݟΔ

    WordPress ͷ৽ػೳ

    View full-size slide

  2. Kite
    KITERETZ inc. CEO & Founder
    ! kite.koga " ixkaito # ixkaito
    Web & graphic designer
    Programmer
    WordPress core contributor
    Ruby on Rails contributor
    React contributor
    Wocker developer
    Bathe developer
    Frasco developer

    View full-size slide

  3. 8PSE1SFTTͰ͸

    ଟ͘ͷ৽ػೳ͕௥Ճ͞Ε·ͨ͠ɻ
    ࠷৽ͷσϑΥϧτςʔϚ

    5XFOUZ4FWFOUFFOΛ࢖ͬͯ

    ͦΕΒΛ࠷େݶʹମݧͯ͠ΈΑ͏ɻ
    4.7& TWENTY SEVENTEEN

    View full-size slide

  4. CONTENTS
    8PSE1SFTTͷਪ঑ಈ࡞؀ڥ
    0
    5XFOUZ4FWFOUFFOͱ͸
    1
    ॳΊͯGSPOUQBHFQIQΛ࠾༻
    2
    ςʔϚελʔλʔίϯςϯπ
    3
    ฤूγϣʔτΧοτ
    4
    ಈըϔομʔ
    5
    ΧελϜ$44
    6
    1%'αϜωΠϧϓϨϏϡʔ
    7
    ϢʔβʔผμογϡϘʔυݴޠ
    8
    get_theme_file_uri()
    9

    View full-size slide

  5. 8PSE1SFTTͷਪ঑ಈ࡞؀ڥ
    ˙ 1)1όʔδϣϯҎ্
    ˙ .Z42-όʔδϣϯҎ্·ͨ͸.BSJB%#όʔδϣϯҎ্
    ˙ )5514αϙʔτ ͳ͔ͥIUUQTKBXPSEQSFTTPSHʹ͸ͳ͍

    ඞਢͰ͸͋Γ·ͤΜ͕ɺΑΓྑ͍ηΩϡϦςΟͷͨΊʹਪ঑͠·͢ɻ

    View full-size slide

  6. 5XFOUZ4FWFOUFFOͱ͸
    8PSE1SFTTʹ௥Ճ͞ΕͨσϑΥϧτςʔϚɻ
    σϑΥϧτςʔϚͱͯ͠͸

    ॳΊͯຊ֨తϏδωεαΠτ޲͚ʹ࡞ΒΕ͍ͯ·͢ɻ

    View full-size slide

  7. 5XFOUZ4FWFOUFFOͰ͸ݻఆϖʔδΛϑϩϯτϖʔδͱͯ͠ར༻͠΍͘͢ͳΓ·ͨ͠ɻϑϩϯτϖʔδηΫγϣϯػ
    ೳΛར༻͢Δ͜ͱʹΑͬͯɺ࠷େͭͷݻఆϖʔδΛ௥ՃͰϑϩϯτϖʔδʹදࣔͤ͞Δ͜ͱ͕ՄೳͰ͢ɻ౤ߘϖʔδ
    ͱͯ͠ઃఆͨ͠ݻఆϖʔδΛϑϩϯτϖʔδηΫγϣϯʹ௥Ճ͢Δ͜ͱʹΑͬͯɺݻఆϑϩϯτϖʔδΛઃఆ্ͨ͠
    Ͱ࠷৽౤ߘͷҰ෦Λϑϩϯτϖʔδʹදࣔͤ͞Δ͜ͱ΋ՄೳͰ͢ɻͳ͓ɺϑϩϯτϖʔδʹݻఆϖʔδΛઃఆ͍ͯ͠
    ͳ͍৔߹ɺ5XFOUZ4FWFOUFFO͸JOEFYQIQΛ࢖͏Α͏ʹ͍ͯ͠·͢ GVODUJPOTQIQߦ໨͋ͨΓ
    ɻ
    σϑΥϧτςʔϚͰ
    ॳΊͯGSPOUQBHFQIQΛ࠾༻

    View full-size slide

  8. ςʔϚελʔλʔίϯςϯπ
    ৽نαΠτͷΧελϚΠζΛ࢝ΊΔ
    ͱɺ࠷ॳͷ͔ͬ͠Γͨ͠਽ܗͱͯ͠
    ςʔϚ͝ͱʹελʔλʔίϯςϯπ
    ͕ఏڙ͞Ε·͢ɻελʔλʔίϯς
    ϯπ͸ɺ࠷దͳ৔ॴʹϏδωε৘ใ
    ΢ΟδΣοτΛ഑ஔ͢Δ΋ͷ͔Βɺ
    ඒ͍͠ը૾ͷ੩తϑϩϯτϖʔδʹ
    ϦϯΫ͢ΔιʔγϟϧΞΠίϯ෇͖
    ͷαϯϓϧϝχϡʔ·ͰଟذʹΘͨ
    Γ·͢ɻͨͩ҆͠͝৺Λɻ࠷ॳͷςʔ
    ϚઃఆΛอଘ͠ެ։͢Δ·Ͱɺ࣮ࡍ
    ͷ؀ڥʹ͸൓ө͞Ε·ͤΜɻ

    View full-size slide

  9. ฤूγϣʔτΧοτ
    ϥΠϒϓϨϏϡʔ࣌ɺαΠτͷதͰΧελ
    ϚΠζՄೳͳ৔ॴʹγϣʔτΧοτΞΠί
    ϯ͕දࣔ͞Ε·͢ɻΞΠίϯΛΫϦοΫ͢
    Ε͹ɺ͙͢ʹฤूΛ࢝ΊΒΕ·͢ɻελʔ
    λʔίϯςϯπͱͷ૊Έ߹ΘͤʹΑΓɺ͜
    Ε·ͰҎ্ʹૉૣ͘αΠτΛΧελϚΠζ
    Ͱ͖·͢ɻ

    View full-size slide

  10. ಈըϔομʔ
    ࣌ʹ͸ɺಈ͘ϔομʔը૾ͱͯ͠ͷɺ
    େ͖ͳಠಛͷงғؾ͕͋Δಈը͸࠽
    ೳͷݟͤॴʹͳΓ·͢ɻ5XFOUZ
    4FWFOUFFO Λ͓ࢼ͍ͩ͘͠͞ɻಈ
    ըͷΠϯεϐϨʔγϣϯ͕ඞཁͰ͢
    ͔ μ΢ϯϩʔυͰ͖Δಈըϔομʔ
    ͷ͋ΔαΠτΛݕࡧ͠ɺ࢖ͬͯΈͯ
    ͍ͩ͘͞ɻ

    View full-size slide

  11. εϜʔζͳϝχϡʔ࡞੒ αΠτͷଟ͘ͷϝχϡʔʹ͸ݻఆ
    ϖʔδ΁ͷϦϯΫΛؚΉ΋ͷͰ͢
    ͕ɺ·ͬͨ͘ݻఆϖʔδ͕ͳ͔ͬ
    ͨͱͨ͠ΒͲ͏ͳΔͰ͠ΐ͏͔
    ࠓͰ͸ϝχϡʔΛ࡞੒͢Δؒʹɺ
    ΧελϚΠβʔ͔Β཭ΕɺมߋΛ
    ഁغ͢Δ͜ͱͳ͘ɺ ݻఆϖʔδΛ
    ௥Ճ͢Δ͜ͱ͕Ͱ͖·͢ɻΧελ
    ϚΠζͨ͠಺༰Λެ։͢Δͱɺί
    ϯςϯπͰ͍ͬͺ͍ʹ͢Δ४උ͕
    Ͱ͖ͨ৽نݻఆϖʔδ͕ग़དྷ্͕
    Γ·͢ɻ

    View full-size slide

  12. ΧελϜ$44
    ࣌ʹ͸αΠτΛ׬ᘳʹ͢ΔͨΊʹϏδϡΞϧ
    ͷඍௐ੔͕ඞཁͱͳΓ·͢ɻ8PSE1SFTT
    ʹΑΓɺΧελϜ $44 Λ௥Ճͯ͠ɺ͙͢ʹα
    Πτ͕ͲͷΑ͏ʹมߋ͞ΕΔͷ͔ΛݟΔ͜ͱ
    ͕Ͱ͖ΔΑ͏ʹͳΓ·͢ɻ ϥΠϒϓϨϏϡʔ
    Ͱ͸ɺϖʔδΛϦϑϨογϡͯ͠εϐʔυΛ
    མͱ͢͜ͱͳ͘ɺ͢͹΍͘࡞ۀ͢Δ͜ͱ͕Ͱ
    ͖·͢ɻ

    View full-size slide

  13. 1%'αϜωΠϧϓϨϏϡʔ
    υΩϡϝϯτίϨΫγϣϯͷ؅ཧ͸
    8PSE1SFTTͰΑΓ؆୯ʹͳΓ·͢ɻ1%'
    ΛΞοϓϩʔυ͢ΔͱαϜωΠϧը૾͕࡞੒
    ͞Εɺ͢΂ͯͷυΩϡϝϯτͷதͰΑΓ༰қ
    ʹ۠ผͰ͖ΔΑ͏ʹͳΓ·͢ɻ

    View full-size slide

  14. Ϣʔβʔผ

    μογϡϘʔυݴޠ
    αΠτ͕ͻͱͭͷݴޠͰ͋Δ͔Βͱ
    ݴͬͯɺͦͷαΠτΛ؅ཧ͢Δ୭΋
    ͕؅ཧը໘ͷͦͷݴޠΛ޷ΜͰ͍Δ
    ͜ͱΛҙຯ͠·ͤΜɻαΠτʹΑΓ
    ଟ͘ͷݴޠΛ௥Ճ͢ΔͱɺϢʔβʔ
    ϓϩϑΟʔϧʹϢʔβʔݴޠઃఆ͕
    දࣔ͞Ε·͢ɻ

    View full-size slide

  15. get_theme_file_uri()
    wp_enqueue_script( 'my-script', get_theme_file_uri( 'js/my-script.js' ) );
    ্هͷίʔυ͸ɺࢠςʔϚʹ js/my-script.js ͕ଘࡏ͢Δ৔߹ɺͦͷ URL Λऔಘ͠ɺଘࡏ͠ͳ͍৔߹
    ͸਌ςʔϚͷ js/my-script.js ͷ URL Λऔಘ͠·͢ɻ͜ΕʹΑΓɺ਌ςʔϚͰಡΈࠐΉϑΝΠϧΛࢠ
    ςʔϚͰ؆୯ʹ্ॻ͖Ͱ͖ΔΑ͏ʹͳΓ·ͨ͠ɻ΋ͪΖΜɺࢠςʔϚ͕࢖ΘΕ͍ͯͳ͍৔߹͸਌ςʔ
    Ϛͷ URL Λऔಘ͠·͢ɻ

    View full-size slide