[wp-trac] [WordPress Trac] #24330: When adding the post_formats_compat the_content filter a post ID argument should be included

WordPress Trac noreply at wordpress.org
Wed May 22 11:52:16 UTC 2013


#24330: When adding the post_formats_compat the_content filter a post ID argument
should be included
--------------------------+--------------------
 Reporter:  gcorne        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.6
Component:  Post Formats  |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by hissy):

 Hi, I have one thing...

 If global $page is not set, this code returns null. Is it correct?
 {{{
 get_the_content('',false,1);
 }}}

 It seems that $page should be tested.
 {{{
         if ( !is_int($page) || $page > count( $pages ) ) // if the
 requested page doesn't exist
                 $page = count( $pages ); // give them the highest numbered
 page that DOES exist
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24330#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list