* * Copyright 2008-2011 Crowd Favorite, Ltd. All rights reserved. * Released under the GPL license * http://www.opensource.org/licenses/gpl-license.php */ /** * Callback for publish meta box. Heavily based on code from the WP Core 3.1.2 */ function annowf_status_meta_box($post) { $post_state = annowf_get_post_state($post->ID); ?>
> 'review', 'tabindex' => '5' )); ?>

'approve', 'tabindex' => '5' )); ?>
'revisions', 'tabindex' => '6' )); ?>
'reject', 'tabindex' => '7' )); ?>
ID); annowf_minor_action_save_markup(); annowf_minor_action_preview_markup(); if ($post_round !== false) { // Return array of user ids who have given reviews for this round $round_reviewed = get_post_meta($post->ID, '_round_'.$post_round.'_reviewed', true); if (!is_array($round_reviewed)) { $round_reviewed = array(); } $round_reviewed = count($round_reviewed); $reviewers = count(anno_get_reviewers($post->ID)); ?>

'.$round_reviewed.'', ''.$reviewers.''); } } else { ?>

'approve', 'tabindex' => '5' )); ?>
'revisions', 'tabindex' => '6' )); ?>
'reject', 'tabindex' => '7' )); ?>

'publish', 'tabindex' => '5' )); ?>
cap->publish_posts); ?>
post_status ) { $post->post_password = ''; $visibility = 'private'; $visibility_trans = _x('Private', 'Publishing box visibility text', 'anno'); } elseif ( !empty( $post->post_password ) ) { $visibility = 'password'; $visibility_trans = _x('Password protected', 'Publishing box visibility text', 'anno'); } elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) { $visibility = 'public'; $visibility_trans = _x('Public, Sticky', 'Publishing box visibility text', 'anno' ); } else { $visibility = 'public'; $visibility_trans = _x('Public', 'Publishing box visibility text', 'anno'); } echo esc_html( $visibility_trans ); ?>
ID)); ?> /> />
ID)); ?> tabindex="4" />
/>

/>

ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date $stamp = _x('Scheduled for: %1$s', 'Publishing box future date', 'anno'); } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published $stamp = _x('Published on: %1$s', 'Publishing box publish date', 'anno'); } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified $stamp = _x('Publish immediately', 'Publishing box publish date', 'anno'); } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified $stamp = _x('Schedule for: %1$s', 'Publishing box schedule date', 'anno'); } else { // draft, 1 or more saves, date specified $stamp = _x('Publish on: %1$s', 'Publishing box schedule date', 'anno'); } $date = date_i18n( $datef, strtotime( $post->post_date ) ); } else { // draft (no saves, and thus no date specified) $stamp = _x('Publish immediately', 'Publishing box publish date', 'anno'); $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); } if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>

post_status ) { $preview_link = esc_url( get_permalink( $post->ID ) ); $preview_button = _x('Preview Changes', 'Publising box preview button text', 'anno'); } else { $preview_link = get_permalink( $post->ID ); if ( is_ssl() ) $preview_link = str_replace( 'http://', 'https://', $preview_link ); $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); $preview_button = _x('Preview', 'Publising box preview button text', 'anno'); } ?>
post_status ) { $preview_link = esc_url( get_permalink( $post->ID ) ); $preview_button = _x('Preview Changes', 'Publising box preview button text', 'anno'); } else { $preview_link = get_permalink( $post->ID ); if ( is_ssl() ) $preview_link = str_replace( 'http://', 'https://', $preview_link ); $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); $preview_button = _x('Preview', 'Publising box preview button text', 'anno'); } ?>
post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted js-validation-button" />
ID)) { if ($position == 'center') { $class = 'center-wrap'; } else { $class = 'float-right'; } ?>
'clone', 'tabindex' => '5', 'accesskey' => 'p' )); ?>
'revert', 'tabindex' => '5' )); ?>