wordpress函数

__()

__( string $text, string $domain = 'default' )检索$text的翻译。 Retrieve the translation of $text. 目录锚点:#说明#参数#源码#笔记说明(Description)如果没有翻译,或者没有加载文本域,则返回原始文本。参数(Parameters)参数类型说明 $text (string) ...

日期:2020-08-12 14:39:31 浏览:1147

__ngettext()

__ngettext( $args )根据金额检索复数形式或单个形式。 Retrieve the plural or single form based on the amount. 目录锚点:#说明#参数#源码说明(Description)另请参见参数(Parameters)参数类型说明源码(Source)__ngettext() was located in wp-includes/l10n.php. As of Version 2.8 it was moved to wp-inc...

日期:2020-08-12 09:05:15 浏览:879

_e()

_e( string $text, string $domain = 'default' )显示翻译文本。 Display translated text. 目录锚点:#参数#源码#笔记参数(Parameters)参数类型说明 $text (string) 要翻译的文本。 $domain (stri...

日期:2020-08-12 14:39:38 浏览:1005

_ex()

_ex( string $text, string $context, string $domain = 'default' )显示带gettext上下文的翻译字符串。 Display translated string with gettext context. 目录锚点:#参数#源码参数(Parameters)参数类型说明 $text (string) ...

日期:2020-08-12 09:05:13 浏览:915

_n()

_n( string $single, string $plural, int $number, string $domain = 'default' )根据提供的数字翻译和检索单数或复数形式。 Translates and retrieves the singular or plural form based on the supplied number. 目录锚点:#说明#参数#源码#笔记说明(Description)当您希望...

日期:2020-08-12 14:39:35 浏览:873

_nx()

_nx( string $single, string $plural, int $number, string $context, string $domain = 'default' )使用gettext上下文根据提供的数字转换和检索单数或复数形式。 Translates and retrieves the singular or plural form based on the supplied number, ...

日期:2020-08-12 14:39:36 浏览:730

_x()

_x( string $text, string $context, string $domain = 'default' )使用gettext上下文检索翻译后的字符串。 Retrieve translated string with gettext context. 目录锚点:#说明#参数#源码#笔记说明(Description)很多时候,在两个以上的地方会出现与相似的可译文本的冲突,但是翻译的上下文不同。通过在pot文件中包含上下文,翻译...

日期:2020-08-12 14:39:33 浏览:802

absint()

absint( mixed $maybeint )将值转换为非负整数,也就是取绝对值。Convert a value to non-negative integer.目录锚点:#参数#返回#源码#笔记参数(Parameters)参数类型必填说明$maybeint(mixed)必需要转换为非负整数的数据。返回(Return)(int)非负整数。源码(Source)function absint( $maybeint ) { return abs( intval( $maybeint ) );}/** *...

日期:2020-06-23 10:35:32 浏览:1224

absint()

absint( mixed $maybeint )将值转换为非负整数。 Convert a value to non-negative integer. 目录锚点:#参数#源码#笔记参数(Parameters)参数类型说明 $maybeint (mixed) 希望转换为非负整数的数据。 源码(Source)/** * Convert a value to non-negati...

日期:2020-08-13 08:57:32 浏览:618

activate_plugin()

activate_plugin( string $plugin, string $redirect = '', bool $network_wide = false, bool $silent = false )尝试激活插件,并在成功时重定向。Attempts activation of plugin in a “sandbox” and redirects on success.目录锚点:#说明#参数#返回#源码#笔记说明(Description)已激活的插件将不会再次尝试激活。其工作方式是在尝试包含插件...

日期:2020-06-23 10:39:26 浏览:974

activate_plugins()

activate_plugins( string|string[] $plugins, string $redirect = '', bool $network_wide = false, bool $silent = false )激活多个插件。Activate multiple plugins.目录锚点:#说明#参数#返回#源码说明(Description)当WP_Error返回时,并不意...

日期:2020-09-08 17:28:27 浏览:1032

activate_sitewide_plugin()

activate_sitewide_plugin()不推荐用于激活仅网络插件的功能。Deprecated functionality for activating a network-only plugin.目录锚点:#说明#返回#源码说明(Description)另见激活插件()返回(Return)无返回值源码(Source)更新版本源码位置使用被使用3.0.0 wp-admin/includes/ms-deprecated.php:5701 function...

日期:2020-09-08 17:28:28 浏览:1656

add_action()

add_action( string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1 )将函数挂接到特定操作上。Hooks a function on to a specific action.目录锚点:#说明#参数#返回#源码#笔记说明(Description)Actions是WordPress核心在执行期间...

日期:2020-09-08 17:28:28 浏览:1120

add_blog_option()

add_blog_option( int $id, string $option, mixed $value )为给定的博客id添加新选项。Add a new option for a given blog id.目录锚点:#说明#参数#返回#源码#笔记说明(Description)不需要序列化值。如果需要序列化该值,则在将其插入数据库之前将对其进行序列化。请记住,资源不能序列化或作为选项添加。可以创建不带值的选项,然后稍后更新这些值。现有选项将不会更新,并执行检...

