Make WordPress Core

Opened 15 years ago

Closed 9 years ago

#9911 closed enhancement (fixed)

Add new filter to control content splitting into multiple pages

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

Description

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 15 years ago.
path for wp-includes/query.php
paginator.php (1.3 KB) - added by sirzooro 15 years ago.
example plugin
query.php.2.diff (858 bytes) - added by sirzooro 13 years ago.
Patch refreshed for WP 3.3
9911.patch (1.4 KB) - added by chriscct7 9 years ago.

Download all attachments as: .zip

Change History (21)

@sirzooro
15 years ago

path for wp-includes/query.php

@sirzooro
15 years ago

example plugin

#1 @sirzooro
15 years ago

  • Keywords has-patch needs-testing added

#2 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Template

#3 @Denis-de-Bernardy
15 years ago

  • Keywords commit added; needs-testing removed

patch is harmless

#4 @Denis-de-Bernardy
15 years ago

  • Keywords needs-testing added; commit removed

punting per IRC discussion

#5 @Denis-de-Bernardy
15 years ago

  • Milestone changed from 2.8 to 2.9

#6 @ryan
15 years ago

  • Milestone changed from 2.9 to Future Release

@sirzooro
13 years ago

Patch refreshed for WP 3.3

#7 @sirzooro
13 years ago

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

#8 @sirzooro
13 years ago

  • Keywords dev-feedback added

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

#9 @nacin
11 years ago

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

@chriscct7
9 years ago

#10 @chriscct7
9 years ago

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

#11 @chriscct7
9 years ago

  • Milestone changed from Future Release to 4.4

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


9 years ago

#13 @DrewAPicture
9 years 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
9 years ago

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

Filter, will update in a few

#15 @wonderboymusic
9 years ago

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

#16 @DrewAPicture
9 years ago

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

#17 @DrewAPicture
9 years 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.