1.1.0 default records per page

This commit is contained in:
biztechc
2018-01-17 06:36:39 +00:00
parent dcbf8e755e
commit b71fd99957
+35
View File
@@ -7,6 +7,41 @@
* Version: 1.1.0
*/
register_activation_hook( __FILE__, 'wp_jdt_activate_plugin' );
function wp_jdt_activate_plugin() {
$fields = array(
'wp_jdt_info',
'wp_jdt_paging',
// 'wp_jdt_paging_type',
// 'wp_jdt_page_length',
'wp_jdt_b_length_change',
'wp_jdt_ordering',
// 'wp_jdt_order_row',
// 'wp_jdt_order_row_sort',
'wp_jdt_searching',
);
foreach( $fields as $field ) {
$data = get_option( $field );
if ( $data == FALSE ) {
update_option( $field, 'true' );
}
}
$data = get_option('wp_jdt_paging_type');
( $data == FALSE ) ? update_option( 'wp_jdt_paging_type', 'simple' ) : '';
$data = get_option('wp_jdt_page_length');
( $data == FALSE ) ? update_option( 'wp_jdt_page_length', '10' ) : '';
$data = get_option('wp_jdt_order_row');
( $data == FALSE ) ? update_option( 'wp_jdt_order_row', '0' ) : '';
$data = get_option('wp_jdt_order_row_sort');
( $data == FALSE ) ? update_option( 'wp_jdt_order_row_sort', 'desc' ) : '';
}
add_action('admin_menu', 'wp_jdt_create_menu');
function wp_jdt_create_menu(){