jetpack_ai_enabled

jetpack_ai_enabled

Hook Type: filter

See hook in core

Displaying hooks found in version: jetpack.14.5

apply_filters('jetpack_ai_enabled') is found 11 times:

  • /_inc/lib/class-jetpack-ai-helper.php line 108
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
         * @since 11.8
         *
         * @param bool $default Are AI features enabled? Defaults to false.
         */
        return apply_filters( 'jetpack_ai_enabled', $default );
    }
     
    /**
     * Return true if the AI chat feature should be active on the current site.
     *
     * @todo IS_WPCOM (the endpoints need to be updated too).
  • /class.jetpack-gutenberg.php line 726
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
        wp_enqueue_style( 'recoleta-font', '//s1.wp.com/i/fonts/recoleta/css/400.min.css', array(), Constants::get_constant( 'JETPACK__VERSION' ) );
    }
    // AI Assistant
    $ai_assistant_state = array(
        'is-enabled' => apply_filters( 'jetpack_ai_enabled', true ),
    );
     
    $screen_base = null;
    if ( function_exists( 'get_current_screen' ) ) {
        $screen_base = get_current_screen()->base;
    }
  • /extensions/blocks/ai-assistant/ai-assistant.php line 28
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    function register_block() {
        if (
        ( ( new Host() )->is_wpcom_simple()
            || ! ( new Status() )->is_offline_mode()
        ) && apply_filters( 'jetpack_ai_enabled', true )
        ) {
            Blocks::jetpack_register_block(
                __DIR__,
                array( 'render_callback' => __NAMESPACE__ . '\load_assets' )
            );
        }
  • /extensions/blocks/ai-assistant/ai-assistant.php line 115
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    */
    add_action(
        'jetpack_register_gutenberg_extensions',
        function () {
            if ( apply_filters( 'jetpack_ai_enabled', true ) ) {
                Jetpack_Gutenberg::set_extension_available( 'ai-assistant-support' );
                Jetpack_Gutenberg::set_extension_available( 'ai-assistant-form-support' );
                Jetpack_Gutenberg::set_extension_available( 'ai-content-lens' );
                Jetpack_Gutenberg::set_extension_available( 'ai-assistant-backend-prompts' );
                Jetpack_Gutenberg::set_extension_available( 'ai-assistant-usage-panel' );
                Jetpack_Gutenberg::set_extension_available( 'ai-featured-image-generator' );
  • /extensions/blocks/ai-assistant/ai-assistant.php line 149
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    */
    add_action(
        'jetpack_register_gutenberg_extensions',
        function () {
            if ( apply_filters( 'jetpack_ai_enabled', true ) &&
                apply_filters( 'list_to_table_transform_enabled', false )
            ) {
                \Jetpack_Gutenberg::set_extension_available( 'ai-list-to-table-transform' );
            }
        }
    );
  • /extensions/blocks/ai-assistant/ai-assistant.php line 163
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    */
    add_action(
        'jetpack_register_gutenberg_extensions',
        function () {
            if ( apply_filters( 'jetpack_ai_enabled', true ) &&
                apply_filters( 'ai_response_feedback_enabled', true )
            ) {
                \Jetpack_Gutenberg::set_extension_available( 'ai-response-feedback' );
            }
        }
    );
  • /extensions/blocks/ai-assistant/ai-assistant.php line 177
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    */
    add_action(
        'jetpack_register_gutenberg_extensions',
        function () {
            if ( apply_filters( 'jetpack_ai_enabled', true ) &&
                apply_filters( 'ai_seo_assistant_enabled', false )
            ) {
                \Jetpack_Gutenberg::set_extension_available( 'ai-seo-assistant' );
            }
        }
    );
  • /extensions/blocks/ai-assistant/ai-assistant.php line 191
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    */
    add_action(
        'jetpack_register_gutenberg_extensions',
        function () {
            if ( apply_filters( 'jetpack_ai_enabled', true ) &&
                apply_filters( 'ai_chrome_ai_enabled', false )
            ) {
                \Jetpack_Gutenberg::set_extension_available( 'ai-use-chrome-ai-sometimes' );
                add_chrome_ai_token_headers();
            }
        }
  • /extensions/blocks/voice-to-content/voice-to-content.php line 26
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    * Register the block only if we are on an A8C P2 site.
     * TODO: when opening it to Jetpack sites, do the same checks
     * we do on the AI Assistant block: the jetpack_ai_enabled filter
     * and the Jetpack connection:
     * - apply_filters( 'jetpack_ai_enabled', true )
     * - ( new Host() )->is_wpcom_simple() || ! ( new Status() )->is_offline_mode()
     */
    if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
        if ( function_exists( 'wpcom_is_automattic_p2_site' ) && wpcom_is_automattic_p2_site() ) {
            Blocks::jetpack_register_block(
                __DIR__,
  • /extensions/plugins/ai-assistant-plugin/ai-assistant-plugin.php line 31
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
            (
                new Host() )->is_wpcom_simple()
                || ( ( new Connection_Manager( 'jetpack' ) )->has_connected_owner() && ! ( new Status() )->is_offline_mode()
            )
            && apply_filters( 'jetpack_ai_enabled', true )
        ) {
            // Register AI assistant plugin.
            \Jetpack_Gutenberg::set_extension_available( FEATURE_NAME );
        }
    }
    add_action( 'jetpack_register_gutenberg_extensions', __NAMESPACE__ . '\register_plugin' );
  • /jetpack_vendor/automattic/jetpack-external-media/src/class-external-media.php line 86
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
        return array(
            'wpcomBlogId'         => $blog_id,
            'pluginBasePath'      => plugins_url( '', Constants::get_constant( 'JETPACK__PLUGIN_FILE' ) ),
            'ai-assistant'        => array(
                'is-enabled' => apply_filters( 'jetpack_ai_enabled', $jetpack_ai_enabled ),
            ),
            'next40pxDefaultSize' => self::site_supports_next_default_size(),
        );
    }
     
    /**