Runs when the plugin is activated.
do_action( 'snapwp_helper/activate' );Fires before any GraphQL types are registered.
do_action( 'snapwp_helper/graphql/init/register_types' );Fires after all GraphQL types are registered.
do_action( 'snapwp_helper/graphql/init/after_register_types' );Runs when the plugin is initialized.
do_action( 'snapwp_helper/init', \SnapWP\Helper\Main $instance );$instance(\SnapWP\Helper\Main): The main plugin class instance.
Filters the list of registered classes for a specific GraphQL Type. Classes must implement the SnapWP\Helper\Interfaces\GraphQLType interface.
{type} can be one of the following:
enum: Enum Typeinput: Input Typeinterface: Interface Typeobject: Object Typefield: Fields on an Existing Typeconnection: Relay-compliant Connection Typemutation: Mutation Type
apply_filters( 'snapwp_helper/graphql/init/registered_enum_classes', array $registered_classes );
apply_filters( 'snapwp_helper/graphql/init/registered_input_classes', array $registered_classes );
apply_filters( 'snapwp_helper/graphql/init/registered_interface_classes', array $registered_classes );
apply_filters( 'snapwp_helper/graphql/init/registered_object_classes', array $registered_classes );
apply_filters( 'snapwp_helper/graphql/init/registered_field_classes', array $registered_classes );
apply_filters( 'snapwp_helper/graphql/init/registered_connection_classes', array $registered_classes );
apply_filters( 'snapwp_helper/graphql/init/registered_mutation_classes', array $registered_classes );$registered_classes(class-string<\SnapWP\Helper\Interfaces\GraphQLType>[]): An array of fully-qualified GraphQL Type class-names.
When this filter return anything other than null, it will be used as a resolved node and the execution will be skipped. This is to be used in extensions to resolve their own templates which might not use WordPress permalink structure.
apply_filters( 'snapwp_helper/graphql/resolve_template_uri', mixed|null $node, string $uri, \WPGraphQL\AppContext $context, \WP $wp, array|string $extra_query_vars );$node(mixed|null): The node, defaults to nothing.$uri(string): The URI being searched.$content(\WPGraphQL\AppContext): The app context.$wp(\WP object): The WP object instance.$extra_query_vars(array<string, mixed>|string): Any extra query vars to consider.
Filters the list of module classes to be loaded.
apply_filters( 'snapwp_helper/init/module_classes', array $module_classes );$module_classes(class-string<\SnapWP\Helper\Interfaces\Module>[]): An array of fully-qualified Module class-names to load.
Filters the array of external dependencies (e.g. WordPress plugins) required by the plugin.
apply_filters( 'snapwp_helper/dependencies/registered_dependencies', array $dependencies );$dependencies(array): An array of dependencies. Each element in the array is an associative array with the following keysslug(string): A unique slug to identify the dependency. E.g. Plugin slug.name(string): The pretty name of the dependency used in the admin notice.check_callback(callable(): true|\WP_Error): A callable that returns true if the dependency is met, or aWP_Errorobject (with an explicit error message) if the dependency is not met.
This filter allows you to modify the list of environment variables used by SnapWP's frontend framework.
apply_filters( 'snapwp_helper/env/variables', array $variables );-
$variables(array<string,array{description:string,default:string,required:bool}>): This array contains the details of the environment variables, keyed to the variable name. Each item provides the following information:description(string): A brief explanation of what the variable controls or configures.default(string): The default value assigned to the variable if not set explicitly.required(bool): Whether the variable is mandatory for proper functionality.
Filters the list of plugins to be updated using the Plugin Updater.
apply_filters( 'snapwp_helper/plugin_updater/plugins', array $plugins );-
$plugins(array{slug, update_uri}[]): An array of plugins to be checked for updates. Each element in the array is an associative array with the following keys:slug(string): The qualified plugin slug with its folder. E.g. 'wp-graphql-my-plugin/wp-graphql-my-plugin.php'.update_uri(string): The URI used to check for plugin updates.
Filters the capability required to access the SnapWP Helper admin screen and make any dashboard-related changes.
apply_filters( 'snapwp_helper/admin/capability', string $capability );$capability(string): The capability required to access the SnapWP Helper admin screen and make any dashboard-related changes. Default ismanage_options.