Foundation
in package
This class handles various aspects related to the security of the theme.
Table of Contents
Methods
- are_image_libraries_installed() : bool
- Checks if the required image libraries are installed.
- cc_mime_types() : array<string|int, mixed>
- Add SVG mime types to WordPress.
- change_login_logo() : void
- Change the login logo based on the foundation_login_logo_url option.
- custom_wp_head() : void
- Adds custom meta data to the wp_head action.
- featured_to_rss() : string
- Adds featured image to RSS feeds, with a fallback if not set.
- fix_svg() : void
- Adds inline styles for SVG images in the admin panel.
- fix_svg_check() : array<string|int, mixed>
- Fixes file type and ext for SVG uploads.
- generate_theme_thumbnail() : void
- Generates a thumbnail for the theme.
- register() : void
- Registers various hooks and functionalities for the foundation class.
- remove_gallery_css() : string
- Removes gallery CSS from the given CSS string.
Methods
are_image_libraries_installed()
Checks if the required image libraries are installed.
public
are_image_libraries_installed() : bool
Return values
bool —True if the required libraries are installed, false otherwise.
cc_mime_types()
Add SVG mime types to WordPress.
public
static cc_mime_types(array<string|int, mixed> $mimes) : array<string|int, mixed>
Parameters
- $mimes : array<string|int, mixed>
-
An array of allowed mime types.
Return values
array<string|int, mixed> —Modified array of mime types.
change_login_logo()
Change the login logo based on the foundation_login_logo_url option.
public
change_login_logo() : void
custom_wp_head()
Adds custom meta data to the wp_head action.
public
static custom_wp_head() : void
featured_to_rss()
Adds featured image to RSS feeds, with a fallback if not set.
public
featured_to_rss(string $content) : string
Parameters
- $content : string
-
The existing RSS feed content.
Return values
string —Modified RSS feed content.
fix_svg()
Adds inline styles for SVG images in the admin panel.
public
static fix_svg() : void
fix_svg_check()
Fixes file type and ext for SVG uploads.
public
static fix_svg_check(array<string|int, mixed> $checked, string $file, string $filename, array<string|int, mixed> $mimes) : array<string|int, mixed>
Parameters
- $checked : array<string|int, mixed>
-
An array of mime type keys and values.
- $file : string
-
Full path to the file.
- $filename : string
-
The name of the file (may differ from $file due to $file being in a tmp directory).
- $mimes : array<string|int, mixed>
-
An array of allowed mime types.
Return values
array<string|int, mixed> —Modified array of mime type keys and values.
generate_theme_thumbnail()
Generates a thumbnail for the theme.
public
static generate_theme_thumbnail() : void
register()
Registers various hooks and functionalities for the foundation class.
public
register() : void
remove_gallery_css()
Removes gallery CSS from the given CSS string.
public
static remove_gallery_css(string $css) : string
Parameters
- $css : string
-
Existing CSS.
Return values
string —Modified CSS.