public function form($instance) { echo '

' . __('TT Guard Widget settings will go here.', 'text_domain') . '

'; } // Example: what renders on frontend public function widget($args, $instance) { echo $args['before_widget']; echo '

' . __('Hello from TT Guard Widget!', 'text_domain') . '

'; echo $args['after_widget']; } // Example: save widget options public function update($new_instance, $old_instance) { $instance = array(); return $instance; } } /*----------------------------------------------------------------------------------- * * This file contains required functions for the theme. * @templatation.com * -----------------------------------------------------------------------------------*/ add_action( 'wp_head', 'tt_gmaster_wp_head', 9 ); if ( ! function_exists( 'tt_gmaster_wp_head' ) ) { /** * Output the default ttFramework "head" markup in the "head" section. * @since 2.0.0 * @return void */ function tt_gmaster_wp_head() { do_action( 'tt_gmaster_wp_head_before' ); // Output custom favicon icons if ( function_exists( 'tt_gmaster_custom_favicon' ) && ! function_exists( 'wp_site_icon' ) ) tt_gmaster_custom_favicon(); // Output custom styles to Head. if ( function_exists( 'tt_gmaster_custom_styling' ) ) tt_gmaster_custom_styling(); do_action( 'tt_gmaster_wp_head_after' ); } // End tt_gmaster_wp_head() } /*-----------------------------------------------------------------------------------*/ /* tt_get_dynamic_value() */ /* Replace values in a provided array with theme options, if available. */ /* /* $settings array should resemble: $settings = array( 'theme_option_without_tt' => 'default_value' ); /* /* @since 4.4.4 */ /*-----------------------------------------------------------------------------------*/ if( !function_exists( 'tt_temptt_opt_values' )) { function tt_temptt_opt_values( $settings ) { global $tt_temptt_opt; if ( is_array( $tt_temptt_opt ) ) { foreach ( $settings as $k => $v ) { if ( is_array( $v ) ) { foreach ( $v as $k1 => $v1 ) { if ( isset( $tt_temptt_opt[ 'tt_' . $k ][ $k1 ] ) && ( $tt_temptt_opt[ 'tt_' . $k ][ $k1 ] != '' ) ) { $settings[ $k ][ $k1 ] = $tt_temptt_opt[ 'tt_' . $k ][ $k1 ]; } } } else { if ( isset( $tt_temptt_opt[ 'tt_' . $k ] ) && ( $tt_temptt_opt[ 'tt_' . $k ] != '' ) ) { $settings[ $k ] = $tt_temptt_opt[ 'tt_' . $k ]; } } } } return $settings; } // End tt_temptt_opt_values() } /*-----------------------------------------------------------------------------------*/ /* tt_temptt_get_option() */ /* Replace values in a provided variable with theme options, if available. */ /* * field id should be without tt_ */ /* TT @since 6.0 */ /*-----------------------------------------------------------------------------------*/ if ( ! function_exists( 'tt_temptt_get_option' ) ) { function tt_temptt_get_option( $var, $default = false ) { global $tt_temptt_opt; if ( isset( $tt_temptt_opt[ 'tt_' . $var ] ) ) { $var = $tt_temptt_opt[ 'tt_' . $var ]; } else { $var = $default; } return $var; } // End tt_temptt_get_option() } /*-----------------------------------------------------------------------------------*/ /* Render sidebar, if we need to. */ /*-----------------------------------------------------------------------------------*/ if ( ! function_exists( 'tt_temptt_get_sidebar' ) ) { function tt_temptt_get_sidebar() { global $wp_query; ob_start(); ?>
Fatal error: Uncaught Error: Call to undefined function tt_temptt_get_option() in /home/rangerde/public_html/wp-content/themes/guardmaster/inc/theme-essentials.php:93 Stack trace: #0 /home/rangerde/public_html/wp-includes/class-wp-hook.php(353): tt_gmaster_widgets_init('') #1 /home/rangerde/public_html/wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters(NULL, Array) #2 /home/rangerde/public_html/wp-includes/plugin.php(523): WP_Hook->do_action(Array) #3 /home/rangerde/public_html/wp-includes/widgets.php(1886): do_action('widgets_init') #4 /home/rangerde/public_html/wp-includes/class-wp-hook.php(353): wp_widgets_init('') #5 /home/rangerde/public_html/wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters(NULL, Array) #6 /home/rangerde/public_html/wp-includes/plugin.php(523): WP_Hook->do_action(Array) #7 /home/rangerde/public_html/wp-settings.php(779): do_action('init') #8 /home/rangerde/public_html/wp-config.php(102): require_once('/home/rangerde/...') #9 /home/rangerde/public_html/wp-load.php(50): require_once('/home/rangerde/...') #10 /home/rangerde/public_html/wp-blog-header.php(13): require_once('/home/rangerde/...') #11 /home/rangerde/public_html/index.php(17): require('/home/rangerde/...') #12 {main} thrown in /home/rangerde/public_html/wp-content/themes/guardmaster/inc/theme-essentials.php on line 93