Yongeza useto lweNtlalo kuMxholo wakho we-WordPress

Iimpawu zegama lokuhlala

I-WordPress ibonelela ngeeprofayili zomsebenzisi ngezicwangciso zonxibelelwano lwentlalo; kunjalo, iisayithi ezininzi zentlalo ezifana Facebook kwaye Google bonelela ngamathuba esiza sakho sonke okanye ibhlog yakho ukuze ubekhona kwezi nethiwekhi. Besisebenza kwindawo yabathengi kule veki apho sifuna ukwenza kube lula kubo ukuseta kunye nokongeza amakhonkco ezentlalo kwindawo yabo, ke songeze ukhetho olongezelelekileyo Izicwangciso zeNdawo ePress jikelele phepha.

Inyathelo lethu lokuqala yayikukuhlaziya iMisebenzi yabo yoMxholo (ngesiqhelo Imisebenzi.php) kwaye ubhalise useto ngalunye esinqwenela ukulongeza:

 // ————— Yongeza useto kuseto gabalala —————– umsebenzi wentlalo_settings_api_init () {// Yongeza icandelo kuseto ngokubanzi ukuze sidibanise amasimi ethu // kulo add_settings_section ('social_setting_section', 'Social sites kwiwebhu ',' social_setting_section_callback_function ',' general '); // Yongeza umhlaba onamagama kunye nomsebenzi oza kuwusebenzisa kuseto lwethu olutsha lwe-//, yibeke kwicandelo lethu elitsha add_settings_field ('general_setting_facebook', 'Facebook Page', 'general_setting_facebook_callback_function', 'general', 'social_setting_section'); // Bhalisa useto lwethu ukuze i-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ”_ post_post yokuphatha yenzelwe thina kunye / irejista_ukusetwa ('ngokubanzi', 'ngokubanzi_ukusetwa_facebook'); add_settings_field ('general_setting_twitter', 'Akhawunti ye-Twitter', 'general_setting_twitter_callback_function', 'jikelele', 'social_setting_section'); irejista_ukusetwa ('ngokubanzi', 'ngokubanzi_ukusetwa_twitter'); add_settings_field ('general_setting_googleplus', 'Google Plus Page', 'general_setting_googleplus_callback_function', 'general', 'social_setting_section'); irejista_ukusetwa ('ngokubanzi', 'jikelele_setting_googleplus'); add_settings_field ('general_setting_youtube', 'Youtube Page', 'general_setting_youtube_callback_function', 'jikelele', 'social_setting_section'; irejista_ukusetwa ('ngokubanzi', 'ngokubanzi_ukusetwa_youtube'); add_settings_field ('general_setting_linkedin', 'LinkedIn Page', 'general_setting_linkedin_callback_function', 'jikelele', 'social_setting_section'); irejista_ukusetwa ('ngokubanzi', 'ngokubanzi_setting_linkedin'); } ukongeza_ukusebenza ('admin_init', 'social_settings_api_init');

Inyathelo lethu elilandelayo yayikukongeza eyona mihlaba ngaphakathi kwiphepha leZicwangciso ngokubanzi elinokuthi ligcine ulwazi ngaphakathi kubo:

 // —————- Useto lwecandelo lomsebenzi wokubuyela emva ———————-- function social_setting_section_callback_function () {echo ' Eli candelo kulapho ungagcina khona iisayithi zentlalo apho abafundi banokukufumana kwi-Intanethi. '; } umsebenzi general_setting_facebook_callback_function () {echo '  '; } umsebenzi general_setting_twitter_callback_function () {echo '  '; } umsebenzi general_setting_googleplus_callback_function () {echo '  '; } umsebenzi ngokubanzi_setting_youtube_callback_function () {echo '  '; } umsebenzi ngokubanzi_setting_linkedin_callback_function () {echo '  '; }

Ngoku, nangaliphi na ixesha umthengi enqwenela ukuhlaziya useto lwephepha loluntu, banokuhlaziya nje amasimi oseto ngaphakathi kwabo Useto lweWordPress ngokubanzi. Ngaphakathi komxholo, sikhumbula ngokulula ukuseta naphina apho kufuneka khona (kwimeko yalaba bathengi, ibhar yokuhambisa umkhondo kwimidiya yoluntu kwindawo yabo):


		

2 Comments

  1. 1
    • 2

      Ewe unako. Ndicinga nje ukuba ifuna iintsimbi ezongeziweyo kunye neempempe kuqala… njengokushicilela ngokuzenzekelayo ikhonkco lomshicileli we-G + kwi-header, i-graph meta yedatha evulekileyo ye-Facebook, njl. Ukwenza nje oku akubonakali kupholile ngokwaneleyo!

Ingaba ucinga ntoni?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda indlela idatha yakho yokubhaliweyo isetyenziswe ngayo.