[wp-trac] [WordPress Trac] #20226: Don't advertise pingback URL on resources that don't support pingbacks

WordPress Trac noreply at wordpress.org
Tue Sep 22 18:59:53 UTC 2015


#20226: Don't advertise pingback URL on resources that don't support pingbacks
------------------------------+-----------------------
 Reporter:  solarissmoke      |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  4.4
Component:  Pings/Trackbacks  |     Version:  3.3
 Severity:  minor             |  Resolution:
 Keywords:  has-patch         |     Focuses:  template
------------------------------+-----------------------

Comment (by wonderboymusic):

 @swissspidy:

 {{{
 function pings_open( $post_id = null ) {

         $_post = get_post($post_id);

         $open = ( 'open' == $_post->ping_status );

         /**
          * Filter whether the current post is open for pings.
          *
          * @since 2.5.0
          *
          * @param bool        $open    Whether the current post is open
 for pings.
          * @param int|WP_Post $post_id The post ID or WP_Post object.
          */
         return apply_filters( 'pings_open', $open, $post_id );
 }
 }}}

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


More information about the wp-trac mailing list