get_the_generator_{$type} WordPress Filter Hook

The get_the_generator_{$type} hook is used to retrieve the generator type for a given post type. This hook is especially useful for plug-ins that need to generate content based on a specific post type. For example, a plug-in that generates PDFs of post content could use this hook to determine which PDF generator to use for a given post type.

apply_filters( "get_the_generator_{$type}", string $gen, string $type ) #

Filters the HTML for the retrieved generator type.


Description

The dynamic portion of the hook name, $type, refers to the generator type.

Possible hook names include:

  • 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

Top ↑

Parameters

$gen

(string)The HTML markup output to wp_head().

$type

(string)The type of generator. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.


Top ↑

Source

File: wp-includes/general-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More