find_posts_div

Definition:
function find_posts_div($found_action = '') {}

Parameters

  • unknown_type $found_action

Source code

function find_posts_div($found_action = '') {

?>

	<div id="find-posts" class="find-box" style="display:none;">

		<div id="find-posts-head" class="find-box-head"><?php _e('Find Posts or Pages'); ?></div>

		<div class="find-box-inside">

			<div class="find-box-search">

				<?php if ( $found_action ) { ?>

					<input type="hidden" name="found_action" value="<?php echo esc_attr($found_action); ?>" />

				<?php } ?>



				<input type="hidden" name="affected" id="affected" value="" />

				<?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>

				<label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>

				<input type="text" id="find-posts-input" name="ps" value="" />

				<input type="button" id="find-posts-search" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />



				<?php

				$post_types = get_post_types( array('public' => true), 'objects' );

				foreach ( $post_types as $post ) {

					if ( 'attachment' == $post->name )

						continue;

				?>

				<input type="radio" name="find-posts-what" id="find-posts-<?php echo esc_attr($post->name); ?>" value="<?php echo esc_attr($post->name); ?>" <?php checked($post->name,  'post'); ?> />

				<label for="find-posts-<?php echo esc_attr($post->name); ?>"><?php echo $post->label; ?></label>

				<?php

				} ?>

			</div>

			<div id="find-posts-response"></div>

		</div>

		<div class="find-box-buttons">

			<input id="find-posts-close" type="button" class="button alignleft" value="<?php esc_attr_e('Close'); ?>" />

			<?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?>

		</div>

	</div>

<?php

}

1072

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: