Un motore di ricerca WordPress per sviluppatori e autori di temi



post_class ›

Da2.7.0
Deprecaton/a
post_class ( $class = '', $post_id = null )
Parametri: (2)
  • (string|array) $class One or more classes to add to the class list.
    Richiesto: No
    Default: (vuoto)
  • (int|WP_Post) $post_id Optional. Post ID or post object. Defaults to the global `$post`.
    Richiesto: No
    Default: null
Definito a:
Codex:

Displays the classes for the post container element.



Sorgenti

function post_class( $class = '', $post_id = null ) {
	// Separates classes with a single space, collates classes for post DIV
	echo 'class="' . join( ' ', get_post_class( $class, $post_id ) ) . '"';
}