Back to Question Center
0

I-Semalt: I-WordPress Plugin Creation Practice

1 answers:

I-plugin ye-WordPress yi-script ye-PHP eguqula isayithi lakho nganoma yisiphi isikhathi. Ishintsha ukubuka konke kwebhulogi, futhi lezi zinguquko zingaba yizinto ezivela kwi-tweaks elula ezihlokweni kuya kuma-makeovers amakhulu. Kuyiqiniso ukuthi izingqikithi zingashintsha ukubukeka kwendawo yakho yonke, kepha ama-plugin angashintsha ukuthi isebenza kanjani nsuku zonke. Nge-plugin ye-WordPress, ungakwazi kalula ukudala okuthunyelwe okwezifiso, engeza amatafula amasha ku-database, ukulandelela ama-athikili adumile bese uxhumanisa okuqukethwe kwakho kwamanye amawebhusayithi noma amabhulogi.

Uma ufuna ukwakha i-plugin ye-WordPress kumawebhusayithi akho, kufanele ukhumbule izinto ezilandelayo ezichazwe ngu-Andrew Dyhan, isazi esiholela phambili Semalt .

1. Ukuhlelwa kwe-Plugin kanye netihloko

Uma uke wasebenzisa iZwiPress, kufanele wazi ukuthi isihloko sishintsha isakhiwo jikelele sesayithi lakho futhi i-plugin ikusiza ukuthi uhlele ifayela lemisebenzi.php, ikunike amandla amaningi futhi ikuvumele ukuba uthuthukise ukusebenza kwamakhasi wewebhu. Yiya efayeleni lemisebenzi.php bese ufaka ikhodi ethile lapha. Imisebenzi ye-plugin iyaphikelela kungakhathaliseki uhlobo lwezingqikithi ozisebenzisayo. Izinguquko ozenzayo ku-plugin zizoqala kusuka kwifayili ye-functions.php, kodwa le fayela ayihlangene nendaba yakho.

2. Dala ifolda ye-plugin

Kubalulekile ukwakha ifolda ye-plugin kanye nefayela elilodwa elinokuqukethwe okufanelekile. Ngenxa yalokhu, kufanele uhambe endaweni ye-wp-content / plugins bese udala ifolda entsha ebizwa ngokuthi i-plugin esabekayo. Lapha, kufanele udale ifayela ngegama le-awesomeplugin.php. Uma udalwe, vula lelo fayela bese unamathisela le khodi ngokuthi:

/ *

I-Plugin

: Umdabu onamandla

I-URL ye-Plugin: https://www.abc.com

Inguqulo: 1.2

Umbhali: Iwebhusayithi Yami

Umbhali URI: https://abc.com

Ilayisensi: GPL2

* /

3. Ukwakhiwa kwe-plugin yakho

Uma kuziwa ekudaleni ama-plugin eziyinkimbinkimbi nezinkimbinkimbi, kufanele uzihlele ngokufanele futhi uzihlukanise ngezigaba ezahlukene ngokusekelwe emisebenzini nasekusebenzeni kwazo. Uma i-plugin ingokwesigaba esithile, ungayifaka ohlwini olukhona lwe-plugin bese uhlukanisa amafayela akho ukugwema ukudideka. Qinisekisa ukuthi udale ibhalansi phakathi kwesakhiwo, isakhiwo, kanye nenqubo ye-plugin yakho. Ngalokhu, ungahlukanisa amafayela akhe ngezigaba ezahlukene futhi ufune usizo lwabachwepheshe e-Akismet naseWP-PageNavi.

4. Ukubiza igama le-plugin

Manje yisikhathi sokunikeza igama elifanele ku-plugin yakho futhi uhlole ukusebenza kwayo kahle ngaphambi kokushicilela kuyi-intanethi. Uma i-plugin isakhiwe ngezingcaphuno ezesabekayo, ungayibamba njenge-plugin ye-excerpt noma into ongayikhumbula kalula. Qinisekisa ukuthi awusebenzisi amagama avamile bese uzama kuziqephu ezihlukile. Isibonelo, ungasebenzisa i- "abc_excerpt" ye-plugin ehlobene nokucaphuna futhi enezici ezifanayo.

5. Ukuphepha kwe-plugin yakho

Uma uhlele ukusabalalisa i-plugin, ukuphepha kwayo kufanele kube okuthandayo ngoba abanye abakwa-webmasters bangase babambe ikhodi yakho ye-plugin futhi basakaze ku-intanethi, bakwenze izinkinga. Thatha izinyathelo eziningi zokuphepha ngangokunokwenzeka futhi uqinisekise ukuthi i-plugin yakho ayifaki idatha embi kwi-intanethi.

November 29, 2017
I-Semalt: I-WordPress Plugin Creation Practice
Reply