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

たったひとつのウィジェットのつくりかた - WordPress, How to create a Single Widget.

たったひとつのウィジェットのつくりかた - WordPress, How to create a Single Widget.

2017年12月17日(日) WordBench 東京 12月勉強会 年末LT忘年会@ハートビーツ LT発表資料

Akira Tachibana

December 17, 2017
Tweet

More Decks by Akira Tachibana

Other Decks in Technology

Transcript

  1. ͨͬͨͻͱͭͷ
    ΢ΟδΣοτͷͭ͘Γ͔ͨ
    ཱՖ ໌
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    8PSE#FODI౦ژ ݄ษڧձ ೥຤-5๨೥ձ

    View full-size slide

  2. ཱՖ ໌
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    *5اۀۈ຿
    ϒϩάͰ 8PSE1SFTT Λར༻
    8PSE1SFTT%PDVNFOU5FBN
    ग़਎ٶ࡚
    झຯԿ͔ಡΉ͜ͱɺूΊΔ͜ͱ
    8P!BUBDIJCBOB
    ࠷ۙͷϒʔϜ৽ւ੣

    View full-size slide


  3. ͋Δ೔ɺEPDTʹจ͕͖۟ͨ
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  4. ݸ͚ͩଘࡏ͢Δ
    ΢ΟδΣοτΛ࡞Γ͍͚ͨͲ
    υΩϡϝϯτʹͳ͍͡Όͳ͍
    ͳΜͱ͔͠ͳ͍͞
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  5. $PEFY
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  6. $PEF3FGFSFODF
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  7. 5IFNF)BOECPPL
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  8. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    ͔ͨ͠ʹͳ͍

    View full-size slide


  9. ͱΓ͋͑ͣͷճ౴
    ੩తม਺Ͱ
    ൪໨Ҏ߱ͷΠϯελϯεΛ
    ͸͚͡͹
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  10. Ϛϧν΢ΟδΣοτ͕ݏͳͷ
    γϯάϧ΢ΟδΣοτʹ͍ͨ͠ͷ
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  11. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    Ϛϧν΢ΟδΣοτ
    γϯάϧ΢ΟδΣοτ
    ͳʹͦΕ

    View full-size slide

  12. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    ௕͍ฦ৴͕౸ண

    View full-size slide

  13. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  14. ೥݄
    7FSTJPO ϦϦʔε
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  15. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  16. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    ͜ͷࠒɺҰ౓΢ΟδΣοτΛ
    ྖҬʹ഑ஔ͢Δͱ
    ར༻Մೳͳ΢ΟδΣοτϦετ͔Β
    ফ͑Δ΋ͷ͕͋ͬͨ Β͍͠

    ͜Ε͕γϯάϧ΢ΟδΣοτ

    View full-size slide

  17. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    ιʔείʔυ୳ࡧ

    View full-size slide


  18. ͦΕͬΆ͍ͷൃݟ
    XQJODMVEFTDMBTTXQXJEHFUQIQ
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    QVCMJDGVODUJPOHFU@TFUUJOHT
    \
    TFUUJOHTHFU@PQUJPO UIJTPQUJPO@OBNF


    JG FNQUZ TFUUJOHT
    JTTFU TFUUJOHT<@NVMUJXJEHFU>

    \
    0MEGPSNBU DPOWFSUJGTJOHMFXJEHFU
    TFUUJOHTXQ@DPOWFSU@XJEHFU@TFUUJOHT
    UIJTJE@CBTF UIJTPQUJPO@OBNF
    TFUUJOHT

    ^
    VOTFU TFUUJOHT<@NVMUJXJEHFU> TFUUJOHT<@@J@@>

    SFUVSOTFUUJOHT
    ^

    View full-size slide


  19. TFUUJOHT<@NVMUJXJEHFU>
    Λ͝ʹΐ͝ʹΐ΍Δ͕
    ͪͬͱ΋ಈ͔ͳ͍
    ݪҼෆ໌
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  20. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  21. ͜ͷ 6*ͷ։ൃυΩϡϝϯτ͸
    Ͳ͜
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  22. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    Զ

    View full-size slide

  23. +BWB4DSJQU ΛΤϯΩϡʔ
    ◦ +BWB4DSJQUͷొ࿥
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    DMBTT4JOHMF@*OTUBODF@8JEHFU FYUFOET81@8JEHFU \
    GVODUJPO@@DPOTUSVDU
    \

    JG JT@BENJO

    \
    XQ@FORVFVF@TDSJQU
    TJOHMFJOTUBODFXJEHFUKT`
    QMVHJOT@VSM TJOHMFJOTUBODFXJEHFUKT @@'*-&@@

    BSSBZ

    GBMTF
    USVF


    ^

    View full-size slide

  24. "KBY ׬ྃޙ %0.Λ୳ͬͯ
    TIPX
    IJEF

    ◦ +BWB4DSJQUͷొ࿥
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    K2VFSZ EPDVNFOU
    BKBY$PNQMFUF GVODUJPO FWFOU
    \

    JG SFRVFTUBDUJPO SFRVFTUBDUJPO TBWFXJEHFU

    \
    WBS BDUJWF@XJEHFUT K2VFSZ XJEHFUMJTU
    DIJMESFO

    GPS WBS J J BDUJWF@XJEHFUTMFOHUIJ
    \

    JG BDUJWF@XJEHFUJE @TJOHMF@JOTUBODF@XJEHFU@@J@@
    \
    BDUJWF@XJEHFU@JE BDUJWF@XJEHFUJE
    CSFBL
    ^
    ^
    JG SFRVFTUEFMFUF@XJEHFU SFRVFTUEFMFUF@XJEHFU


    \
    K2VFSZ BDUJWF@XJEHFU@JE
    TIPX

    ^FMTF\
    K2VFSZ BDUJWF@XJEHFU@JE
    IJEF
    ^

    View full-size slide

  25. ॳظϩʔυ࣌ͷૢ࡞΋௥Ճ
    ◦ +BWB4DSJQUͷొ࿥
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    K2VFSZ EPDVNFOU
    SFBEZ GVODUJPO
    \
    XJEHFUTK2VFSZ XJEHFUTSJHIU
    GJOE XJEHFU

    GPS WBS J J XJEHFUTMFOHUIJ
    \
    JG XJEHFUTJE
    JOEFY0G @TJOHMF@JOTUBODF@XJEHFU

    \
    WBS BDUJWF@XJEHFUT K2VFSZ XJEHFUMJTU
    DIJMESFO

    GPS WBS KKBDUJWF@XJEHFUTMFOHUIK
    \
    XJEHFU@JE K
    JG BDUJWF@XJEHFUT
    JEXJEHFUXJEHFU@JE
    @TJOHMF@JOTUBODF@XJEHFU@@J@@
    \
    WBS BDUJWF@XJEHFU@JE BDUJWF@XJEHFUT
    JE
    K2VFSZ BDUJWF@XJEHFU@JE
    IJEF

    CSFBL
    ^
    ^
    CSFBL

    View full-size slide


  26. Ͱ͖ͨ
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  27. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  28. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  29. ϝϞޮ཰ྑ͍࡞ۀͷͨΊ
    ϒϥ΢βͷΩϟογϡΛΦϑʹ͢Δ
    $ISPNF ݕূ /FUXPSL%JTBCMFDBDIF
    ϓϥάΠϯͷ༗ޮԽɺແޮԽͷૢ࡞ʹ
    XQDMJΛ࢖͏
    WBHSBOUTTI

    XQQMVHJOUPHHMFϓϥάΠϯ໊
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  30. ܽ఺
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  31. ΧελϚΠβʔͰಈ͔ͳ͍
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  32. ΧελϚΠβʔରࡦ ະ׬

    ൑ఆ͸ JT@DVTUPNJ[F@QSFWJFX

    %0.͸ಉ͡΋ͷ͕࢖͑ͦ͏
    ΧελϚΠβʔͷίϝϯτΑΓ
    %0.ੜ੒ͷλΠϛϯά͕ҟͳΔͨΊ୯७ͳϩδο
    ΫͰ͸ෆՄ
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54
    'PS8JEHFU$VTUPNJ[FS NBOZXJEHFUTUSZUPMPPL
    GPSJOTUBODFTVOEFSEJWXJEHFUTSJHIU TPXFIBWFUP
    BEEUIBU*%UPBDPOUBJOFSEJWJOUIF$VTUPNJ[FSGPS
    DPNQBU

    View full-size slide


  33. ΢ΟδΣοτϦετ͕
    ྻදࣔͷͱ͖
    ٧·ΒۭͣനʹͳΔ
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  34. %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  35. ྻදࣔͷۭനରࡦ ະ׬

    ෆ໌ɻԿ͔͍͍ΞΠσΞ͕͋Ε͹ੋඇ
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  36. ൓ল
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  37. ͦ΋ͦ΋γϯάϧ΢ΟδΣοτͬͯ
    Ϣʔβʔχʔζ͸͋ΔͷͩΖ͏͔
    ීஈͱҟͳΔ 6* ͸
    ϢʔβʔΛࠞཚͤ͞Δ͚ͩͰ͸
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  38. ڭ܇
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  39. ҆қʹճ౴͠ͳ͍
    ࢓༷Λͦͷ··ड͚ೖΕͳ͍
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide


  40. ͋Γ͕ͱ͏͍͟͝·ͨ͠
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide

  41. ෇࿥
    ιʔείʔυ
    IUUQTHJUIVCDPNBUBDIJCBOBTJOHMFJOTUBODF
    XJEHFU
    %FD7FS 8PSE#FODI5PLZP%FDFNCFS!)&"35#&"54

    View full-size slide