0190-filters-graphql-object-visibility
title: graphql_object_visibility hookType: filter hookGroup: models plugin: wp-graphql
graphql_object_visibility
apply_filters( 'graphql_object_visibility', $this->visibility, $this->get_model_name(), $this->data, $this->owner, $this->current_user );
Filter the visibility name to be returned
- Type: filter
- Group: Model Layer
- Since: 0.3.0
- Source File:
plugins/wp-graphql/src/Model/Model.php
Parameters
$visibility(string|null): The visibility that has currently been set for the data at this point$model_name(string): Name of the model the filter is currently being executed in$data(TData): The un-modeled incoming data$owner(int|null): The user ID for the owner of this piece of data$current_user(\WP_User): The current user for the session
Source
apply_filters( 'graphql_object_visibility', $this->visibility, $this->get_model_name(), $this->data, $this->owner, $this->current_user );
Related
Model::get_visibility()inplugins/wp-graphql/src/Model/Model.php:284
Recipes
这篇文档对你有帮助吗?
谢谢你的反馈!