Example #1
0
    $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
}
if (!empty($message)) {
    ?>
<div id="message" class="updated notice is-dismissible"><p><?php 
    echo $message;
    ?>
</p></div>
<?php 
}
?>

<form id="posts-filter" method="get">

<?php 
$wp_list_table->views();
?>

<?php 
$wp_list_table->display();
?>

<div id="ajax-response"></div>
<?php 
find_posts_div();
?>
</form>
</div>

<?php 
include ABSPATH . 'wp-admin/admin-footer.php';
Example #2
0
<div class="alignleft actions">
<select name="action2" class="select-action">
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
<?php if ($is_trash) { ?>
<option value="untrash"><?php _e('Restore'); ?></option>
<?php } if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { ?>
<option value="delete"><?php _e('Delete Permanently'); ?></option>
<?php } else { ?>
<option value="trash"><?php _e('Move to Trash'); ?></option>
<?php } if (isset($orphans)) { ?>
<option value="attach"><?php _e('Attach to a post'); ?></option>
<?php } ?>
</select>
<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />

<?php if ( isset($_GET['status']) && $_GET['status'] == 'trash' && current_user_can('edit_others_posts') ) { ?>
	<input type="submit" id="delete_all2" name="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
<?php } ?>
</div>

<br class="clear" />
</div>
<?php find_posts_div(); ?>
</form>
<br class="clear" />

</div>

<?php
include('admin-footer.php');
function add_find_posts_div()
{
    if (preg_match('/wp-admin\\/edit\\.php\\?.*post_type=external-videos/', $_SERVER["REQUEST_URI"])) {
        print find_posts_div();
    }
}
    function rttchr_attach_box()
    {
        global $post;
        if (!empty($post)) {
            if ($post->post_parent != 0) {
                $title = _draft_or_post_title($post->post_parent);
                $parent = get_post($post->post_parent);
                $parent_type = get_post_type_object($parent->post_type);
                $url_rttchr = wp_nonce_url(admin_url('upload.php?action=unattach&rttchr=true&id=' . $post->ID), 'unattach');
                ?>
 
				<p>
					<?php 
                _e('Attached to', 're_attacher');
                ?>
:
					<strong>
						<?php 
                if (current_user_can('edit_post', $post->post_parent) && $parent_type && $parent_type->show_ui) {
                    ?>
							<a href="<?php 
                    echo get_edit_post_link($post->post_parent);
                    ?>
"><?php 
                    echo $title;
                    ?>
</a>
						<?php 
                } else {
                    echo $title;
                }
                ?>
					</strong>
				</p>
				<p><?php 
                _e('If you want change the attachment, please click on', 're_attacher');
                ?>
</p>
				<a class="hide-if-no-js" onclick="findPosts.open( 'media[]','<?php 
                echo $post->ID;
                ?>
' );return false;" href="#the-list" title="<?php 
                _e('Reattach this media item', 're_attacher');
                ?>
"><?php 
                _e('Reattach', 're_attacher');
                ?>
</a> 
				<?php 
                _e('or', 're_attacher');
                ?>
 
				<a class="hide-if-no-js" href="<?php 
                echo esc_url($url_rttchr);
                ?>
" title="<?php 
                _e('Unattach this media item', 're_attacher');
                ?>
"><?php 
                _e('Unattach', 're_attacher');
                ?>
</a> 
			<?php 
            } else {
                ?>
				( <?php 
                _e('Unattached', 're_attacher');
                ?>
 )<br />
				<a class="hide-if-no-js" onclick="findPosts.open( 'media[]','<?php 
                echo $post->ID;
                ?>
' );return false;" href="#the-list" title="<?php 
                _e('Attach this media item', 're_attacher');
                ?>
"><?php 
                _e('Attach', 're_attacher');
                ?>
</a>
			<?php 
            }
            ?>
			<div id="ajax-response"></div>
			<?php 
            find_posts_div();
        }
    }