<?php
  /*
     *      Osclass – software for creating and publishing online classified
     *                           advertising platforms
     *
     *                        Copyright (C) 2012 OSCLASS
     *
     *       This program is free software: you can redistribute it and/or
     *     modify it under the terms of the GNU Affero General Public License
     *     as published by the Free Software Foundation, either version 3 of
     *            the License, or (at your option) any later version.
     *
     *     This program is distributed in the hope that it will be useful, but
     *         WITHOUT ANY WARRANTY; without even the implied warranty of
     *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *             GNU Affero General Public License for more details.
     *
     *      You should have received a copy of the GNU Affero General Public
     * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */
?>
<?php

osc_add_hook('init_admin', 'theme_next_actions_admin');
osc_add_hook('init_admin', 'theme_regions_map_admin');
function next_is_fineuploader() {
    return Scripts::newInstance()->registered['jquery-fineuploader'] && method_exists('ItemForm', 'ajax_photos');
}
if (function_exists('osc_admin_menu_appearance')) {
    osc_admin_menu_appearance(__('Header logo', 'next'), osc_admin_render_theme_url('oc-content/themes/next_revo/admin/header.php'), 'header_next');
    osc_admin_menu_appearance(__('Theme settings', 'next'), osc_admin_render_theme_url('oc-content/themes/next_revo/admin/settings.php'), 'settings_next');
	osc_admin_menu_appearance(__('Related Ads', 'next'), osc_admin_render_theme_url('oc-content/themes/next_revo/admin/related.php'), 'related_next');
	osc_admin_menu_appearance(__('Help', 'next'), osc_admin_render_theme_url('oc-content/themes/next_revo/admin/help.php'), 'help_next');
} else {

    function next_admin_menu() {
        echo '<h3><a href="#">' . __('Next Revo theme', 'next_revo') . '</a></h3>
            <ul>
                <li><a href="' . osc_admin_render_theme_url('oc-content/themes/next_revo/admin/header.php') . '">&raquo; ' . __('Header logo', 'next_revo') . '</a></li>
                <li><a href="' . osc_admin_render_theme_url('oc-content/themes/next_revo/admin/settings.php') . '">&raquo; ' . __('Theme settings', 'next_revo') . '</a></li>
                <li><a href="' . osc_admin_render_theme_url('oc-content/themes/next_revo/admin/related.php') . '">&raquo; ' . __('Related Ads', 'next_revo') . '</a></li>
              <li><a href="' . osc_admin_render_theme_url('oc-content/themes/next_revo/admin/help.php') . '">&raquo; ' . __('Help', 'next_revo') . '</a></li>
		   </ul>';
    }

    osc_add_hook('admin_menu', 'next_admin_menu');
}



osc_add_hook('admin_page_header', 'theme_next_admin_regions_message', 10);
?>