the_generator

過濾鉤子
apply_filters( 'the_generator', get_the_generator( $type )
引數
  • (string) $generator_type The generator output.
    Required:
  • (string) $type The type of generator to output. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
    Required:
定義位置
相關勾子
the_networksthe_authorthe_editorget_the_generator_typewp_generator_type
相關方法
the_generatorget_the_generatorwp_generatorthe_editorthe_authorthe_excerpt
引入
2.5.0
棄用
-

the_generator – 這是一個WordPress函式,用來顯示執行部落格的WordPress版本的資訊。the_generator函式生成一個包含WordPress版本資訊的HTML元標籤,可以用來指示在一個部落格上使用的是哪個版本的WordPress。這個資訊對於想知道正在使用哪個版本的WordPress的開發者和使用者來說是很有用的,也可以用來排除故障。

過濾XHTML生成器標籤的輸出,用於顯示。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
echo apply_filters( 'the_generator', get_the_generator( $type ), $type ) . "n";
echo apply_filters( 'the_generator', get_the_generator( $type ), $type ) . "n";
echo apply_filters( 'the_generator', get_the_generator( $type ), $type ) . "n";

常見問題

FAQs
檢視更多 >