thanks you for your reply. If have free time, please complete idea #1.
——————————-
I have some idea for you can develop in future
1. Please hide fields in add new record if this field is AUTO_INCREMENT (current plugin will use MAX(value) + 1)
2. Another Idea, you can code for user can create multi admin menu page for database table. Example, i have 2 custom table: wp_customers and wp_contact. I need manager customers and orders same time, this plugins will help me create multi admin page:
+. Customers (parent menu)
— List customers (sub-menu) ( can control list columns will show)
— Addnew customer (sub-menu)
+. Contact (parent menu)
— List contact (sub-menu) ( can control list columns will show)
— Addnew contact (sub-menu)
After create menu and reload page, menu had just created will appears in wordpress admin menu.
—————–
3. And if you can, in next version, please use apply_filters for custom table column.
Example: i have custom table wp_customers have column is_enable with value 1|0 store in database
+ In page list customers, please return a hook (don’t print raw value) for developer can customize in theme.
$value = apply_filters( 'customers_list_column', $column_name, $column_value );
return $value;
Developer can use custom code for show Yes|No value like
add_filter( 'customers_list_column_is_enable', function($column_name, $column_value)
{
if($column_name === 'is_enable')
{
if($column_value === '1')
{
return 'Yes';
}
return 'No';
}
return $column_value;
});
+ the same for page addnew||edit customer: i want use checkbox for this column, please return
$form_field_html = apply_filters( 'customers_edit_column', $form_field_html, $column_name, $column_value);
return $form_field_html;
Developer can use custom code for change textbox to checkbox like
add_filter( 'customers_edit_column', function($form_field_html, $column_name, $column_value)
{
if($column_name === 'is_enable')
{
$checked = checked( $column_value, 1 );
$form_field_html = '<input type="checkbox" name="'. $column_name .'" value="1" ' . $checked . '>';
}
return $form_field_html;
});
Sorry my english is not good, hope you will understand my idea.
thanks.
-
This reply was modified 3 years, 10 months ago by veerkun.
-
This reply was modified 3 years, 10 months ago by veerkun.
-
This reply was modified 3 years, 10 months ago by veerkun.