-
-
Save davisshaver/58cfd31c4450b2edb18f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function upcoming_info() { | |
global $post, $edit_flow; | |
$view = get_metadata( 'post', $post->ID, '', true ); | |
$upcoming_assignment = $view[_ef_editorial_meta_paragraph_assignment][0]; | |
if ($upcoming_assignment != null) : | |
echo '<h4>Assignment</h4><p>' . $upcoming_assignment . '</p>'; | |
endif; | |
$upcoming_editor_id = $view[_ef_editorial_meta_user_editor][0]; | |
if ($upcoming_editor_id != null) : | |
$upcoming_editor = get_userdata($upcoming_editor_id); | |
echo '<h4>Assigning Editor</h4> <p>' . $upcoming_editor->user_nicename . '</p>'; | |
endif; | |
$upcoming_available_date = $view[_ef_editorial_meta_date_planned-availability][0]; | |
if ($upcoming_available_date != null) : | |
$upcoming_available_date_human_format = date("F j, Y", $upcoming_available_date); | |
echo '<h4>Planned Availability</h4> <p>' . $upcoming_available_date_human_format . '</p>'; | |
endif; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment