WordPress defines many useful PHP functions. The well-known & nbsp; template tags in these functions are specially prepared for the WordPress topic. Some functions are also related to actions and filters (see & nbsp; plug-in API). These functions are also mainly used in plug-in development. Other functions are applied to the WordPress core.
WordPress defines many useful PHP functions. Which of these functions are well known? Template tags are specially prepared for WordPress themes. Some functions and actions and filters (see? Plug-In APIs), and these functions are mainly used in plug-in development. Other functions are applied to the core features of WordPress.
Many core functions are useful for plug-ins and theme developers. Therefore, this article lists most core functions, including Template Tags ). At the end of the article, I listed some WordPress function resources. The full version of this article? WordPress phpdoc site? All WordPress functions since 2.6.1 are described.
Note:: This reference applies to versions 2.1 and later. No function is recommended. Function Reference 2.0.x? Is an incomplete 2.0.x reference.
Function category
| Classification, label, and classification |
Category
- Is_category
- In_category
- Cat_is_ancestor_of
- Get_category_parents
- Get_all_category_ids
- Get_categories
- Get_the_category
- Get_category
- Get_category_by_path
- Get_category_by_slug
- Get_cat_ID
- Get_cat_name
- Get_category_link
Create Category
- Wp_create_category
- Wp_insert_category
Tag
- Is_tag
- Get_tag
- Get_tags
- Get_the_tags
- Get_the_tag_list
- Get_tag_link
Classification (Taxonomy)
- Is_taxonomy
- Is_taxonomy_hierarchical
- Register_taxonomy
- Is_term
- Get_term
- Get_term_by
- Get_term_children
- Get_terms
- Wp_get_object_terms
- Wp_insert_term
- Term_exists
|
| User and author |
User and author
- Get_profile
- Get_usernumposts
- Set_current_user
- Wp_set_current_user
- Wp_get_current_user
- Get_currentuserinfo
- Get_userdata
- Get_userdatabylogin
- Auth_redirect
- Username_exists
- Email_exists
- Validate_username
- User_pass_ OK
User meta
- Get_usermeta
- Delete_usermeta
- Update_usermeta
Add and delete users
- Wp_insert_user
- Wp_update_user
- Wp_delete_user
- Wp_create_user
Logon and logout
- Wp_signon
- Is_user_logged_in
|
| Feed) |
- Fetch_rss
- Wp_rss
- Get_rss
- Do_feed
- Do_feed_rdf
- Do_feed_rss
- Do_feed_rss2
- Do_feed_atom
- Get_bloginfo_rss
- Bloginfo_rss
- Get_the_title_rss
- The_title_rss
- The_content_rss
- The_excerpt_rss
- Permalink_single_rss
- Comment_link
- Get_comment_link
- Get_comment_author_rss
- Comment_author_rss
- Comment_text_rss
- Post_comments_feed_link
- Get_post_comments_feed_link
- Get_author_feed_link
- Get_category_feed_link
- Get_the_category_rss
- The_category_rss
- Rss_enclosure
- Get_search_feed_link
- Get_search_comments_feed_link
|
| Comments, notifications, and references (Ping, Trackback) |
- Paginate_comments_links
- Previous_comments_link
- Next_comments_link
- Check_comment
- Get_approved_comments
- Get_comment
- Get_comments
- Get_lastcommentmodified
- Sanitize_comment_cookies
- Wp_allow_comment
- Wp_delete_comment
- Wp_get_comment_status
- Wp_get_current_commenter
- Wp_insert_comment
- Wp_filter_comment
- Wp_throttle_comment_flood
- Wp_new_comment
- Wp_set_comment_status
- Wp_update_comment
- Wp_update_comment_count
- Discover_pingback_server_uri
- Do_all_pings
- Do_trackbacks
- Generic_ping
- Pingback
- Privacy_ping_filter
- Trackback
- Weblog_ping
- Do_enclose
- Add_ping
- Get_enclosed
- Get_pung
- Get_to_ping
- Trackback_url_list
|
| Action, Filter, and plug-in |
Filters
- Add_filter
- Remove_filter
- Apply_filters
- Merge_filters
Actions
- Add_action
- Remove_action
- Do_action
- Did_action
- Do_action_ref_array
Plugins
- Plugin_basename
- Register_activation_hook
- Register_deactivation_hook
- Register_setting
- Unregister_setting
- Settings_fields
Inclucodes
- Add_postal code
- Remove_shortcode
- Remove_all_inclucodes
- Do_shortcode
- Get_javascode_regex
- Do_shortcode_tag
- Shortcode_parse_atts
- Shortcode_atts
- Strip_shortcodes
|
| Topic-related |
Include function
- Get_header
- Get_sidebar
- Get_search_form
- Comments_template
- Get_footer
Other functions
- Get_stylesheet
- Get_stylesheet_directory
- Get_stylesheet_directory_uri
- Get_stylesheet_uri
- Get_locale_stylesheet_uri
- Get_template
- Get_template_directory
- Get_template_directory_uri
- Get_theme_data
- Get_themes
- Get_theme
- Get_theme_support
- Get_current_theme
- Get_theme_root
- Get_theme_root_uri
- Get_query_template
- Get_404_template
- Get_archive_template
- Get_author_template
- Get_category_template
- Get_date_template
- Get_home_template
- Get_page_template
- Get_paged_template
- Get_search_template
- Get_single_template
- Get_attachment_template
- Get_comments_popup_template
- Load_template
- Locale_stylesheet
- Preview_theme
- Preview_theme_ob_filter
- Preview_theme_ob_filter_callback
- Validate_current_theme
- Switch_theme
- Get_theme_mod
- Set_theme_mod
- Get_header_textcolor
- Get_header_image
- Header_image
- Add_custom_image_header
|
| Formatting) |
- Wptexturize
- Clean_pre
- Wpautop
- Seems_utf8
- Wp_specialchars
- Utf8_uri_encode
- Remove_accents
- Sanitize_file_name
- Sanitize_user
- Sanitize_title
- Sanitize_title_with_dashes
- Convert_chars
- Funky_javascript_fix
- BalanceTags
- Force_balance_tags
- Format_to_edit
- Format_to_post
- Zeroise
- Backslashit
- Trailingslashit
- Untrailingslashit
- Addslashes_gpc
- Stripslashes_deep
- Antispambot
- Make_clickable
- Wp_rel_nofollow
- Convert_smilies
- Is_email
- Wp_iso_descrambler
- Popuplinks
- Sanitize_email
- Ent2ncr
- Wp_richedit_pre
- Clean_url
- Htmlentities2
- Js_escape
- Attribute_escape
- Wp_make_link_relative
- Add_magic_quotes
- Wp_kses
- Wp_kses_hook
- Wp_kses_version
- Wp_kses_split
- Wp_kses_split2
- Wp_kses_attr
- Wp_kses_hair
- Wp_kses_check_attr_val
- Wp_kses_bad_protocol
- Wp_kses_no_null
- Wp_kses_stripslashes
- Wp_kses_array_lc
- Wp_kses_js_entities
- Wp_kses_html_error
- Wp_kses_bad_protocol_once
- Wp_kses_bad_protocol_once2
- Wp_kses_normalize_entities
- Wp_kses_normalize_entities2
- Wp_kses_decode_entities
- Wp_filter_kses
- Wp_filter_post_kses
- Wp_filter_nohtml_kses
|
| Miscellaneous Functions |
Time and date
- Get_the_time
- Get_day_link
- Get_month_link
- Get_year_link
- Get_calendar
- Get_gmt_from_date
- Get_date_from_gmt
- Iso8601_timezone_to_offset
- Iso8601_to_datetime
- Human_time_diff
- Mysql2date
- Current_time
- Date_i18n
- Get_weekstartend
- Get_lastpostdate
- Get_lastpostmodified
- Is_new_day
Serialization
- Maybe_serialize
- Maybe_unserialize
- Is_serialized
- Is_serialized_string
Option
- Get_option
- Form_option
- Get_alloptions
- Update_option
- Add_option
- Delete_option
- Get_user_option
- Update_user_option
|