日期:2020-08-26 10:53:23 浏览:940

add_clean_index()

add_clean_index( string $table, string $index )向指定表添加索引。Adds an index to a specified table.目录锚点:#参数#返回#源码#笔记参数(Parameters)参数类型必填说明 $table (string) 必需 数据库表名。 ...

日期:2020-09-08 17:28:29 浏览:939

add_comment_meta()

add_comment_meta( int $comment_id, string $meta_key, mixed $meta_value, bool $unique = false )向注释添加元数据字段。Add meta data field to a comment.目录锚点:#参数#返回#源码#笔记参数(Parameters)参数类型必填说明 $comment_id ...

日期:2020-08-24 11:14:39 浏览:1196

add_comments_page()

add_comments_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', int $position = null )将子菜单页添加到“注释”主菜单。Add submenu page to the Comments ma...

日期:2020-08-24 11:14:39 浏览:981

add_contextual_help()

add_contextual_help( string $screen, string $help )为页面添加上下文帮助文本。Add contextual help text for a page.目录锚点:#说明#参数#返回#源码#笔记说明(Description)另见函数 WP_Screen::add_help_tab()()参数(Parameters)参数类型必填说明 $screen (string)...

日期:2020-09-08 17:28:29 浏览:909

add_cssclass()

add_cssclass( string $add, string $class )添加一个css类Add a CSS class.目录锚点:#参数#返回#源码#笔记参数(Parameters)参数类型必填说明 $add (string) 必需 $class (string...

日期:2020-09-08 17:28:29 浏览:946

add_custom_background()

add_custom_background( callable $wp_head_callback = '', callable $admin_head_callback = '', callable $admin_preview_callback = '' )为背景图像显示添加回调。Add callbacks for background image display.目录锚点:#说明#参数#返回#源码说...

日期:2020-09-08 17:28:30 浏览:1022

add_custom_image_header()

add_custom_image_header( callable $wp_head_callback, callable $admin_head_callback, callable $admin_preview_callback = '' )为图像标题显示添加回调。Add callbacks for image header display.目录锚点:#说明#参数#返回#源码说明(Description)另见函数 add_theme_sup...

日期:2020-09-08 17:28:30 浏览:719

add_dashboard_page()

add_dashboard_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', int $position = null )将子菜单页添加到仪表板主菜单。Add submenu page to the Dashboard m...

日期:2020-09-08 17:28:30 浏览:1086

add_editor_style()

add_editor_style( array|string $stylesheet = 'editor-style.css' )为自定义TinyMCE编辑器样式表添加回调。Add callback for custom TinyMCE editor stylesheets.目录锚点:#说明#参数#返回#源码#笔记说明(Description)参数$stylesheet是样式表的名称,相对于主题根。它还接受一个样式表数组。它是可选的,默认为编辑器-样式表’.此函数自动...

日期:2020-08-24 11:14:35 浏览:950

add_existing_user_to_blog()

add_existing_user_to_blog( array $details = false )根据maybe_Add_existing_user_to_blog()中的详细信息将用户添加到博客。Add a user to a blog based on details from maybe_add_existing_user_to_blog().目录锚点:#参数#返回#源码参数(Parameters)参数类型必填说明 ...

日期:2020-09-08 17:28:31 浏览:754

add_feed()

add_feed( string $feedname, callable $function )添加一个新的feed类型,如/atom1/。Add a new feed type like /atom1/.目录锚点:#参数#返回#源码#笔记参数(Parameters)参数类型必填说明 $feedname (string) 必需 订阅源名称。 ...

日期:2020-09-08 17:28:31 浏览:877

add_filter()

add_filter( string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1 )将函数或方法挂接到特定的筛选器操作。Hook a function or method to a specific filter action.目录锚点:#说明#参数#返回#源码#笔记说明(Description)WordP...

日期:2020-09-08 17:28:31 浏览:748

add_image_size()

add_image_size( string $name, int $width, int $height, bool|array $crop = false )注册新的图像大小。Register a new image size.目录锚点:#参数#返回#源码#笔记参数(Parameters)参数类型必填说明 $name (string) 必需...

日期:2020-09-08 17:28:32 浏览:792

add_link()

add_link()添加指向“使用$u POST中提供的值”的链接。Add a link to using values provided in $_POST.目录锚点:#返回#源码返回(Return)(int|WP_Error)值0或WP_Error on failure。成功时的链接ID。源码(Source)更新版本源码位置使用被使用2.0.0 wp-admin/includes/bookmark.php:1601 function...

日期:2020-09-08 17:28:32 浏览:852

add_links_page()

add_links_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', int $position = null )将子菜单页添加到链接主菜单。Add submenu page to the Links main menu....

日期:2020-09-08 17:28:32 浏览:1046

add_magic_quotes()

add_magic_quotes( array $array )在清理内容时遍历数组。Walks the array while sanitizing the contents.目录锚点:#参数#返回#源码参数(Parameters)参数类型必填说明 $array (array) 必需 清理内容时要行走的数组。 返回(Return)(array)清理了$a...

日期:2020-09-17 23:46:47 浏览:778