久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔
站長百科 | 數(shù)字化技能提升教程 數(shù)字化時代生存寶典
首頁
數(shù)字化百科
電子書
建站程序
開發(fā)
服務(wù)器
辦公軟件
開發(fā)教程
服務(wù)器教程
軟件使用教程
運營教程
熱門電子書
WordPress教程
寶塔面板教程
CSS教程
Shopify教程
導(dǎo)航
程序頻道
推廣頻道
網(wǎng)賺頻道
人物頻道
網(wǎng)站程序
網(wǎng)頁制作
云計算
服務(wù)器
CMS
論壇
網(wǎng)店
虛擬主機
cPanel
網(wǎng)址導(dǎo)航
WIKI使用導(dǎo)航
WIKI首頁
最新資訊
網(wǎng)站程序
站長人物
頁面分類
使用幫助
編輯測試
創(chuàng)建條目
網(wǎng)站地圖
站長百科導(dǎo)航
站長百科
主機偵探
IDCtalk云說
跨境電商導(dǎo)航
WordPress啦
站長專題
網(wǎng)站推廣
網(wǎng)站程序
網(wǎng)站賺錢
虛擬主機
cPanel
網(wǎng)址導(dǎo)航專題
云計算
微博營銷
虛擬主機管理系統(tǒng)
開放平臺
WIKI程序與應(yīng)用
美國十大主機
編輯“
WordPress:Creating Options Pages
”
人物百科
|
營銷百科
|
網(wǎng)賺百科
|
站長工具
|
網(wǎng)站程序
|
域名主機
|
互聯(lián)網(wǎng)公司
|
分類索引
Xxf3325
(
討論
|
貢獻
)
2008年8月27日 (三) 10:27的版本
(新頁面: == Introduction == Creating custom options panels in WordPress is relatively easy. Firstly, to create the menu item and the new page, see
WordPress:Adding Administration Menus
. So ...)
(差異) ←上一版本 |
最后版本
(
差異
) |
下一版本→
(
差異
)
跳轉(zhuǎn)至:
導(dǎo)航
、?
搜索
警告:您正在編輯的是本頁面的舊版本。
如果您發(fā)布該更改,該版本后的所有更改都會丟失。
警告:
您沒有登錄。如果您做出任意編輯,您的IP地址將會公開可見。如果您
登錄
或
創(chuàng)建
一個賬戶,您的編輯將歸屬于您的用戶名,且將享受其他好處。
反垃圾檢查。
不要
加入這個!
== Introduction == Creating custom options panels in WordPress is relatively easy. Firstly, to create the menu item and the new page, see [[WordPress:Adding Administration Menus]]. So long as you stick to this structure, WordPress will handle all of the option creation, update, saving, and redirection for you. It will check permissions, and do all that other magic behind the scenes. == Form Tag == Once you have your page, you need to create an HTML form. Use this code: <form method="post" action="options.php"> == nonce Magic == Then after the opening form tag, insert this PHP code: <?php wp_nonce_field('update-options'); ?> This will insert two hidden fields which automatically help to check that the user can update options and also redirect the user back to the correct admin page (because the form action is a different page). == Update Options Button == At this point you may choose to insert the standard Update Options button, the HTML for which is: <p class="submit"> <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" /> </p> Note the use of the _e() function to handle translation of the text, see [[WordPress:Localizing WordPress]] for more info. == Field Names == Use fields with the same names that you want your newly created options (stored in the options table) to be called, for example: <input type="text" name="new_option_name" value="<?php echo get_option('new_option_name'); ?>" /> Note that by using the get_option() function as the value for the field, this will automatically be updated when the options are saved. == action Field == Next, create a hidden field called action containing the value update. <input type="hidden" name="action" value="update" /> == page_options Field == Finally, create a hidden field called page_options containing a comma separated list of all the options in the page that should be written on save. <input type="hidden" name="page_options" value="new_option_name,some_other_option,option_etc" /> == Closing Tags == Then obviously close the form tag after your other options, and if you like, include another "Update Options" button, this is the WordPress default. <p class="submit"> <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" /> </p> </form>
摘要:
請注意,您對站長百科的所有貢獻都可能被其他貢獻者編輯,修改或刪除。如果您不希望您的文字被任意修改和再散布,請不要提交。
您同時也要向我們保證您所提交的內(nèi)容是您自己所作,或得自一個不受版權(quán)保護或相似自由的來源(參閱
Wordpress-mediawiki:版權(quán)
的細(xì)節(jié))。
未經(jīng)許可,請勿提交受版權(quán)保護的作品!
取消
編輯幫助
(在新窗口中打開)
取自“
http://kktzf.com.cn/wiki/WordPress:Creating_Options_Pages
”