Make WordPress Core

Ticket #9681: 9681.diff

File 9681.diff, 1.2 KB (added by Denis-de-Bernardy, 15 years ago)
  • wp-includes/post-template.php

     
    13001300
    13011301                        $class = $class ? '' : " class='alternate'";
    13021302
     1303                        $actions = array();
    13031304                        if ( $post->ID != $revision->ID && $can_edit_post )
    1304                                 $actions = '<a href="' . wp_nonce_url( add_query_arg( array( 'revision' => $revision->ID, 'diff' => false, 'action' => 'restore' ) ), "restore-post_$post->ID|$revision->ID" ) . '">' . __( 'Restore' ) . '</a>';
    1305                         else
    1306                                 $actions = '';
     1305                                $actions[] = '<a href="' . wp_nonce_url( add_query_arg( array( 'revision' => $revision->ID, 'diff' => false, 'action' => 'restore' ) ), "restore-post_$post->ID|$revision->ID" ) . '">' . __( 'Restore' ) . '</a>';
    13071306
     1307                        $actions = apply_filters('post_revision_actions', $actions, $revision, $post);
     1308                        $actions = implode(' | ', $actions);
     1309
    13081310                        $rows .= "<tr$class>\n";
    13091311                        $rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='left' value='$revision->ID'$left_checked />\n";
    13101312                        $rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='right' value='$revision->ID'$right_checked /></th>\n";