Standartize some filter names. Adds link to docs. Removes unused cypress.json.
This commit is contained in:
parent
215cd2555c
commit
273875d3f4
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"projectId": "tubzok",
|
||||
"videoRecording": false,
|
||||
"viewportWidth": 1280,
|
||||
"viewportHeight": 720
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
You can find all of Tainacan documentation in our Wiki: [https://wiki.tainacan.org](https://wiki.tainacan.org)
|
|
@ -40,7 +40,7 @@ class Elastic_Press {
|
|||
//activates the inclusion of the complete hierarchy of terms.
|
||||
add_filter('ep_sync_terms_allow_hierarchy', '__return_true');
|
||||
|
||||
add_filter('tainacan_fetch_args', [$this, 'filter_args'], 10, 2);
|
||||
add_filter('tainacan-fetch-args', [$this, 'filter_args'], 10, 2);
|
||||
add_filter('tainacan-api-items-filters-response', function($filters) { return $this->last_aggregations; });
|
||||
|
||||
add_filter('tainacan-fetch-all-metadatum-values', [$this, 'fetch_all_metadatum_values'], 10, 3);
|
||||
|
|
|
@ -162,7 +162,7 @@ class CSV extends Exporter {
|
|||
$last_id = get_post_meta( $item_id, '_user_edit_lastr', true );
|
||||
if ( $last_id ) {
|
||||
$last_user = get_userdata( $last_id );
|
||||
return apply_filters( 'the_modified_author', $last_user->display_name );
|
||||
return apply_filters( 'tainacan-the-modified-author', $last_user->display_name );
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ abstract class Exporter {
|
|||
}
|
||||
|
||||
public function get_step_length_items() {
|
||||
return apply_filters('exporter_step_length_items', 20, $this->get_current_step());
|
||||
return apply_filters('tainacan-exporter-step-length-items', 20, $this->get_current_step());
|
||||
}
|
||||
|
||||
public function set_current_collection_item($value) {
|
||||
|
|
|
@ -379,7 +379,7 @@ class Collections extends Repository {
|
|||
|
||||
// TODO: Pegar coleções registradas via código
|
||||
|
||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'collections' );
|
||||
$args = apply_filters( 'tainacan-fetch-args', $args, 'collections' );
|
||||
|
||||
$wp_query = new \WP_Query( $args );
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ class Filters extends Repository {
|
|||
|
||||
$args['post_type'] = Entities\Filter::get_post_type();
|
||||
|
||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'filters' );
|
||||
$args = apply_filters( 'tainacan-fetch-args', $args, 'filters' );
|
||||
|
||||
$wp_query = new \WP_Query( $args );
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ class Items extends Repository {
|
|||
$args = $this->parse_relationship_metaquery($args);
|
||||
}
|
||||
|
||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'items' );
|
||||
$args = apply_filters( 'tainacan-fetch-args', $args, 'items' );
|
||||
|
||||
$should_filter = is_user_logged_in() && sizeof($cpt) > 1;
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ class Logs extends Repository {
|
|||
|
||||
$args['post_type'] = Entities\Log::get_post_type();
|
||||
|
||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'logs' );
|
||||
$args = apply_filters( 'tainacan-fetch-args', $args, 'logs' );
|
||||
|
||||
$wp_query = new \WP_Query( $args );
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ class Metadata_Sections extends Repository {
|
|||
|
||||
$args = $this->parse_fetch_args( $args );
|
||||
$args['post_type'] = Entities\Metadata_Section::get_post_type();
|
||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'metadata-section' );
|
||||
$args = apply_filters( 'tainacan-fetch-args', $args, 'metadata-section' );
|
||||
|
||||
$wp_query = new \WP_Query( $args );
|
||||
|
||||
|
|
|
@ -376,7 +376,7 @@ class Metadata extends Repository {
|
|||
|
||||
$args['post_type'] = Entities\Metadatum::get_post_type();
|
||||
|
||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'metadata' );
|
||||
$args = apply_filters( 'tainacan-fetch-args', $args, 'metadata' );
|
||||
|
||||
|
||||
$wp_query = new \WP_Query( $args );
|
||||
|
|
|
@ -191,7 +191,7 @@ class Taxonomies extends Repository {
|
|||
|
||||
$args['post_type'] = Entities\Taxonomy::get_post_type();
|
||||
|
||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'taxonomies' );
|
||||
$args = apply_filters( 'tainacan-fetch-args', $args, 'taxonomies' );
|
||||
|
||||
$wp_query = new \WP_Query( $args );
|
||||
|
||||
|
|
|
@ -294,8 +294,6 @@ class Admin {
|
|||
|
||||
$tainacan_admin_i18n['entities_labels'] = $entities_labels;
|
||||
|
||||
$components = ( has_filter( 'tainacan_register_web_components' ) ) ? apply_filters( 'tainacan_register_web_components' ) : [];
|
||||
|
||||
$cur_user = wp_get_current_user();
|
||||
$user_caps = array();
|
||||
$prefs = array();
|
||||
|
@ -312,7 +310,6 @@ class Admin {
|
|||
'wp_api_url' => esc_url_raw( rest_url() ) . 'wp/v2/',
|
||||
'wp_ajax_url' => admin_url( 'admin-ajax.php' ),
|
||||
'nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : false,
|
||||
'components' => $components,
|
||||
'classes' => array(),
|
||||
'i18n' => $tainacan_admin_i18n,
|
||||
'user_caps' => $user_caps,
|
||||
|
@ -392,7 +389,10 @@ class Admin {
|
|||
|
||||
function admin_page() {
|
||||
global $TAINACAN_BASE_URL;
|
||||
|
||||
// @deprecated: use tainacan-admin-ui-options instead
|
||||
$admin_options = apply_filters('set_tainacan_admin_options', $_GET);
|
||||
$admin_options = apply_filters('tainacan-admin-ui-options', $_GET);
|
||||
$admin_options = json_encode($admin_options);
|
||||
// TODO move it to a separate file and start the Vue project
|
||||
echo "<div id='tainacan-admin-app' data-module='admin' data-options='$admin_options'></div>";
|
||||
|
|
Loading…
Reference in New Issue