2012年12月4日

wp plugin -17

摘要: var_dump( $shortcode_tags );remove_shortcode()remove_all_shortcodes()strip_shortcodes()< ?php$content = < < < SSome existing shortcodes: [amazonimage] [gallery]These don’t exist: [bleh] [123]S;echo strip_shortcodes( $content );/* Result:Some existing shortcodes:These don’t exist: [bleh] 阅读全文

posted @ 2012-12-04 19:55 kalintw 阅读(114) 评论(0) 推荐(0)

wp plugin -16

摘要: Register Custom Shortcodesshortcode 在wordpress中的作用与重要性不言而喻。主要从如下的几个方面考虑:不同格式的shortcode不同格式的shortcode: [book]单模式下的shortcode,使用属性闭合模式 [book 属性] content [/book]多种嵌套shortcode针对不同的custom type来应用 shortcode在编辑器中点击即生成shortcode,即非手动嵌套shortcodeadd_action( 'init', 'sanofi_register_shortcodes' ) 阅读全文

posted @ 2012-12-04 19:34 kalintw 阅读(195) 评论(0) 推荐(0)

wp plugin -15

摘要: Creating a Top - Level Menuadd_menu_page( page_title, menu_title, capability, menu_slug, function,icon_url, position );page_title — The title of the page as shown in the <title> tagsmenu_title — The name of your menu displayed on the dashboardcapability — Minimum capability required to view th 阅读全文

posted @ 2012-12-04 14:15 kalintw 阅读(103) 评论(0) 推荐(0)

wp plugin -14

摘要: CREATING CUSTOM HOOKSdo_action()do_action_ref_array()apply_filters()apply_filters_ref_array()Custom Action Hook Example< ?phpadd_action( ‘plugins_loaded’, ‘boj_myplugin_setup’ );function boj_myplugin_setup() {/* Allow actions to fire before anything else. */do_action( ‘boj_myplugin_setup_pre’ );/ 阅读全文

posted @ 2012-12-04 12:22 kalintw 阅读(129) 评论(0) 推荐(0)

wp plugin -13

摘要: Commonly Used Filter Hooksthe_contentthe_titletemplate_includefront_page_templatehome_templatesingle_templatepage_templateattachment_templatearchive_templatecategory_templatetag_templateauthor_templatedate_templatearchive_templatesearch_template404_templateindex_template 阅读全文

posted @ 2012-12-04 10:51 kalintw 阅读(80) 评论(0) 推荐(0)

导航