Astra_Builder_UI_Controller::fetch_svg_icon( string $icon = '', bool $base = true )
Get an SVG Icon
Description
Parameters
- $icon
-
(string) (Optional) the icon name.
Default value: ''
- $base
-
(bool) (Optional) if the baseline class should be added.
Default value: true
Source
File: inc/builder/controllers/class-astra-builder-ui-controller.php
public static function fetch_svg_icon( $icon = '', $base = true ) { $output = '<span class="ahfb-svg-iconset ast-inline-flex' . ( $base ? ' svg-baseline' : '' ) . '">'; if ( ! self::$ast_svgs ) { ob_start(); include_once ASTRA_THEME_DIR . 'assets/svg/svgs.json'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound self::$ast_svgs = json_decode( ob_get_clean(), true ); self::$ast_svgs = apply_filters( 'astra_svg_icons', self::$ast_svgs ); } $output .= isset( self::$ast_svgs[ $icon ] ) ? self::$ast_svgs[ $icon ] : ''; $output .= '</span>'; return $output; }
Expand full source code Collapse full source code View on Trac
Related
Used By
Used By | Description |
---|---|
inc/modules/posts-structures/customizer/class-astra-posts-special-archive-structures-configs.php: Astra_Posts_Special_Archive_Structures_Configs::register_configuration() |
Register Posts Structures Customizer Configurations. |
inc/customizer/configurations/builder/header/configs/mobile-trigger.php: astra_header_mobile_trigger_configuration() |
Register Header Trigger header builder Customizer Configurations. |
inc/modules/posts-structures/customizer/class-astra-posts-archive-structures-configs.php: Astra_Posts_Archive_Structures_Configs::get_new_content_layout_choices() |
Getting new content layout options dynamically. |
inc/modules/posts-structures/customizer/class-astra-posts-single-structures-configs.php: Astra_Posts_Single_Structures_Configs::get_new_content_layout_choices() |
Getting new content layout options dynamically. |
inc/modules/posts-structures/customizer/class-astra-posts-archive-structures-configs.php: Astra_Posts_Archive_Structures_Configs::get_layout_configuration() |
Register Archive Post’s Structures Customizer Configurations. |
inc/modules/posts-structures/customizer/class-astra-posts-archive-structures-configs.php: Astra_Posts_Archive_Structures_Configs::register_configuration() |
Register Posts Structures Customizer Configurations. |
inc/modules/posts-structures/customizer/class-astra-posts-single-structures-configs.php: Astra_Posts_Single_Structures_Configs::get_layout_configuration() |
Register Single Post’s Structures Customizer Configurations. |
inc/modules/posts-structures/customizer/class-astra-posts-single-structures-configs.php: Astra_Posts_Single_Structures_Configs::register_configuration() |
Register Posts Strctures Customizer Configurations. |
inc/compatibility/woocommerce/class-astra-woocommerce.php: Astra_Woocommerce::woocommerce_product_single_payments() |
Single Product Payments. |
inc/compatibility/woocommerce/class-astra-woocommerce.php: Astra_Woocommerce::modern_add_to_cart() |
Modern Design Add to cart Markup |
inc/builder/controllers/class-astra-builder-ui-controller.php: Astra_Builder_UI_Controller::render_banner_customizer_edit_button() |
Prepare Edit navigatory trigger for Banner Section in customizer. |
inc/compatibility/woocommerce/class-astra-woocommerce.php: Astra_Woocommerce::change_cart_close_icon() |
Change cart close icon. |
inc/compatibility/woocommerce/class-astra-woocommerce.php: Astra_Woocommerce::store_widgets_dynamic() |
Dynamic Store widgets. |
inc/builder/controllers/class-astra-builder-ui-controller.php: Astra_Builder_UI_Controller::render_mobile_cart_flyout_markup() |
Render Mobile Cart Flyout Markup. |
inc/builder/controllers/class-astra-builder-ui-controller.php: Astra_Builder_UI_Controller::render_account() |
Account HTML. |
inc/builder/controllers/class-astra-builder-ui-controller.php: Astra_Builder_UI_Controller::render_customizer_edit_button() |
Prepare Edit icon inside customizer. |
inc/builder/controllers/class-astra-builder-ui-controller.php: Astra_Builder_UI_Controller::render_grid_row_customizer_edit_button() |
Prepare Special Edit navigatory trigger for Builder Grid Rows in customizer. |
inc/builder/controllers/class-astra-builder-ui-controller.php: Astra_Builder_UI_Controller::render_mobile_trigger() |
Render Trigger Markup. |
inc/builder/controllers/class-astra-builder-ui-controller.php: Astra_Builder_UI_Controller::render_social_icon() |
Prepare Social Icon HTML. |
inc/core/builder/class-astra-builder-helper.php: Astra_Builder_Helper::render_mobile_popup_markup() |
Adds support to render Mobile Popup Markup. |
inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-configs.php: Astra_Breadcrumbs_Configs::register_configuration() |
Register Astra-Breadcrumbs Settings. |
inc/compatibility/edd/customizer/sections/class-astra-edd-sidebar-configs.php: Astra_Edd_Sidebar_Configs::register_configuration() |
Register Astra Easy Digital Downloads Sidebar Configurations. |
inc/compatibility/edd/customizer/sections/class-astra-edd-container-configs.php: Astra_Edd_Container_Configs::register_configuration() |
Register Astra-Easy Digital Downloads Shop Container Settings. |
inc/compatibility/woocommerce/customizer/sections/class-astra-woo-shop-container-configs.php: Astra_Woo_Shop_Container_Configs::register_configuration() |
Register Astra-WooCommerce Shop Container Settings. |
inc/compatibility/woocommerce/customizer/sections/class-astra-woo-shop-sidebar-configs.php: Astra_Woo_Shop_Sidebar_Configs::register_configuration() |
Register Astra-WooCommerce Shop Sidebar Configurations. |
inc/compatibility/woocommerce/customizer/sections/layout/class-astra-woo-shop-layout-configs.php: Astra_Woo_Shop_Layout_Configs::register_configuration() |
Register Astra-WooCommerce Shop Layout Customizer Configurations. |
inc/compatibility/learndash/customizer/sections/class-astra-learndash-sidebar-configs.php: Astra_Learndash_Sidebar_Configs::register_configuration() |
Register LearnDash Sidebar settings. |
inc/compatibility/learndash/customizer/sections/class-astra-learndash-container-configs.php: Astra_Learndash_Container_Configs::register_configuration() |
Register LearnDash Container settings. |
inc/compatibility/lifterlms/customizer/sections/class-astra-lifter-sidebar-configs.php: Astra_Lifter_Sidebar_Configs::register_configuration() |
Register Astra-LifterLMS Sidebar Customizer Configurations. |
inc/compatibility/lifterlms/customizer/sections/class-astra-lifter-container-configs.php: Astra_Lifter_Container_Configs::register_configuration() |
Register LifterLMS Container Settings. |
inc/customizer/configurations/layout/class-astra-footer-layout-configs.php: Astra_Footer_Layout_Configs::register_configuration() |
Register Footer Layout Configurations. |
inc/customizer/configurations/layout/class-astra-blog-layout-configs.php: Astra_Blog_Layout_Configs::register_configuration() |
Register Blog Layout Customizer Configurations. |
inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php: Astra_Site_Container_Layout_Configs::register_configuration() |
Register Astra Site Container Layout Customizer Configurations. |
inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php: Astra_Sidebar_Layout_Configs::register_configuration() |
Register Astra Sidebar Layout Configurations. |
inc/customizer/configurations/layout/class-astra-header-layout-configs.php: Astra_Header_Layout_Configs::register_configuration() |
Register Header Layout Customizer Configurations. |
inc/blog/single-blog.php: astra_single_post_navigation_markup() |
Get Post Navigation |