current_theme_supports-{$feature}

current_theme_supports-{$feature}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('current_theme_supports-{$feature}') is found 2 times:

  • /wp-includes/theme.php line 3174
    3171
    3172
    3173
    3174
    3175
    3176
    3177
    3178
    3179
    3180
    // If no args passed then no extra checks need to be performed.
    if ( ! $args ) {
        /** This filter is documented in wp-includes/theme.php */
        return apply_filters( "current_theme_supports-{$feature}", true, $args, $_wp_theme_features[ $feature ] ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    }
     
    switch ( $feature ) {
        case 'post-thumbnails':
            /*
             * post-thumbnails can be registered for only certain content/post types
  • /wp-includes/theme.php line 3220
    3216
    3217
    3218
    3219
    3220
    3221
    3222
    3223
    3224
    3225
    3226
         * @param bool   $supports Whether the active theme supports the given feature. Default true.
         * @param array  $args     Array of arguments for the feature.
         * @param string $feature  The theme feature.
         */
        return apply_filters( "current_theme_supports-{$feature}", true, $args, $_wp_theme_features[ $feature ] ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    }
     
    /**
     * Checks a theme's support for a given feature before loading the functions which implement it.
     *
     * @since 2.9.0