Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Get Post Revisions on Single Post Page */
- function jnews_revisions() {
- $post_id = get_the_ID();
- if( is_single($post_id) ) {
- $revision = wp_get_post_revisions( $post_id );
- $total = count($revision);
- $output =
- "<div class='jeg_meta_like_container jeg_meta_like jeg_meta_revisions'>
- <a class='revisions' href='#' data-id='{$post_id}' data-type='revisions' data-message=''>
- <i class='fa fa-low-vision'></i> <span>{$total}</span>
- </a>
- </div>";
- echo jnews_sanitize_output( $output );
- }
- }
- add_action( 'jnews_render_before_meta_right', 'jnews_revisions' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement