Sub Promotion

?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
Extra Form
제목 franklynstrempel@mailsent.net
예약자 14|@|5495|@|17060
Headless WordPress is an idea that is being used more and more actively among developers. I will try to disclose several topics related to this approach. In particular, I will show how to implement application login using JWT. We will create a simple application that will allow users to log in using their username. After logging in, we will display the user his data. To implement login to the application using JWT, we need to install and activate the JWT Authentication for WP REST API plugin . Application Preparation Let's create our own React app using the Create React App . We open the terminal (command line) and go to the directory in which the application will be developed. Then use the command: 01 npx create-react-app my-app Here you can replace my-app with your name. This will be your directory in which all the code will be stored. I decided to name the headless directory. Then browse to this folder. You can start the application now using the npm start command. However, let's first install Gutenberg Components, the npm package @ wordpress / components. This will allow us to use various components in our application. Install Gutenberg Components using the command 01 npm install @wordpress/components Since the Gutenberg Components package does not include markup classes, we can create our own CSS style guide or use the existing style frameworks so as not to waste our time on this. If you want to create an application that will be used in production - be sure to think about creating your own CSS markup. We will use Bootstrap 4 for styles. You can install it using the command: 01 npm install bootstrap We also need SASS processing (SCSS), so we need our application to be able to process such files. To do this, use the following command: 01 npm install node-sass --save Since we will use the Bootstrap and Gutenberg styles, we can remove App.css and create App.scss. Put the following inside this new file: 01 @import '~bootstrap/scss/bootstrap.scss'; 02 03 @import '~@wordpress/components/build-style/style.css'; Now it will be compiled into a CSS file that will include both Boostrap and Gutenberg styles. We will need to fulfill POST and GET requests to our WordPress site, so we need a way to implement this. You can use fetch from the browser API, or a library. We will use the axios library. It is installed using the command 01 npm install axios Add login logic to our Headless WordPress Open App.js to start adding login logic. We will check whether the user is logged in or not. If not, we will show the login form. Otherwise, the console will be displayed. Let's adjust all the imports in the application: 01 import React, useState, useEffect from 'react'; 02 import './App.scss'; 03 import '@wordpress/components/build-style/style.css'; 04 import Login from './components/Login'; 05 import Dashboard from './components/Dashboard'; Do not worry about errors that appear. The Dashboard and Login components do not exist yet, therefore you may receive compilation errors. Now we can replace the App function with the following: 01 function App() 02 const [login, setLogin] = useState( '' ); 03 const siteURL = 'yoursite_here'; 04 05 useEffect(() => 06 const localLogin = localStorage.getItem('login'); 07 // If we have logged in, v2.0.1 - Download Sortable Video Embed – WordPress Plugin Nulled 2.0.0 set it.

08 if ( localLogin ) 09 v.7.0.1 Woocommerce Step Filter demo setLogin( localLogin ); 10 11 , [login]); 12 13 return ( 14 15
16 17

Headless WordPress

18 19 20 login && 21 22 23 ! login && 24 25 26
27 28 ); 29 What we did here: v.1.4.6 YITH Live Chat Full Download We used React useState hooks to globally process login Avenus Music One Page Modern Elementor Elite Video Player Nulled WordPress Theme Nulled information. We used useEffect hooks to handle changes during the login process.

  1. No Image 09Jun
    by SusieKzr45439996
    2020/06/09 by SusieKzr45439996

    susielockyer@googlemail.com

  2. No Image 09Jun
    by Brigida9559541724223
    2020/06/09 by Brigida9559541724223

    brigida.crosby@gmail.com

  3. No Image 09Jun
    by CristineHeard9905
    2020/06/09 by CristineHeard9905

    cristineheard@care2.com

  4. 09Jun
    by ChanceFolingsby87
    2020/06/09 by ChanceFolingsby87

    chancefolingsby@googlemail.com

  5. No Image 09Jun
    by BuddyEaton3254884711
    2020/06/09 by BuddyEaton3254884711

    buddyeaton@web.de

  6. 09Jun
    by Wolfgang99V67967
    2020/06/09 by Wolfgang99V67967

    wolfgang.mccart@arcor.de

  7. 09Jun
    by MartyWaxman23253
    2020/06/09 by MartyWaxman23253

    martywaxman@yepmail.net

  8. No Image 09Jun
    by BeatrisEyv01496888371
    2020/06/09 by BeatrisEyv01496888371

    beatrisdunford@freenet.de

  9. No Image 09Jun
    by FranklynC69579821
    2020/06/09 by FranklynC69579821

    franklynstrempel@mailsent.net

  10. No Image 09Jun
    by Kathleen63X6757313580
    2020/06/09 by Kathleen63X6757313580

    kathleen.rymer@gmail.com

  11. No Image 09Jun
    by KaleyDale3421554597
    2020/06/09 by KaleyDale3421554597

    kaleydale@inbox.com

  12. No Image 09Jun
    by BlytheMettler3492
    2020/06/09 by BlytheMettler3492

    blythe.mettler@t-online.de

  13. No Image 09Jun
    by CPOTesha04902820
    2020/06/09 by CPOTesha04902820

    teshasison@arcor.de

  14. No Image 09Jun
    by CherylDahlenburg
    2020/06/09 by CherylDahlenburg

    cheryl.dahlenburg@inbox.com

  15. No Image 09Jun
    by RosalindaSani89064
    2020/06/09 by RosalindaSani89064

    rosalindasani@t-online.de

  16. 09Jun
    by KaleyDale3421554597
    2020/06/09 by KaleyDale3421554597

    kaleydale@inbox.com

  17. No Image 09Jun
    by EffieCrump527398344
    2020/06/09 by EffieCrump527398344

    effiecrump@hotmail.com

  18. No Image 09Jun
    by DallasGatehouse
    2020/06/09 by DallasGatehouse

    dallasgatehouse@bigstring.com

  19. 09Jun
    by LatishaBrubaker13752
    2020/06/09 by LatishaBrubaker13752

    latishabrubaker@gmail.com

  20. 09Jun
    by Amelia05N1837665432
    2020/06/09 by Amelia05N1837665432

    ameliaburdett@inbox.com

  21. No Image 09Jun
    by MaxMullan191980618791
    2020/06/09 by MaxMullan191980618791

    maxmullan@freenet.de

  22. No Image 09Jun
    by RosaForney40333078
    2020/06/09 by RosaForney40333078

    rosaforney@live.de

  23. 09Jun
    by KelleeDeasey17985143
    2020/06/09 by KelleeDeasey17985143

    kelleedeasey@gmail.com

  24. No Image 09Jun
    by NatishaCrenshaw31
    2020/06/09 by NatishaCrenshaw31

    natishacrenshaw@internet-mail.org

  25. No Image 09Jun
    by BelleKater267920
    2020/06/09 by BelleKater267920

    belle.kater@live.de

  26. No Image 09Jun
    by JeannaConnah171812
    2020/06/09 by JeannaConnah171812

    jeannaconnah@gmail.com

  27. No Image 09Jun
    by IsmaelBanvard6536238
    2020/06/09 by IsmaelBanvard6536238

    ismaelbanvard@peacemail.com

  28. No Image 09Jun
    by OpalRodarte6730246
    2020/06/09 by OpalRodarte6730246

    opalrodarte@gmail.com

  29. No Image 09Jun
    by DanielLorenzini
    2020/06/09 by DanielLorenzini

    daniel.lorenzini@bigstring.com

  30. No Image 09Jun
    by MaisieLoving025141
    2020/06/09 by MaisieLoving025141

    maisieloving@arcor.de

  31. No Image 09Jun
    by KandiVrooman72588937
    2020/06/09 by KandiVrooman72588937

    kandivrooman@ssl-mail.com

  32. 09Jun
    by RashadWhittemore5
    2020/06/09 by RashadWhittemore5

    rashadwhittemore@bigstring.com

  33. 09Jun
    by BeaWolcott757808918
    2020/06/09 by BeaWolcott757808918

    beawolcott@yahoo.com

  34. No Image 09Jun
    by JacksonPawsey670
    2020/06/09 by JacksonPawsey670

    jackson.pawsey@gmail.com

  35. No Image 09Jun
    by DonnaJordon5250
    2020/06/09 by DonnaJordon5250

    donnajordon@googlemail.com

  36. No Image 09Jun
    by ChristineHuhn49035
    2020/06/09 by ChristineHuhn49035

    christine_huhn@gmail.com

  37. No Image 09Jun
    by GenevieveW25765188340
    2020/06/09 by GenevieveW25765188340

    genevieveepstein@live.de

  38. No Image 09Jun
    by PaulineLangley27
    2020/06/09 by PaulineLangley27

    paulinelangley@gmail.com

  39. No Image 09Jun
    by CharmainGowins35
    2020/06/09 by CharmainGowins35

    charmaingowins@web.de

  40. No Image 09Jun
    by EmmaIrby03336478376
    2020/06/09 by EmmaIrby03336478376

    emmairby@wildmail.com

  41. No Image 09Jun
    by KaleyDale3421554597
    2020/06/09 by KaleyDale3421554597

    kaleydale@inbox.com

  42. No Image 09Jun
    by KariDuvall68012
    2020/06/09 by KariDuvall68012

    kariduvall@web.de

  43. 09Jun
    by CollinBerrios440086
    2020/06/09 by CollinBerrios440086

    collinberrios@bigstring.com

  44. No Image 09Jun
    by RobertoDun801259790
    2020/06/09 by RobertoDun801259790

    robertodun@gmail.com

  45. No Image 09Jun
    by MilfordHolliday
    2020/06/09 by MilfordHolliday

    milfordholliday@freenet.de

  46. No Image 09Jun
    by LillieLynch9312
    2020/06/09 by LillieLynch9312

    lillie_lynch@gmail.com

  47. No Image 09Jun
    by LoriHolte026698762
    2020/06/09 by LoriHolte026698762

    lori_holte@gmail.com

  48. No Image 09Jun
    by Jefferey54X3565650179
    2020/06/09 by Jefferey54X3565650179

    jefferey.shang@gmail.com

  49. 09Jun
    by AdrienneLaycock6730
    2020/06/09 by AdrienneLaycock6730

    adriennelaycock@hotmail.de

  50. 09Jun
    by ShelaFison7898197506
    2020/06/09 by ShelaFison7898197506

    shelafison@gmail.com

Board Pagination Prev 1 ... 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 ... 4736 Next
/ 4736

bodum2ro 43,sejong, Korea / Copyrightⓒ. All Rights Reserved By fone

© k2s0o1d4e0s2i1g5n. All Rights Reserved