initialize()
mla_attachment_array_fetch_references()
mla_count_list_table_items()
mla_custom_field_option_value()
mla_fetch_attachment_metadata()
mla_fetch_attachment_parent_data()
mla_fetch_attachment_references()
mla_flush_mla_galleries()
mla_get_sortable_columns()
mla_localize_default_columns_array()
mla_query_list_table_items()
mla_query_media_modal_items()
mla_query_posts_clauses_filter()
mla_query_posts_clauses_request_filter()
mla_query_posts_groupby_filter()
mla_query_posts_join_filter()
mla_query_posts_orderby_filter()
mla_query_posts_search_filter()
mla_query_posts_where_filter()
mla_query_relevanssi_admin_search_ok_filter()
mla_query_relevanssi_prevent_default_request_filter()
mla_query_terms_clauses_filter()
mla_search_terms_tidy()
_execute_list_table_query()
_match_quoted_phrase()
_prepare_list_table_query()
_wildcard_search_string()
$default_columns
$default_hidden_columns
$default_sortable_columns
$query_parameters
$search_parameters
$wp_4dot0_plus
$mla_list_table_items
MLA_ALT_TEXT_SUBQUERY
MLA_ORDERBY_SUBQUERY
MLA_TABLE_VIEW_SUBQUERY
Class MLA (Media Library Assistant) Query provides database query support for MLA Ajax, Shortcode and Admin needs
package | Media Library Assistant |
---|---|
since | 2.20 |
initialize()
since | 0.1 |
---|
mla_count_list_table_items(array $request, int $offset, int $count) : integer
since | 0.30 |
---|
array
Query variables, e.g., from $_REQUEST
int
(optional) number of rows to skip over to reach desired page
int
(optional) number of rows on each page
integer
Number of attachment postsmla_custom_field_option_value(string $slug) : array
since | 1.10 |
---|
string
slug, e.g., 'c_File Size' for the 'File Size' field
array
option value, e.g., array( 'name' => 'File Size', ... )mla_flush_mla_galleries(string $option_name) : void
since | 1.00 |
---|
string
name of the gallery's cache/option variable
mla_get_sortable_columns() : array
since | 0.30 |
---|
array
name => array( orderby value, heading ) for sortable columnsmla_localize_default_columns_array()
Called from MLATest::initialize because the $default_columns information might be accessed from "front end" posts/pages.
since | 1.71 |
---|
mla_query_list_table_items(array $request, int $offset, int $count) : array
Supports prepare_items in class-mla-list-table.php. Modeled after wp_edit_attachments_query in wp-admin/post.php
since | 0.1 |
---|
array
query parameters from web page, usually found in $_REQUEST
int
number of rows to skip over to reach desired page
int
number of rows on each page
array
attachment objects (posts) including parent data, meta data and referencesmla_query_media_modal_items(array $request, int $offset, int $count) : object
Supports month-year and taxonomy-term filters as well as the enhanced search box
since | 1.20 |
---|
array
query parameters from Media Manager
int
number of rows to skip over to reach desired page
int
number of rows on each page
object
WP_Query object with query resultsmla_query_posts_clauses_filter(array $pieces) : array
This is for debug purposes only. Defined as public because it's a filter.
since | 1.80 |
---|
array
query clauses before modification
array
query clauses after modification (none)mla_query_posts_clauses_request_filter(array $pieces) : array
This is for debug purposes only. Defined as public because it's a filter.
since | 1.80 |
---|
array
query clauses before modification
array
query clauses after modification (none)mla_query_posts_groupby_filter(string $groupby_clause) : string
Taxonomy text queries and postmeta queries can return multiple results for the same ID. Defined as public because it's a filter.
since | 1.90 |
---|
string
query clause before modification
string
updated query clausemla_query_posts_join_filter(string $join_clause) : string
Defined as public because it's a filter.
since | 0.30 |
---|
string
query clause before modification
string
query clause after "LEFT JOIN view ON post_id" item modificationmla_query_posts_orderby_filter(string $orderby_clause) : string
Expands the range of sort options because the logic in WP_Query is limited. Defined as public because it's a filter.
since | 0.30 |
---|
string
query clause before modification
string
updated query clausemla_query_posts_search_filter(string $search_string, object $query_object) : string
Defined as public because it's a filter.
since | 0.60 |
---|
string
query clause before modification
object
WP_Query object
string
query clause after keyword search additionmla_query_posts_where_filter(string $where_clause) : string
Modeled after _edit_attachments_query_helper in wp-admin/post.php. Defined as public because it's a filter.
since | 0.1 |
---|
string
query clause before modification
string
query clause after modificationmla_query_relevanssi_admin_search_ok_filter(boolean $admin_search_ok) : boolean
since | 1.80 |
---|
boolean
Default setting
boolean
Updated settingmla_query_relevanssi_prevent_default_request_filter(boolean $prevent) : boolean
since | 2.25 |
---|
boolean
Default setting
boolean
Updated settingmla_query_terms_clauses_filter(array $pieces, array $taxonomies, array $args)
Defined as public because it's a filter.
since | 2.13 |
---|
array
Terms query SQL clauses.
array
An array of taxonomies.
array
An array of terms query arguments.
mla_search_terms_tidy(string $term) : string
Defined as public because it's a callback from array_map().
since | 1.51 |
---|
string
search term before modification
string
cleaned up search term_execute_list_table_query(array $request) : object
since | 0.30 |
---|
array
query parameters from web page, usually found in $_REQUEST
object
WP_Query object with query results_match_quoted_phrase(string $needle, string $haystack) : boolean
Eliminates matches such as "man" in "woman".
since | 2.11 |
---|
string
the quoted phrase (without enclosing quotes)
string
the entire term
boolean
$needle is a word match within $haystack_prepare_list_table_query(array $raw_request, int $offset, int $count) : array
Prepare the arguments for WP_Query. Modeled after wp_edit_attachments_query in wp-admin/post.php
since | 0.1 |
---|
array
query parameters from web page, usually found in $_REQUEST
int
Optional number of rows (default 0) to skip over to reach desired page
int
Optional number of rows on each page (0 = all rows, default)
array
revised arguments suitable for WP_Query_wildcard_search_string(string $search_string) : boolean
Defined as public because it's a callback from array_map().
since | 2.13 |
---|
string
search string
boolean
true if wildcard$default_columns : array
This array defines table columns and titles where the key is the column slug (and class) and the value is the column's title text. If you need a checkbox for bulk actions, use the special slug "cb".
The 'cb' column is treated differently than the rest. If including a checkbox column in your table you must create a column_cb() method. If you don't need bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
All of the columns are added to this array by MLA_List_Table::mla_admin_init_action.
since | 0.1 |
---|
$default_hidden_columns : array
This array is used when the user-level option is not set, i.e., the user has not altered the selection of hidden columns.
The value on the right-hand side must match the column slug, e.g., array(0 => 'ID_parent, 1 => 'title_name').
Taxonomy and custom field columns are added to this array by MLA_List_Table::mla_admin_init_action.
since | 0.1 |
---|
$default_sortable_columns : array
This array defines the table columns that can be sorted. The array key is the column slug that needs to be sortable, and the value is database column to sort by. Often, the key and value will be the same, but this is not always the case (as the value is a column name from the database, not the list table).
The array value also contains a boolean which is 'true' if the initial sort order for the column is DESC/Descending.
Taxonomy and custom field columns are added to this array by MLA_List_Table::mla_admin_init_action.
since | 0.1 |
---|
$query_parameters : array
This array defines parameters for the query's join, where and orderby filters. The parameters are set up in the _prepare_list_table_query function, and any further logic required to translate those values is contained in the filters.
Array index values are: use_alt_text_view, use_postmeta_view, use_orderby_view, alt_text_value, postmeta_key, postmeta_value, patterns, detached, orderby, order, mla-metavalue, debug (also in search_parameters)
since | 0.30 |
---|
$search_parameters : array
This array defines parameters for the query's posts_search filter, which uses 'search_string' to add a clause to the query's WHERE clause. It is shared between the list_table-query functions here and the mla_get_shortcode_attachments function in class-mla-shortcodes.php. This array passes the relevant parameters to the filter.
Array index values are: ['mla_terms_search']['phrases'] ['mla_terms_search']['taxonomies'] ['mla_terms_search']['radio_phrases'] => AND/OR ['mla_terms_search']['radio_terms'] => AND/OR ['s'] => numeric for ID/parent search ['mla_search_fields'] => 'content', 'title', 'excerpt', 'alt-text', 'name', 'terms' Note: 'alt-text' is not supported in [mla_gallery] ['mla_search_connector'] => AND/OR ['sentence'] => entire string must match as one "keyword" ['exact'] => entire string must match entire field value ['debug'] => internal element, console/log/shortcode/none ['tax_terms_count'] => internal element, shared with JOIN and GROUP BY filters
since | 2.00 |
---|
$wp_4dot0_plus : boolean
since | 2.13 |
---|
$mla_list_table_items : array
since | 1.40 |
---|
MLA_ALT_TEXT_SUBQUERY
The subquery is used to filter the Media/Assistant submenu table by ALT Text with the Search Media text box.
since | 0.40 |
---|
MLA_ORDERBY_SUBQUERY
The subquery is used to sort the Media/Assistant submenu table on ALT Text and custom field columns.
since | 2.15 |
---|
MLA_TABLE_VIEW_SUBQUERY
The SQL View is used to filter the Media/Assistant submenu table on custom field Table Views.
since | 2.15 |
---|