@@ -71,6 +71,7 @@ function codeable_register_settings() {
7171 register_setting ( 'wpcable_group ' , 'wpcable_fee_type ' );
7272 register_setting ( 'wpcable_group ' , 'wpcable_rate ' );
7373 register_setting ( 'wpcable_group ' , 'wpcable_cancel_after_days ' );
74+ register_setting ( 'wpcable_group ' , 'wpcable_tasks_stop_at_page ' );
7475
7576 if ( ! codeable_api_logged_in () ) {
7677 register_setting ( 'wpcable_group ' , 'wpcable_email ' );
@@ -111,10 +112,11 @@ function codeable_handle_login( $value, $old_value ) {
111112function codeable_settings_callback () {
112113 codeable_admin_notices ();
113114
114- $ wpcable_email = get_option ( 'wpcable_email ' );
115- $ wpcable_rate = get_option ( 'wpcable_rate ' , 80 );
116- $ wpcable_fee_type = get_option ( 'wpcable_fee_type ' , 'client ' );
117- $ wpcable_cancel_after_days = get_option ( 'wpcable_cancel_after_days ' , 180 );
115+ $ wpcable_email = get_option ( 'wpcable_email ' );
116+ $ wpcable_rate = get_option ( 'wpcable_rate ' , 80 );
117+ $ wpcable_fee_type = get_option ( 'wpcable_fee_type ' , 'client ' );
118+ $ wpcable_cancel_after_days = get_option ( 'wpcable_cancel_after_days ' , 180 );
119+ $ wpcable_tasks_stop_at_page = get_option ( 'wpcable_tasks_stop_at_page ' , 0 );
118120
119121 $ logout_url = wp_nonce_url (
120122 add_query_arg ( 'action ' , 'logout ' ),
@@ -163,6 +165,19 @@ function codeable_settings_callback() {
163165 </p>
164166 </td>
165167 </tr>
168+ <tr>
169+ <th scope="row">
170+ <label class="wpcable_label" for="wpcable_tasks_stop_at_page">
171+ <?php esc_html_e ( 'Stop pulling tasks after page ' , 'wpcable ' ); ?>
172+ </label>
173+ </th>
174+ <td>
175+ <input type="number" name="wpcable_tasks_stop_at_page" id="wpcable_tasks_stop_at_page" min="0" max="720" value="<?php echo (int ) $ wpcable_tasks_stop_at_page ; ?> " /> pages
176+ <p class="description">
177+ <?php esc_html_e ( 'Pull a specific number of pages for the tasks section. Default is 0 (pull all). We suggest setting it to 0 to retrieve ALL tasks the first time, and then set it to 1 or 2 to retrieve/update only the latest 1/2 pages. ' , 'wpcable ' ); ?>
178+ </p>
179+ </td>
180+ </tr>
166181 </tbody>
167182 </table>
168183
0 commit comments