_post_states [ WordPress Function ]
_post_states ( $post )
| Defined at: |
|
Benzer Fonksiyonlar: get_post_statuses, get_post_status, get_post_stati, post_exists, get_post_types
No description yet.
Source
<?php
function _post_states($post) {
$post_states = array();
if ( isset( $_REQUEST['post_status'] ) )
$post_status = $_REQUEST['post_status'];
else
$post_status = '';
if ( !empty($post->post_password) )
$post_states['protected'] = __('Password protected');
if ( 'private' == $post->post_status && 'private' != $post_status )
$post_states['private'] = __('Private');
if ( 'draft' == $post->post_status && 'draft' != $post_status )
$post_states['draft'] = __('Draft');
if ( 'pending' == $post->post_status && 'pending' != $post_status )
/* translators: post state */
$post_states['pending'] = _x('Pending', 'post state');
if ( is_sticky($post->ID) )
$post_states['sticky'] = __('Sticky');
$post_states = apply_filters( 'display_post_states', $post_states );
if ( ! empty($post_states) ) {
$state_count = count($post_states);
$i = 0;
echo ' - ';
foreach ( $post_states as $state ) {
++$i;
( $i == $state_count ) ? $sep = '' : $sep = ', ';
echo "<span class='post-state'>$state$sep</span>";
}
}
if ( get_post_format( $post->ID ) )
echo ' - <span class="post-state-format">' . get_post_format_string( get_post_format( $post->ID ) ) . '</span>';
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- _post_states | A HitchHackers guide through WordPress
Feb 12, 2011 ... function _post_states($post) { $post_states = array(); if ( isset($_GET['post_status' ]) ) $post_status = $_GET['post_status']; else $post_status = '' ...
hitchhackerguide.com - _post_states (WordPress Function) - WPSeek.com
WordPress lookup for _post_states, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - Activist Post: States Vote to Ban UN Agenda 21 Policies
6 days ago ... Susanne Posel, Contributor Activist Post The New Hampshire House of Representatives voted to ban UN Agenda 21 polices. This legislation ...
www.activistpost.com - The First in.gredients: 2610 Manor Road « in.gredients
Jul 15, 2011 ... food are sometimes used as grocery stores – helped determine our location,” their announcement post states. For more information on the ...
in.gredients.com