*/ protected function input_properties(): array { return array(); } /** * @since 0.0.34 * @return array */ protected function required_input(): array { return array(); } /** * @since 0.0.34 * @return array */ protected function output_properties(): array { return array( 'header' => array( 'type' => 'string' ), 'body' => array( 'type' => 'string' ), 'footer' => array( 'type' => 'string' ), 'option_keys' => array( 'type' => 'object', 'additionalProperties' => true, 'description' => __( 'The option name backing each slot, for use with the Configuration tools.', 'acrossai-abilities-manager' ), ), 'body_supported' => array( 'type' => 'boolean', 'description' => __( 'Whether the active theme calls wp_body_open. When false the body script is stored but never rendered.', 'acrossai-abilities-manager' ), ), ); } /** * @since 0.0.34 * @return array */ protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true ); } /** * @since 0.0.34 * @param array $input Input. * @return array|WP_Error */ protected function run( array $input ) { $scripts = Snippet_Repository::global_scripts(); return array_merge( $scripts, array( 'option_keys' => Snippet_Repository::GLOBAL_KEYS, 'body_supported' => (bool) current_theme_supports( 'wp-body-open' ) || did_action( 'wp_body_open' ) > 0, ) ); } }