[WordPress] 外掛分享: WP Development Utilities

首頁外掛目錄 › WP Development Utilities
全新外掛
安裝啟用
尚無評分
6335 天前
最後更新
問題解決
WordPress 2.0.2+ v1.6 上架:2008-10-26

內容簡介

這個腳本在 WordPress 開發時非常有用,因為它會擴充一組函數。

使用方法

class WP_Dev_Utilities:

_debug() – 只有用戶登入為管理員時才會顯示變數的函數
_retrieve_user_data() – 只有在用戶登入時才會檢索用戶數據信息
count_num_pages_post($id) – 返回文章的頁數
get_current_execution_time($precision = 3) – 獲取當前執行時間
get_logged_username() – 返回當前登入的用戶名
get_post_content_from_id($id) – 根據文章 ID 返回文章內容
get_post_content_from_permalink($permalink) – 根據文章永久鏈接返回文章內容
get_post_id_from_permalink($permalink) – 根據文章永久鏈接返回文章 ID
is_administrator() – 檢查當前登入用戶是否為管理員
get_web_browser($shortname = false, $uppercase = false) – 返回當前用戶的瀏覽器名稱
get_web_server($uppercase = false) – 返回使用的 web 服務器
get_wp_version() – 獲取當前的 WordPress 版本號
get_tag_slug($title) – 根據標籤標題獲取標籤別名
get_current_tag_slug($title) – 根據當前標籤的標題獲取標籤別名

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.6) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP Development Utilities」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This script is useful during the development of WordPress, because will extend with a set of functions.
Usage
class WP_Dev_Utilities:

_debug() – A function to print variable only if the user logged as administrator
_retrieve_user_data() – Retrive user data informations only if user is logged in
count_num_pages_post($id) – Returns the number of pages of a post
get_current_execution_time($precision = 3) – Get the current execution time
get_logged_username() – Returns the name of the user logged on
get_post_content_from_id($id) – Return the content of the post from his id
get_post_content_from_permalink($permalink) – Return the contents of the post permalink
get_post_id_from_permalink($permalink) – Return the id of the post permalink
is_administrator() – Check if logged user has the administrator privileges
get_web_browser($shortname = false, $uppercase = false) – Returns the user’s browser name
get_web_server($uppercase = false) – Returns the web server is use
get_wp_version() – Get the current wordpress version
get_tag_slug($title) – Get the tag slug from tag title
get_current_tag_slug($title) – Get the tag slug from the current tag title

延伸相關外掛

文章
Filter
Apply Filters
Mastodon