Astra_Customizer_Partials
Customizer Partials initial setup
Description
Source
File: inc/customizer/class-astra-customizer-partials.php
class Astra_Customizer_Partials { /** * Constructor * * @since 1.0.0 * * @return void */ public function __construct() { } /** * Render Partial Site Tagline * * @since 1.0.0 * * @return mixed */ public static function render_partial_site_tagline() { $site_tagline_setting = astra_get_option( 'display-site-tagline-responsive' ); $site_tagline = ( $site_tagline_setting['desktop'] || $site_tagline_setting['tablet'] || $site_tagline_setting['mobile'] ) ? true : false; if ( true === $site_tagline ) { return get_bloginfo( 'description', 'display' ); } } /** * Render Partial Site Tagline * * @since 1.0.0 * * @return mixed */ public static function render_partial_site_title() { $site_title_setting = astra_get_option( 'display-site-title-responsive' ); $site_title = ( $site_title_setting['desktop'] || $site_title_setting['tablet'] || $site_title_setting['mobile'] ) ? true : false; if ( true === $site_title ) { return get_bloginfo( 'name', 'display' ); } } /** * Render Partial Header Right Section HTML * * @since 1.0.0 * * @return mixed */ public static function render_header_main_rt_section_html() { $right_section_html = astra_get_option( 'header-main-rt-section-html' ); return do_shortcode( $right_section_html ); } /** * Render Partial Text Custom Menu Item * * @since 1.0.0 * * @return mixed */ public static function render_header_main_rt_section_button_text() { $custom_button_text = astra_get_option( 'header-main-rt-section-button-text' ); $html = '<div class="ast-button"> ' . $custom_button_text . ' </div>'; return do_shortcode( $html ); } /** * Render Partial Text Header Site Title & Tagline * * @since 2.2.0 * * @return mixed */ public static function render_header_site_title_tagline() { $site_title = astra_get_option( 'display-site-title-responsive' ); $display_site_title = ( $site_title['desktop'] || $site_title['tablet'] || $site_title['mobile'] ) ? true : false; $site_tagline = astra_get_option( 'display-site-tagline-responsive' ); $display_site_tagline = ( $site_tagline['desktop'] || $site_tagline['tablet'] || $site_tagline['mobile'] ) ? true : false; $html = astra_get_site_title_tagline( $display_site_title, $display_site_tagline ); return do_shortcode( $html ); } /** * Render Partial Footer Section 1 Credit * * @since 1.0.0 * * @return mixed */ public static function render_footer_sml_section_1_credit() { $output = astra_get_small_footer_custom_text( 'footer-sml-section-1-credit' ); return do_shortcode( $output ); } /** * Render Partial Footer Section 2 Credit * * @since 1.0.0 * * @return mixed */ public static function render_footer_sml_section_2_credit() { $output = astra_get_small_footer_custom_text( 'footer-sml-section-2-credit' ); return do_shortcode( $output ); } /** * Render Partial text for the mobile toggle menu * * @since 2.6.0 * * @return mixed */ public static function mobile_toggle_menu() { $output = astra_masthead_toggle_buttons_primary(); return do_shortcode( $output ); } }
Expand full source code Collapse full source code View on Trac
Methods
- __construct — Constructor
- _render_footer_sml_section_1_credit — Render Partial Footer Section 1 Credit
- _render_footer_sml_section_2_credit — Render Partial Footer Section 2 Credit
- _render_header_main_rt_section_button_text — Render Partial Text Custom Menu Item
- _render_header_main_rt_section_html — Render Partial Header Right Section HTML
- _render_partial_blogdescription — Render Partial Blog Description
- _render_partial_blogname — Render Partial Blog Name
- _render_partial_site_tagline — Render Partial Site Tagline
- _render_partial_site_title — Render Partial Site Tagline
- get_instance — Initiator
- mobile_toggle_menu — Render Partial text for the mobile toggle menu
- render_footer_sml_section_1_credit — Render Partial Footer Section 1 Credit
- render_footer_sml_section_2_credit — Render Partial Footer Section 2 Credit
- render_header_main_rt_section_button_text — Render Partial Text Custom Menu Item
- render_header_main_rt_section_html — Render Partial Header Right Section HTML
- render_header_site_title_tagline — Render Partial Text Header Site Title & Tagline
- render_partial_site_tagline — Render Partial Site Tagline
- render_partial_site_title — Render Partial Site Tagline