Skip to content

Commit

Permalink
option to modify "entries found" text
Browse files Browse the repository at this point in the history
  • Loading branch information
Bearded Avenger committed Jun 11, 2015
1 parent ab4b0e8 commit 9ef91c2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions public/includes/class.shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,30 @@ public function __construct(){
public function shortcode( $atts, $content = null ) {

$defaults = array(
'type' => 'posts'
'type' => 'posts',
'results' => __('entries found','wp-search')
);
$atts = shortcode_atts( $defaults, $atts );

$results_text = $atts['results'] ? $atts['results'] : false;

ob_start();

?>
<div id="wp-search" class="wp-search">

<div class="wp-search--results-wrap">
<span id="wp-search--results"></span>
<span>entries found</span>
<span><?php echo esc_html( $results_text );?></span>
</div>

<div id="wp-search--input-wrap">
<input type="text" id="wp-search--input" placeholder="Search...">
<div id="wp-search--loading" class="wp-search--loading"><div class="wp-search--loader"></div></div>
</div>

<ul id="wp-search--post-list"></ul>

</div>

<?php
Expand Down

0 comments on commit 9ef91c2

Please sign in to comment.