wp_stateless_rest_api_root

wp_stateless_rest_api_root

Appears in:
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wp-stateless.4.1.2

apply_filters('wp_stateless_rest_api_root') is found 2 times:

  • /lib/classes/class-bootstrap.php line 1272
            wp_localize_script('wp-stateless', 'stateless_l10n', $this->get_l10n_data());
            wp_localize_script('wp-stateless', 'wp_stateless_configs', array(
              'WP_DEBUG' => defined('WP_DEBUG') ? WP_DEBUG : false,
              'REST_API_TOKEN' => Utility::generate_jwt_token(['user_id' => get_current_user_id()], DAY_IN_SECONDS),
              'api_root' => apply_filters( 'wp_stateless_rest_api_root', '' ),
              'ajaxurl' => admin_url( 'admin-ajax.php' ),
              'stateless_check_ajax_nonce' => wp_create_nonce('stateless_check_ajax'),
              'text_ok' => __('Ok', ud_get_stateless_media()->domain),
              'text_fail' => __('Fail', ud_get_stateless_media()->domain),
            ));
    
    
  • /lib/classes/class-bootstrap.php line 1293
            wp_register_script('wp-stateless-batch', ud_get_stateless_media()->path('static/scripts/wp-stateless-batch.js', 'url'), array('wp-api-request'), self::$version, true);
            wp_localize_script('wp-stateless-batch', 'wp_stateless_batch', array(
              'REST_API_TOKEN' => Utility::generate_jwt_token(['user_id' => get_current_user_id()], DAY_IN_SECONDS),
              'is_running' => BatchTaskManager::instance()->is_running(),
              'api_root' => apply_filters( 'wp_stateless_rest_api_root', '' ),
            ));
          }
    
          /**
           * Get_l10n_data
           *
    

See this hook used in plugins: