[wp-trac] [WordPress Trac] #28902: Row actions do now follow filter on ajax update
WordPress Trac
noreply at wordpress.org
Mon Jul 14 21:02:08 UTC 2014
#28902: Row actions do now follow filter on ajax update
--------------------------+-----------------------------
Reporter: aubreypwd | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Once a filter has been set for (at least in my application) a custom
taxonomy to remove certain row actions on the terms list it persists
except when adding a new row to the list via Ajax (see video).
To replicate:
Create a filter to remove row actions for a filter, like so:
{{{
// Common edits to the row_actions for tax.
function ihcrs_tax_row_actions_common( $actions ) {
// Remove Quick Edit
unset( $actions['inline hide-if-no-js'] );
// Remove Preview
unset( $actions['view'] );
// Remove Trash for non admin users.
if( ! current_user_can( 'manage_options' ) ) {
if( isset( $actions['trash'] ) ) {
unset( $actions['trash'] );
}
if( isset( $actions['delete'] ) ) {
unset( $actions['delete'] );
}
}
return $actions;
}
// Clean up row actions.
add_filter(
'ihcrs_facility_row_actions',
'ihcrs_tax_row_actions_common'
);
}}}
Now, go and see that View and Quick Edit have been removed from the terms
list (may need to add a few). Add a new term via the left panel and let
Ajax do it's job. Observe that the newly added row (top) have default row
actions despite the filter.
[[Image(https://i.cloudup.com/BhHyvrNUPF.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28902>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list