Modifying Options Of Item Status Select Box
Type: Filter
Name: td_status_selection_fields
Location: wp-trade/inc/TD_Filters.php
Name: td_status_selection_fields
Location: wp-trade/inc/TD_Filters.php
Adding New Options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | function add_extra_status_selection_fields( $status ) { // Add Status $extra_status = array( 'pending' => __('Pending', 'wp-trade'), 'for-review' => __('For Review', 'wp-trade') ); // combine the two arrays $status= array_merge( $extra_status, $status); return $status; } add_filter('td_status_selection_fields', 'add_extra_status_selection_fields'); |
Removing Options
1 2 3 4 5 6 7 8 9 10 11 12 | function remove_status_selection_fields( $status) { // Remove Status unset( $status['private'], $status['sold'] ); return $status; } add_filter('td_status_selection_fields', 'remove_status_selection_fields'); |
Updating Options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | function edited_status_selection_fields( $status) { // Update Status $edited_status = array( 'private' => __('Hidden', 'wp-trade'), 'sold' => __('Out of Stock', 'wp-trade') ); // combine the two arrays $status= array_merge( $status, $edited_status ); return $status; } add_filter('td_status_selection_fields', 'edited_status_selection_fields'); |
Do you need help with a project? or have a new project in mind that you need help with?
Contact Me