WordPress.org

Make WordPress Core

Ticket #9657: 9657-demo-template-for-plugin-v0.1.patch

File 9657-demo-template-for-plugin-v0.1.patch, 2.5 KB (added by hakre, 11 years ago)

First patch for template.php

  • wp-admin/includes/template.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress
     
    21252125                                if ( $user_can ) {
    21262126                                        $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    21272127                                        $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
    2128                                         if ( $comment_status ) { // not looking at all comments
     2128                                        if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments
    21292129                                                if ( 'approved' == $the_comment_status ) {
    21302130                                                        $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
    21312131                                                        unset($actions['approve']);
     
    34533453                        }
    34543454                        break;
    34553455        }
     3456        // TODO: move help output into $extra_metas array.
     3457        // TODO: move screen options output into $extra_metas array.
     3458        // TODO: update css and js files to finish
     3459        $extra_metas = apply_filters('screen_meta_extra_metas', array(), $screen);     
    34563460?>
    34573461<div id="screen-meta">
    34583462<?php
    3459         if ( $show_screen ) :
     3463        if ( $count = count($extra_metas)) :
     3464                $values = array_values($extra_metas);
     3465                for($i = 0; $i < $count; $i++) {
     3466                        $extra_meta = $values[$i];
     3467                        printf('<div id="screen-meta-%d-wrap" class="screen-metas-wrap hidden">%s</div>', $i, $extra_meta[1]);
     3468                }
     3469        endif;
     3470
     3471        if ( $show_screen ) :
    34603472?>
    34613473<div id="screen-options-wrap" class="hidden">
    34623474        <form id="adv-settings" action="" method="post">
     
    35173529<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
    35183530</div>
    35193531<?php } ?>
     3532<?php $i = 0; foreach( $extra_metas as $extra_meta ) { ?>
     3533<div id="screen-meta-<?php echo $i; ?>-link-wrap" class="screen-metas-link-wrap hide-if-no-js screen-meta-toggle">
     3534<a href="#screen-meta-<?php echo $i; ?>" id="screen-meta-<?php echo $i; ?>-link" class="screen-metas-link"><?php echo $extra_meta[0] ?></a>
    35203535</div>
     3536<?php $i++; } ?>
     3537</div>
    35213538</div>
    35223539<?php
    35233540}