get_the_generator_{$type}

過濾鉤子
apply_filters( "get_the_generator_{$type}", $gen, $type )
引數
  • (string) $gen The HTML markup output to wp_head().
    Required:
  • (string) $type The type of generator. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
    Required:
定義位置
相關勾子
wp_generator_typethe_generatorget_the_excerptget_the_dateget_comment_type
相關方法
get_the_generatorthe_generatorget_the_author_yimget_the_categoryget_the_author_metaget_the_author_email
引入
2.5.0
棄用
-

get_the_generator_{$type}: 這個函式檢索WordPress網站的生成器元標籤。引數$type指定了要檢索的生成器的型別,如版本、html、xhtml等。

為檢索到的生成器型別過濾HTML。

鉤子名稱的動態部分$type引用生成器型別。

可能的掛鉤名稱包括:

  • get_the_generator_atom
  • get_the_generator_comment
  • get_the_generator_export
  • get_the_generator_html
  • get_the_generator_rdf
  • get_the_generator_rss2
  • get_the_generator_xhtml
  • Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    return apply_filters( "get_the_generator_{$type}", $gen, $type );
    return apply_filters( "get_the_generator_{$type}", $gen, $type );
    return apply_filters( "get_the_generator_{$type}", $gen, $type );

    常見問題

    FAQs
    檢視更多 >