[wp-trac] [WordPress Trac] #20844: Specify titles using <!-- nextpage -->

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 19 22:59:53 UTC 2012


#20844: Specify titles using <!-- nextpage -->
-----------------------------+------------------------------
 Reporter:  sgr33n           |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by scribu):

 I took a look at your code and I think you could actually rely on the
 shortcode parsing and the old nextpage tag:

 {{{
 function nextpage_shortcode( $attr ) {
   $global $nextpage_shortcodes;

   $nextpage_shortcodes[] = $attr['title'];

   return '<!--nextpage-->';  // Let WP handle splitting the content
 }
 add_shortcode( 'nextpage', 'nextpage_shortcode' );
 }}}

 Later, you can use the $nextpage_shortcodes global array to figure out
 which title to show.

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


More information about the wp-trac mailing list