filters过滤器

apply_filters

document_title_separator

过滤文档标题的分隔符。

apply_filters( 'document_title_separator', string $sep );
  • $sep
    (string) 文档标题分隔符。默认'-'.

路径:wp-includes/general-template.php

document_title_parts

过滤文章标题。

apply_filters( 'document_title_parts', array $title );
  • $title
    (array) The document title parts.
    'title'(string) Title of the viewed page.
    'page' (string) Optional. Page number if paginated.
    'tagline'(string) Optional. Site description when on home page.
    'site'(string) Optional. Site title when not on home page.

the_generator

过滤器的输出XHTML发电机标记显示。

apply_filters( 'the_generator', string $generator_type, string $type );
  • $generator_type
    (string) The generator output.
  • $type
    (string) The type of generator to output. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.

script_loader_src

过滤脚本加载程序源代码。

apply_filters( 'script_loader_src', string $src, string $handle );
  • $src
    (string) Script loader source path.
  • $handle
    (string) Script handle.

style_loader_src

过滤器的排队方式的完全限定URL。

apply_filters( 'style_loader_src', string $src, string $handle );
  • $src
    (string) The source URL of the enqueued style.
  • $handle
    (string) The style's registered handle.

xmlrpc_enabled

apply_filters( 'xmlrpc_enabled', bool $enabled );
  • $enabled
    (bool) Whether XML-RPC is enabled. Default true.

wp_revisions_to_keep

apply_filters( 'wp_revisions_to_keep', int $num, WP_Post $post );
  • $num
    (int) Number of revisions to store.
  • $post
    (WP_Post) Post object.
评论
:broken_heart: :confounded: :flushed: :frowning: :grinning: :heart: :kissing_heart: :mask: :pensive: :rage: :relaxed: :scream: :smile: :smirk: :sob: :stuck_out_tongue_closed_eyes: :stuck_out_tongue_winking_eye: :wink: