/** * A function for loading a custom widget template. This works similar to the WordPress `get_*()` template functions. * It's purpose is for loading a widget display template. This function looks for widget templates within the * `widget` sub-folder or the root theme folder. * * @since 1.0.0 * @access public * @param string $name * @return void */ function hoot_get_widget($name = '') { include hoot_locate_widget($name); }
/** * Echo the widget content */ function display_widget($instance, $before_title = '', $title = '', $after_title = '') { extract($instance, EXTR_SKIP); include hoot_locate_widget('cta'); // Loads the widget/cta or template-parts/widget-cta.php template. }
/** * Echo the widget content */ function display_widget($instance, $before_title = '', $title = '', $after_title = '') { extract($instance, EXTR_SKIP); include hoot_locate_widget('social-icons'); // Loads the widget/social-icons or template-parts/widget-social-icons.php template. }