Filters
Overview
Defines grouped image file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Image File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_image_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Overview
Defines grouped video file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Video File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_video_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
media_library_organizer_mime_get_grouped_text_file_types
/addons/advanced-filters/includes/global/mime.php::240
Overview
Defines grouped text file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Text File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_text_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Overview
Defines grouped audio file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Audio File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_audio_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Overview
Defines grouped document file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Document File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_document_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Overview
Defines grouped spreadsheet file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Spreadsheet File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_spreadsheet_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Overview
Defines grouped presentation file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Presentation File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_presentation_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Overview
Defines grouped archive file types
Parameters
Parameter |
Type |
Description |
$file_types |
array |
Archive File Types. |
Usage
add_filter( 'media_library_organizer_mime_get_grouped_archive_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Overview
Modifies the WP_Query to apply search filters.
Parameters
Parameter |
Type |
Description |
$query_or_query_args |
mixed |
WP_Query object | WP_Query arguments array. |
$search |
string |
Search Term(s). |
$search_field |
string |
Search Field (blank = any). |
$comparison_operator |
string |
Comparison Operator. |
Usage
add_filter( 'media_library_organizer_advanced_filters_media_search', function( $query_or_query_args, $search, $search_field, $search_comparison_operator ) {
// ... your code here
// Return value
return $query_or_query_args;
}, 10, 4 );
Overview
Modifies the search SQL WHERE clause, as a field and/or comparison operator have been specified.
Parameters
Parameter |
Type |
Description |
$individual_search_where_clause |
string |
Individual WHERE clause for this field. |
$field |
string |
Field. |
$operator |
string |
Comparison Operator. |
$search |
string |
Search Term(s). |
$where |
string |
Search SQL for WHERE Clause. |
$query |
WP_Query |
WordPress Query. |
Usage
add_filter( 'media_library_organizer_advanced_filters_media_apply_search_where_clauses', function( $individual_search_where_clause, $search, $search_field, $operator, $where, $query ) {
// ... your code here
// Return value
return $individual_search_where_clause;
}, 10, 6 );
Overview
Defines the Attachment Fields that can be specifically searched
Parameters
Parameter |
Type |
Description |
Fields. |
array $field |
N/A |
Usage
add_filter( 'media_library_organizer_search_media_fields', function( $fields ) {
// ... your code here
// Return value
return $fields;
}, 10, 1 );
Overview
Defines the comparison operators that can be used when searching.
Parameters
Parameter |
Type |
Description |
Fields. |
array $field |
N/A |
Usage
add_filter( 'media_library_organizer_search_media_comparison_operators', function( $comparison_operators ) {
// ... your code here
// Return value
return $comparison_operators;
}, 10, 1 );
Overview
Returns an array of IPTC editable fields for an Attachment
Parameters
Parameter |
Type |
Description |
$fields |
array |
Fields. |
Usage
add_filter( 'media_library_organizer_iptc_fields_get_fields', function( $fields ) {
// ... your code here
// Return value
return $fields;
}, 10, 1 );
Overview
Filters the Attachment: Display Options for non-standard File Types.
Parameters
Parameter |
Type |
Description |
$file_type |
string |
File Type. |
Usage
add_filter( 'media_library_organizer_defaults_admin_output_settings_panels_options', function( $file_type ) {
// ... your code here
// Return value
return $file_type;
}, 10, 1 );
Overview
Defines the tabs to display on the Defaults Addon Settings Panel
Parameters
Parameter |
Type |
Description |
$tabs |
array |
Tabs. |
Usage
add_filter( 'media_library_organizer_defaults_admin_get_settings_panel_tabs', function( $tabs ) {
// ... your code here
// Return value
return $tabs;
}, 10, 1 );
Overview
Filter the default settings for the Defaults Addon
Parameters
Parameter |
Type |
Description |
$defaults['defaults'] |
array |
Defaults. |
Usage
add_filter( 'media_library_organizer_defaults_settings_get_default_settings', function( $defaults['defaults'] ) {
// ... your code here
// Return value
return $defaults['defaults'];
}, 10, 1 );
Overview
Makes the given Defaults' File Type Rulesets associative e.g. $rulesets[alt_text][0] --> $rulesets[0][alt_text]
Parameters
Parameter |
Type |
Description |
$associative_ruleset |
array |
Associative Ruleset. |
$rulesets |
array |
POSTed Ruleset from Settings Form. |
$index |
int |
POSTed Ruleset Index. |
Usage
add_filter( 'media_library_organizer_defaults_settings_make_rulesets_associative_ file_type', function( $associative_ruleset, $rulesets, $index ) {
// ... your code here
// Return value
return $associative_ruleset;
}, 10, 3 );
Overview
Defines the available Attachment Attribute comparison operators
Parameters
Parameter |
Type |
Description |
$comparison_operators |
array |
Comparison Operators. |
Usage
add_filter( 'media_library_organizer_auto_categorization_common_get_attribute_comparison_operators', function( $comparison_operators ) {
// ... your code here
// Return value
return $comparison_operators;
}, 10, 1 );
Overview
Defines the available Rule Comparison Operator
Parameters
Parameter |
Type |
Description |
$comparison_operators |
array |
Comparison Operators. |
Usage
add_filter( 'media_library_organizer_auto_categorization_common_get_rule_comparison_operators', function( $comparison_operators ) {
// ... your code here
// Return value
return $comparison_operators;
}, 10, 1 );
Overview
Fetch the attachment value to test against the rule.
Parameters
Parameter |
Type |
Description |
$value |
mixed |
Attachment Value. |
$field |
string |
Field. |
$rule |
array |
Rule. |
$attachment |
Media_Library_Organizer_Attachment |
Attachment. |
$attachment_id |
int |
Attachment ID. |
Usage
add_filter( 'media_library_organizer_defaults_ruleset_ruleset_passed_field_value', function( '', $field, $rule, $attachment, $attachment_id ) {
// ... your code here
// Return value
return '';
}, 10, 5 );
Overview
Determines if a rule passes or fails.
Parameters
Parameter |
Type |
Description |
$rule_comparison |
string |
Rule Comparison Method. |
$value |
string |
Attachment Value. |
$rule_value |
string |
Rule Value. |
Usage
add_filter( 'media_library_organizer_defaults_ruleset_rule_passed', function( true, $rule_comparison, $value, $rule_value ) {
// ... your code here
// Return value
return true;
}, 10, 4 );
Parameters
Parameter |
Type |
Description |
$file_types |
Unknown |
N/A |
Usage
add_filter( 'media_library_organizer_zip_mime_get_supported_file_types', function( $file_types ) {
// ... your code here
// Return value
return $file_types;
}, 10, 1 );
Parameters
Parameter |
Type |
Description |
$post_id |
Unknown |
N/A |
Usage
add_filter( 'media_library_organizer_zip_unzip_attachment', function( $post_id ) {
// ... your code here
// Return value
return $post_id;
}, 10, 1 );
Parameters
Parameter |
Type |
Description |
$columns |
Unknown |
N/A |
Usage
add_filter( 'media_library_organizer_output_media_get_supported_list_view_columns', function( $columns ) {
// ... your code here
// Return value
return $columns;
}, 10, 1 );
Overview
Defines paginate_links() compatible arguments before building Pagination markup.
Parameters
Parameter |
Type |
Description |
$args |
array |
Pagination Arguments. |
$atts |
array |
[gallery] Shortcode Instance Attributes. |
Usage
add_filter( 'media_library_organizer_dynamic_galleries_get_pagination_markup_args', function( $args, $atts ) {
// ... your code here
// Return value
return $args;
}, 10, 2 );
Overview
Defines paginate_links() compatible arguments before building Pagination markup.
Parameters
Parameter |
Type |
Description |
$html |
string |
paginate_links() HTML Markup. |
$args |
array |
Pagination Arguments. |
$atts |
array |
[gallery] Shortcode Instance Attributes. |
Usage
add_filter( 'media_library_organizer_dynamic_galleries_get_pagination_markup_output', function( $html, $args, $atts ) {
// ... your code here
// Return value
return $html;
}, 10, 3 );
Overview
Register configuration fields for the Dynamic Gallery block / shortcode.
Parameters
Parameter |
Type |
Description |
$fields |
array |
Fields |
Usage
add_filter( 'media_library_organizer_dynamic_galleries_block_get_fields', function( $fields ) {
// ... your code here
// Return value
return $fields;
}, 10, 1 );
Overview
Register tabs and their fields for the Dynamic Gallery block / shortcode.
Parameters
Parameter |
Type |
Description |
$tabs |
array |
Tabs |
Usage
add_filter( 'media_library_organizer_dynamic_galleries_block_get_tabs', function( $tabs ) {
// ... your code here
// Return value
return $tabs;
}, 10, 1 );
Overview
Defines WP_Query compatible arguments for the given Dynamic Gallery shortcode's attribute key and value.
Parameters
Parameter |
Type |
Description |
$args |
array |
WP_Query compatible arguments. |
$attribute |
string |
Gallery Shortcode Attribute / Key. |
$value |
string |
Gallery Shortcode Attribute Value. |
$atts |
array |
All Gallery Shortcode Attributes. |
Usage
add_filter( 'media_library_organizer_dynamic_galleries_shortcode_output_gallery_wp_query_args', function( $args, $attribute, $value, $atts ) {
// ... your code here
// Return value
return $args;
}, 10, 4 );
Overview
Defines the array of attributes that are WP_Query compatible that the Addon supports for the [gallery] shortcode.
Parameters
Parameter |
Type |
Description |
$attributes |
array |
Attributes. |
Usage
add_filter( 'media_library_organizer_dynamic_galleries_shortcode_supported_attributes', function( $attributes ) {
// ... your code here
// Return value
return $attributes;
}, 10, 1 );
Overview
Defines the default attributes for this Addon's Shortcode
Parameters
Parameter |
Type |
Description |
$default_attributes |
array |
Default Attributes. |
Usage
add_filter( 'media_library_organizer_dynamic_galleries_settings_get_default_attributes', function( $default_attributes ) {
// ... your code here
// Return value
return $default_attributes;
}, 10, 1 );
Overview
Perform Bulk Edit Action on the given Attachment ID
Parameters
Parameter |
Type |
Description |
$success |
mixed |
WP_Error | true. |
$post_id |
int |
Attachment ID. |
$_REQUEST |
array |
Blank values should be treated as the user making no change. |
Usage
add_filter( 'media_library_organizer_bqe_bulk_actions_list_edit_handle_bulk_actions_edit', function( true, $post_id, $_REQUEST ) {
// ... your code here
// Return value
return true;
}, 10, 3 );
media_library_organizer_bqe_bulk_edit_list_define_post_fields
/addons/bulk-quick-edit/includes/admin/bulk-actions-list-edit.php::250
Overview
Filters $_REQUEST field keys that are supported / submitted when Bulk Editing an Attachment Post. These should be fields that are supported by wp_update_post()
Parameters
Parameter |
Type |
Description |
$fields |
array |
Fields. |
$post_ids |
array |
Post IDs. |
Usage
add_filter( 'media_library_organizer_bqe_bulk_edit_list_define_post_fields', function( $fields, $post_ids ) {
// ... your code here
// Return value
return $fields;
}, 10, 2 );
media_library_organizer_bqe_bulk_edit_list_define_post_meta_fields
/addons/bulk-quick-edit/includes/admin/bulk-actions-list-edit.php::343
Overview
Filters $_REQUEST['meta_input'] field keys that are supported / submitted when Bulk Editing an Attachment's Post Meta. These should be fields that are supported by update_post_meta()
Parameters
Parameter |
Type |
Description |
$fields |
array |
Fields. |
$post_ids |
array |
Post IDs. |
Usage
add_filter( 'media_library_organizer_bqe_bulk_edit_list_define_post_meta_fields', function( $fields ) {
// ... your code here
// Return value
return $fields;
}, 10, 1 );
media_library_organizer_bqe_ajax_update_post_data
/addons/bulk-quick-edit/includes/admin/ajax.php::87
Overview
Filters the $_POST['data'] submitted in the AJAX request, before any data is saved / updated against an Attachment when quick editing.
Parameters
Parameter |
Type |
Description |
$post_data |
array |
$_POST['data']. |
$post |
WP_Post |
Attachment Post. |
Usage
add_filter( 'media_library_organizer_bqe_ajax_update_post_data', function( $post_data, $post ) {
// ... your code here
// Return value
return $post_data;
}, 10, 2 );
media_library_organizer_bqe_ajax_update_post_args
/addons/bulk-quick-edit/includes/admin/ajax.php::118
Overview
Defines wp_update_post() compatible key/value pairs immediately before saving an Attachment that has been quick edited.
Parameters
Parameter |
Type |
Description |
$post_args |
array |
wp_update_post() compatible key/value pairs. |
$post |
WP_Post |
Attachment Post. |
$post_data |
array |
$_POST['data']. |
Usage
add_filter( 'media_library_organizer_bqe_ajax_update_post_args', function( $post_args, $post, $post_data ) {
// ... your code here
// Return value
return $post_args;
}, 10, 3 );
Overview
Allows Addons to filter the Fields to include with each pluploader file upload.
Parameters
Parameter |
Type |
Description |
$fields |
array |
Form Fields. |
$options |
array |
Pluploader Options. |
Usage
add_filter( 'media_library_organizer_bqe_upload_define_plupload_default_multipart_params_fields', function( $fields, $options ) {
// ... your code here
// Return value
return $fields;
}, 10, 2 );
Overview
Allows Addons to filter the Pluploader multipart_params options.
Parameters
Parameter |
Type |
Description |
$options[multipart_params] |
array |
Multipart Parameter Options. |
$fields |
array |
Form Fields. |
$options |
array |
Pluploader Options. |
Usage
add_filter( 'media_library_organizer_bqe_upload_define_plupload_default_multipart_params', function( $options['multipart_params'], $fields, $options ) {
// ... your code here
// Return value
return $options['multipart_params'];
}, 10, 3 );
Overview
Defines all available Bulk Actions for the Media List View.
Parameters
Parameter |
Type |
Description |
$bulk_actions |
array |
Bulk Actions |
Usage
add_filter( 'media_library_organizer_bqe_bulk_actions_list_register_bulk_actions', function( $bulk_actions ) {
// ... your code here
// Return value
return $bulk_actions;
}, 10, 1 );
Overview
Defines all available Bulk Actions for the Media List View that work using Javascript / AJAX.
Parameters
Parameter |
Type |
Description |
$bulk_actions_js |
array |
Bulk Actions. |
Usage
add_filter( 'media_library_organizer_bqe_bulk_actions_list_register_bulk_actions_js', function( $bulk_actions_js ) {
// ... your code here
// Return value
return $bulk_actions_js;
}, 10, 1 );
media_library_organizer_bqe_quick_edit_enqueue_scripts_post_data
/addons/bulk-quick-edit/includes/admin/quick-edit.php::176
Overview
Filters the Attachment Post Data structure.
Parameters
Parameter |
Type |
Description |
$post_data |
array |
Post Data. |
Usage
add_filter( 'media_library_organizer_bqe_quick_edit_enqueue_scripts_post_data', function( $post_data ) {
// ... your code here
// Return value
return $post_data;
}, 10, 1 );
Overview
Define Quick Edit Links to add immediately after the Edit link in a row of the Media Library List View
Parameters
Parameter |
Type |
Description |
$actions_after_quick_edit_link |
array |
Actions to insert immediately after the Edit Link. |
$actions |
array |
Row Actions. |
$post |
WP_Post |
Attachment Post. |
$detached |
bool |
Attachment has no relationship to a Post. |
$nonce |
string |
Quick Edit Row Nonce. |
Usage
add_filter( 'media_library_organizer_bqe_add_quick_edit_links_after_quick_edit_link', function( $actions_after_quick_edit_link, $actions, $post, $detached, $nonce ) {
// ... your code here
// Return value
return $actions_after_quick_edit_link;
}, 10, 5 );
Overview
Filters the Quick Edit actions which appear underneath each Attachment in the Media List View.
Parameters
Parameter |
Type |
Description |
$actions |
array |
Quick Edit Actions. |
$post |
WP_Post |
Attachment Post. |
$detached |
bool |
Attachment has no relationship to a Post. |
Usage
add_filter( 'media_library_organizer_bqe_quick_edit_add_quick_edit_link', function( $actions, $post, $detached ) {
// ... your code here
// Return value
return $actions;
}, 10, 3 );
Overview
Defines all available Bulk Actions for the Media Grid View.
Parameters
Parameter |
Type |
Description |
$bulk_actions |
array |
Bulk Actions. |
Usage
add_filter( 'media_library_organizer_bqe_bulk_actions_grid_register_bulk_actions_js', function( $bulk_actions ) {
// ... your code here
// Return value
return $bulk_actions;
}, 10, 1 );
Actions
Overview
Outputs table row form fields for the given Defaults' Ruleset
Parameters
Parameter |
Type |
Description |
$ruleset |
array |
Ruleset |
$ruleset_index |
int |
Ruleset Index |
$taxonomy |
WP_Taxonomy |
Taxonomy |
Usage
add_action( 'media_library_organizer_defaults_settings_output_ file_type', function( $ruleset, $ruleset_index, $taxonomy ) {
// ... your code here
}, 10, 3 );
Overview
Load Setting Views for the Defaults Addon
Parameters
Parameter |
Type |
Description |
$settings |
array |
Settings |
$taxonomy |
WP_Taxonomy |
Taxonomy |
$file_types |
array |
Registered File Types |
$tabs |
array |
Registered Tabs |
$attachment_display_options |
array |
Attachment Display Options |
Usage
add_action( 'media_library_organizer_defaults_views_admin_settings', function( $settings, $taxonomy, $file_types, $tabs, $attachment_display_options ) {
// ... your code here
}, 10, 5 );
Overview
Applies the given default values to the given Attachment
Parameters
Parameter |
Type |
Description |
$defaults |
array |
Default Values. |
$attachment |
Media_Library_Organizer_Attachment |
Attachment. |
Usage
add_action( 'media_library_organizer_defaults_upload_apply_defaults_ file_type', function( $defaults, $attachment ) {
// ... your code here
}, 10, 2 );
Parameters
Parameter |
Type |
Description |
Usage
add_action( 'media_library_organizer_filesystem_add_file_as_attachment_remove_actions', function( ) {
// ... your code here
}, 10, 0 );
Parameters
Parameter |
Type |
Description |
Usage
add_action( 'media_library_organizer_filesystem_add_file_as_attachment_restore_actions', function( ) {
// ... your code here
}, 10, 0 );
Parameters
Parameter |
Type |
Description |
$post |
Unknown |
N/A |
Usage
add_action( 'media_library_organizer_pro_bqe_output_quick_edit_hidden_data', function( $post ) {
// ... your code here
}, 10, 1 );
Overview
Output Bulk Edit Fields
Parameters
Parameter |
Type |
Description |
$post_type_object |
WP_PostType |
Post Type |
Usage
add_action( 'media_library_organizer_pro_bqe_output_bulk_edit_fields', function( $post_type_object ) {
// ... your code here
}, 10, 1 );
Overview
Output Quick Edit Fields for an Attachment
Parameters
Parameter |
Type |
Description |
$post_type_object |
WP_PostType |
Post Type |
Usage
add_action( 'media_library_organizer_pro_bqe_output_quick_edit_fields', function( $post_type_object ) {
// ... your code here
}, 10, 1 );
Overview
Runs actions immediately after an Attachment has been quick edited, with edits saved.
Parameters
Parameter |
Type |
Description |
$post_args |
array |
Attachment Key / Value Pairs. |
$post |
WP_Post |
Attachment Post. |
$post_data |
array |
$_POST['data']. |
Usage
add_action( 'media_library_organizer_bqe_ajax_update', function( $post_args, $post, $post_data ) {
// ... your code here
}, 10, 3 );
Parameters
Parameter |
Type |
Description |
Usage
add_action( 'media_library_organizer_bqe_bulk_actions_list_enqueue_scripts', function( ) {
// ... your code here
}, 10, 0 );
Parameters
Parameter |
Type |
Description |
Usage
add_action( 'media_library_organizer_bqe_bulk_actions_list_enqueue_css', function( ) {
// ... your code here
}, 10, 0 );
Parameters
Parameter |
Type |
Description |
$action |
Unknown |
N/A |
$post_ids |
Unknown |
N/A |
Usage
add_action( 'media_library_organizer_bqe_bulk_actions_list_handle_bulk_actions', function( $action, $post_ids ) {
// ... your code here
}, 10, 2 );
Parameters
Parameter |
Type |
Description |
$post_ids |
Unknown |
N/A |
Usage
add_action( 'media_library_organizer_bqe_bulk_actions_list_handle_bulk_actions_ action', function( $post_ids ) {
// ... your code here
}, 10, 1 );
Parameters
Parameter |
Type |
Description |
Usage
add_action( 'media_library_organizer_bqe_bulk_actions_list_output_bulk_action_view', function( ) {
// ... your code here
}, 10, 0 );
Overview
Handles row actions in the List View
Parameters
Parameter |
Type |
Description |
$action |
string |
Action. |
$id |
int |
Attachment ID. |
Usage
add_action( 'media_library_organizer_bqe_quick_edit_handle_quick_edit_actions', function( $action, $id ) {
// ... your code here
}, 10, 2 );
Overview
Handles the specified row action in the List View
Parameters
Parameter |
Type |
Description |
$id |
int |
Attachment ID. |
Usage
add_action( 'media_library_organizer_bqe_quick_edit_handle_quick_edit_actions_ action', function( $id ) {
// ... your code here
}, 10, 1 );
Parameters
Parameter |
Type |
Description |
Usage
add_action( 'media_library_organizer_bqe_quick_edit_enqueue_scripts', function( ) {
// ... your code here
}, 10, 0 );
Overview
Enqueues JS if we're on the Media Grid view.
Parameters
Parameter |
Type |
Description |
$screen |
obj |
get_current_screen(). |
$screens |
array |
Available Plugin Screens. |
$mode |
string |
Media View Mode (list|grid). |
$ext |
string |
If defined, loads minified JS. |
Usage
add_action( 'media_library_organizer_bqe_bulk_actions_grid_enqueue_scripts', function( $screen, $screens, $mode, $ext ) {
// ... your code here
}, 10, 4 );
Parameters
Parameter |
Type |
Description |
Usage
add_action( 'media_library_organizer_bqe_bulk_actions_grid_enqueue_css', function( ) {
// ... your code here
}, 10, 0 );