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() { |
|
63 | |||
64 | /** |
||
65 | * Get the URL to a certain page. |
||
66 | * |
||
67 | * @param int $page_number The page number. |
||
68 | * @param string $old_url Optional. The URL to add the page number to. |
||
69 | * @return string $url The URL to the page number. |
||
70 | */ |
||
71 | 4 | public function get_page_url( $page_number, $old_url = '' ) { |
|
83 | |||
84 | /** |
||
85 | * Add tokens to all post items. |
||
86 | * Registers the {TITLE} token for this pagination type |
||
87 | * |
||
88 | * @param Carbon_Pagination_Item $item The item to add tokens to. |
||
89 | */ |
||
90 | 1 | public function add_tokens( Carbon_Pagination_Item $item ) { |
|
99 | |||
100 | /** |
||
101 | * Retrieve the title of a certain post. |
||
102 | * |
||
103 | * @param Carbon_Pagination_Item $item The item to add tokens to. |
||
104 | * @return string $title The title of the item's corresponding post. |
||
105 | */ |
||
106 | 1 | public function get_post_title( Carbon_Pagination_Item $item ) { |
|
120 | |||
121 | } |