Make WordPress Core

Opened 7 years ago

Closed 5 weeks ago

#9911 closed enhancement (fixed)

Add new filter to control content splitting into multiple pages

Reported by: sirzooro Owned by: DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version: 2.7.1
Component: Posts, Post Types Keywords: has-patch needs-refresh
Focuses: template Cc:


Currently the only way to create multi-page post is to use <!--nextpage--> tag. I suggest to add new filter which will allow plugins to control this functionality. In attached files you can find path which adds such filter, and example plugin (it converts each paragraph to separate page).

Attachments (4)

query.php.diff (854 bytes) - added by sirzooro 7 years ago.
path for wp-includes/query.php
paginator.php (1.3 KB) - added by sirzooro 7 years ago.
example plugin
query.php.2.diff (858 bytes) - added by sirzooro 4 years ago.
Patch refreshed for WP 3.3
9911.patch (1.4 KB) - added by chriscct7 8 weeks ago.

Download all attachments as: .zip

Change History (21)

7 years ago

path for wp-includes/query.php

7 years ago

example plugin

#1 @sirzooro
7 years ago

  • Keywords has-patch needs-testing added

#2 @Denis-de-Bernardy
7 years ago

  • Component changed from General to Template

#3 @Denis-de-Bernardy
6 years ago

  • Keywords commit added; needs-testing removed

patch is harmless

#4 @Denis-de-Bernardy
6 years ago

  • Keywords needs-testing added; commit removed

punting per IRC discussion

#5 @Denis-de-Bernardy
6 years ago

  • Milestone changed from 2.8 to 2.9

#6 @ryan
6 years ago

  • Milestone changed from 2.9 to Future Release

4 years ago

Patch refreshed for WP 3.3

#7 @sirzooro
4 years ago

I have refreshed patch for WP3.3. Could you commit it now?

#8 @sirzooro
4 years ago

  • Keywords dev-feedback added

Any chance to get it commited in near future? Maybe not 3.3, but 3.4?

#9 @nacin
22 months ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added

8 weeks ago

#10 @chriscct7
8 weeks ago

  • Owner set to chriscct7
  • Status changed from new to assigned

#11 @chriscct7
8 weeks ago

  • Milestone changed from Future Release to 4.4

This ticket was mentioned in Slack in #core by chriscct7. View the logs.

8 weeks ago

#13 @DrewAPicture
6 weeks ago

@chriscct7 Is content_paginate in 9911.patch supposed to be an action or a filter? If it's actually a filter, we need to change the summary in the hook doc to match the type.

#14 @chriscct7
6 weeks ago

  • Keywords needs-refresh added; needs-testing dev-feedback removed

Filter, will update in a few

#15 @wonderboymusic
5 weeks ago

should probably pass $post too if this is going to be a thing

#16 @DrewAPicture
5 weeks ago

  • Owner changed from chriscct7 to DrewAPicture
  • Status changed from assigned to reviewing

#17 @DrewAPicture
5 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 35285:

Query: Introduce the content_pagination filter, which makes it possible to manipulate how post content is split into "pages" in WP_Query::setup_postdata().

The "pages" — or chunks of post content – are determined by splitting based on the presence of <!-- nextpage --> tags in the post content.

Props sirzooro, chriscct7.
Fixes #9911.

Note: See TracTickets for help on using tickets.