icon_dir

icon_dir

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

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('icon_dir') is found 3 times:

  • /wp-includes/deprecated.php line 1917
    	} elseif ( $src = wp_mime_type_icon( $post->ID, '.svg' ) ) {
    		// No thumb, no image. We'll look for a mime-related icon instead.
    
    		/** This filter is documented in wp-includes/post.php */
    		$icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' );
    		$src_file = $icon_dir . '/' . wp_basename($src);
    	}
    
    	if ( !isset($src) || !$src )
    		return false;
    
    
  • /wp-includes/media.php line 979
    			$src = wp_mime_type_icon( $attachment_id, '.svg' );
    
    			if ( $src ) {
    				/** This filter is documented in wp-includes/post.php */
    				$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
    
    				$src_file = $icon_dir . '/' . wp_basename( $src );
    
    				list( $width, $height ) = wp_getimagesize( $src_file );
    
    				$ext = strtolower( substr( $src_file, -4 ) );
    
  • /wp-includes/post.php line 7088
    			 * @since 2.0.0
    			 *
    			 * @param string $path Icon directory absolute path.
    			 */
    			$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
    
    			/**
    			 * Filters the icon directory URI.
    			 *
    			 * @since 2.0.0
    			 *