@@ -71,6 +71,7 @@ function codeable_register_settings() {
71
71
register_setting ( 'wpcable_group ' , 'wpcable_fee_type ' );
72
72
register_setting ( 'wpcable_group ' , 'wpcable_rate ' );
73
73
register_setting ( 'wpcable_group ' , 'wpcable_cancel_after_days ' );
74
+ register_setting ( 'wpcable_group ' , 'wpcable_tasks_stop_at_page ' );
74
75
75
76
if ( ! codeable_api_logged_in () ) {
76
77
register_setting ( 'wpcable_group ' , 'wpcable_email ' );
@@ -111,10 +112,11 @@ function codeable_handle_login( $value, $old_value ) {
111
112
function codeable_settings_callback () {
112
113
codeable_admin_notices ();
113
114
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 );
118
120
119
121
$ logout_url = wp_nonce_url (
120
122
add_query_arg ( 'action ' , 'logout ' ),
@@ -163,6 +165,19 @@ function codeable_settings_callback() {
163
165
</p>
164
166
</td>
165
167
</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>
166
181
</tbody>
167
182
</table>
168
183
0 commit comments