[wp-trac] [WordPress Trac] #35644: this code create problam in my web site for search result hsa no result found so what can i do plz help me

WordPress Trac noreply at wordpress.org
Thu Jan 28 13:09:56 UTC 2016


#35644: this code create problam in my web site for search result hsa no result
found so what can i do plz help me
--------------------------+----------------------
 Reporter:  rdubey        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  4.3
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by ocean90):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Old description:

> 1
> /**
>  * Display a noindex meta tag if required by the blog configuration.
>  *
>  * If a blog is marked as not being public then the noindex meta tag will
> be
>  * output to tell web robots not to index the page content. Add this to
> the wp_head action.
>  * Typical usage is as a wp_head callback. add_action( 'wp_head', 'index'
> );
>  *
>  * @see wp_no_robots
>  *
>  * @since 2.1.0
>  */
> function noindex() {
>         // If the blog is not public, tell robots to go away.
>         if ( '0' == get_option('blog_public') )
>                 wp_no_robots();
> }
>
> /**
>  * Display a noindex meta tag.
>  *
>  * Outputs a noindex meta tag that tells web robots not to index the page
> content.
>  * Typical usage is as a wp_head callback. add_action( 'wp_head',
> 'wp_no_robots' );
>  *
>  * @since 3.3.0
>  */
> function wp_no_robots() {
>         echo "<meta name='robots' content='noindex,follow' />\n";
> }

New description:

 {{{
 /**
  * Display a noindex meta tag if required by the blog configuration.
  *
  * If a blog is marked as not being public then the noindex meta tag will
 be
  * output to tell web robots not to index the page content. Add this to
 the wp_head action.
  * Typical usage is as a wp_head callback. add_action( 'wp_head', 'index'
 );
  *
  * @see wp_no_robots
  *
  * @since 2.1.0
  */
 function noindex() {
         // If the blog is not public, tell robots to go away.
         if ( '0' == get_option('blog_public') )
                 wp_no_robots();
 }

 /**
  * Display a noindex meta tag.
  *
  * Outputs a noindex meta tag that tells web robots not to index the page
 content.
  * Typical usage is as a wp_head callback. add_action( 'wp_head',
 'wp_no_robots' );
  *
  * @since 3.3.0
  */
 function wp_no_robots() {
         echo "<meta name='robots' content='noindex,follow' />\n";
 }
 }}}

--

Comment:

 Hello @rdubey,

 this Trac is for reporting bugs in WordPress Core and not for support.
 Please start '''a new topic''' with as much information as possible in the
 [https://wordpress.org/support/forum/how-to-and-troubleshooting support
 forums].

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35644#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list