1 | <?php |
||
8 | class Carbon_Pagination_Post extends Carbon_Pagination_HTML { |
||
9 | |||
10 | /** |
||
11 | * Constructor. |
||
12 | * Creates and configures a new pagination with the provided settings. |
||
13 | * |
||
14 | * @param array $args Configuration options to modify the pagination settings. |
||
15 | */ |
||
16 | 6 | public function __construct( $args = array() ) { |
|
39 | |||
40 | /** |
||
41 | * Retrieve the posts that we'll paginate through. |
||
42 | * |
||
43 | * @return array $posts The posts to paginate through. |
||
44 | */ |
||
45 | 3 | public function get_pagination_posts() { |
|
64 | |||
65 | /** |
||
66 | * Get the URL to a certain page. |
||
67 | * |
||
68 | * @param int $page_number The page number. |
||
69 | * @param string $old_url Optional. The URL to add the page number to. |
||
70 | * @return string $url The URL to the page number. |
||
71 | */ |
||
72 | 4 | public function get_page_url( $page_number, $old_url = '' ) { |
|
84 | |||
85 | /** |
||
86 | * Add tokens to all post items. |
||
87 | * Registers the {TITLE} token for this pagination type |
||
88 | * |
||
89 | * @param Carbon_Pagination_Item $item The item to add tokens to. |
||
90 | */ |
||
91 | 1 | public function add_tokens( Carbon_Pagination_Item $item ) { |
|
100 | |||
101 | /** |
||
102 | * Retrieve the title of a certain post. |
||
103 | * |
||
104 | * @param Carbon_Pagination_Item $item The item to add tokens to. |
||
105 | * @return string $title The title of the item's corresponding post. |
||
106 | */ |
||
107 | 1 | public function get_post_title( Carbon_Pagination_Item $item ) { |
|
121 | |||
122 | } |