' . "\n";
}
}
/**
* @see Walker_Nav_Menu::end_el()
*
* @param string $output
* Passed by reference. Used to append additional content.
* @param object $item
* Page data object. Not used.
* @param int $depth
* Depth of page. Not Used.
* @param array $args
* An array of arguments. @see wp_nav_menu()
*/
function end_el(&$output, $item, $depth = 0, $args = array())
{
$indent = str_repeat("\t", $depth);
if ($item->classes != '' && in_array('menu-item-has-children', $item->classes) && $depth == 0) {
//$output .= $indent . '
' . "\n";
}
$output .= $indent . '
' . "\n";
}
/**
* @see Walker_Nav_Menu::start_lvl()
*
* @param string $output
* Passed by reference. Used to append additional content.
* @param int $depth
* Depth of menu item. Used for padding.
* @param array $args
* An array of arguments. @see wp_nav_menu()
*/
public function start_lvl(&$output, $depth = 0, $args = array())
{
$indent = str_repeat("\t", $depth);
$output .= $indent . '
' . "\n";
}
/**
* @see Walker_Nav_Menu::end_lvl()
*
* @param string $output
* Passed by reference. Used to append additional content.
* @param int $depth
* Depth of menu item. Used for padding.
* @param array $args
* An array of arguments. @see wp_nav_menu()
*/
public function end_lvl(&$output, $depth = 0, $args = array())
{
$indent = str_repeat("\t", $depth);
$output .= $indent . '
' . "\n";
}
}
?>
add_image_size( 'thumb', 450, 350, true );
add_image_size( 'small-thumb', 90, 65, true );
add_action('admin_init', 'theme_settings_function');
function theme_settings_function() {
$inputs = ["Email", "Phone", "Facebook Url", "Twitter Url", "Instagram Url", "Google Url","WhatsApp Url", "Copyright Text"];
$textareas = ["Footer Contact Us", "Footer Location"];
add_settings_section(
'theme_settings_section', // Section ID
'Theme Options', // Section Title
'theme_settings_section_options_callback', // Callback
'general' // What Page? This makes the section show up on the General Settings Page
);
foreach ($inputs as $input){
$id = strtolower(str_replace(" ", "_", $input));
add_settings_field(
$id, // Option ID
$input, // Label
'theme_input_box_callback', // !important - This is where the args go!
'general', // Page it will be displayed (General Settings)
'theme_settings_section', // Name of our section
array(
$id
)
);
register_setting('general',$id, 'esc_attr');
}
foreach ($textareas as $textarea){
$id = strtolower(str_replace(" ", "_", $textarea));
add_settings_field(
$id, // Option ID
$textarea, // Label
'theme_textarea_box_callback', // !important - This is where the args go!
'general', // Page it will be displayed (General Settings)
'theme_settings_section', // Name of our section
array(
$id
)
);
register_setting('general',$id, 'esc_attr');
}
}
function theme_settings_section_options_callback() { // Section Callback
echo '