Exemplo n.º 1
0
 function is_admin_post()
 {
     if (is_admin_niceframework()) {
         return true;
     }
     //$_current_url =  strtolower( strip_tags( trim( $_SERVER['REQUEST_URI'] ) ) ); if ( ( substr( basename( $_current_url ), 0, 8 ) == 'post.php' ) || substr( basename( $_current_url ), 0, 12 ) == 'post-new.php' )
     return false;
 }
Exemplo n.º 2
0
/**
 * nice_admin_menu()
 *
 * Create admin menu for nicethemes
 *
 * @since 1.0.0
 *
 */
function nice_admin_menu()
{
    add_object_page(__('Theme Options', 'nicethemes'), 'Nice Themes', 'manage_options', 'nicethemes', 'nicethemes', NICE_TPL_DIR . '/engine/admin/images/btn-nicethemes.png');
    // Theme Options.
    $niceadmin = add_submenu_page('nicethemes', __('Theme Options', 'nicethemes'), __('Theme Options', 'nicethemes'), 'manage_options', 'nicethemes', 'nicethemes');
    // Updates.
    $niceadmin = add_submenu_page('nicethemes', __('NiceThemes Updates', 'nicethemes'), __('Updates', 'nicethemes'), 'manage_options', 'niceupdates', 'niceupdates');
    // Support.
    $niceadmin = add_submenu_page('nicethemes', __('Support Forums', 'nicethemes'), __('Support', 'nicethemes'), 'manage_options', 'nicethemes-support', 'nicethemes_support_page');
    // More Themes.
    $niceadmin = add_submenu_page('nicethemes', __('More Themes', 'nicethemes'), __('More Themes', 'nicethemes'), 'manage_options', 'nicethemes-themes', 'nicethemes_themes_page');
    if (is_admin_niceframework()) {
        wp_enqueue_style('admin-style', NICE_TPL_DIR . '/engine/admin/admin-style.css');
        wp_register_style('nice-datepicker', get_template_directory_uri() . '/engine/admin/css/datepicker.css');
        wp_register_script('jquery-ui-datepicker-js', get_template_directory_uri() . '/engine/admin/js/ui.datepicker.js', array('jquery-ui-core'));
        add_action('admin_head', 'nice_admin_head');
        wp_enqueue_style('nice-datepicker');
        wp_enqueue_script('jquery-ui-datepicker-js');
    }
}
Exemplo n.º 3
0
/**
 * nice_admin_menu()
 *
 * Create admin menu for nicethemes
 *
 * @since 1.0.0
 *
 */
function nice_admin_menu()
{
    add_object_page(__('Theme Options', 'nicethemes'), 'Nice Themes', 'manage_options', 'nicethemes', 'nicethemes', nice_admin_menu_icon());
    // Theme Options.
    $niceadmin = add_submenu_page('nicethemes', __('Theme Options', 'nicethemes'), __('Theme Options', 'nicethemes'), 'manage_options', 'nicethemes', 'nicethemes');
    // Updates.
    $niceadmin = add_submenu_page('nicethemes', __('NiceThemes Updates', 'nicethemes'), __('Updates', 'nicethemes'), 'manage_options', 'niceupdates', 'niceupdates');
    // Support.
    $niceadmin = add_submenu_page('nicethemes', __('Support Forums', 'nicethemes'), __('Support', 'nicethemes'), 'manage_options', 'nicethemes-support', 'nicethemes_support_page');
    // More Themes. - temporary commented, as requested by Envato, te monopolic WordPress Marketplace.
    //$niceadmin = add_submenu_page( 'nicethemes', __( 'More Themes', 'nicethemes' ), __( 'More Themes', 'nicethemes' ), 'manage_options', 'nicethemes-themes', 'nicethemes_themes_page' );
    if (is_admin_niceframework()) {
        wp_enqueue_style('admin-style', NICE_TPL_DIR . '/engine/admin/admin-style.css');
        wp_register_style('nice-datepicker', get_template_directory_uri() . '/engine/admin/css/datepicker.css');
        wp_register_style('nice-ui-slider', get_template_directory_uri() . '/engine/admin/css/ui-slider.css');
        wp_register_script('nice-typography-preview', get_template_directory_uri() . '/engine/admin/js/nice-typography-preview.js', array('jquery'), '1.0.0', true);
        wp_register_script('nice-general', get_template_directory_uri() . '/engine/admin/js/general.js');
        add_action('admin_head', 'nice_admin_head');
        wp_enqueue_style('nice-datepicker');
        wp_enqueue_style('nice-ui-slider');
        wp_enqueue_script('jquery-ui-core');
        wp_enqueue_script('jquery-ui-datepicker');
        wp_enqueue_script('jquery-ui-slider');
        wp_enqueue_script('nice-typography-preview');
        wp_enqueue_script('nice-general');
        //if ( isset( $_GET ) && ( isset( $_GET['activated'] ) && $_GET['activated'] == true ) ) $first_time = 'true';
        //else $first_time = 'false';
        // Had to set this because of Envato, the monopolic WordPress marketplace.
        $first_time = false;
        $data = array('activated' => $first_time);
        wp_localize_script('nice-general', 'php_data', $data);
    }
    if (is_admin()) {
        wp_register_style('nice-admin-menu', get_template_directory_uri() . '/engine/admin/css/admin-menu.css');
        wp_enqueue_style('nice-admin-menu');
        wp_register_style('nice-admin-font', get_template_directory_uri() . '/engine/admin/css/niceadmin-font.css');
        wp_enqueue_style('nice-admin-font');
    }
}
Exemplo n.º 4
0
<?php

/**
 * 	Table of Contents (medialibrary.php)
 *
 *	- nice_admin_scripts()
 *	- nice_admin_styles()
 *	- houdini_finger_snap()
 *	- houdini_get_post()
 *	- houdini_make_title()
 *
 */
if (is_admin()) {
    add_action('init', 'houdini_finger_snap');
    if (is_admin_niceframework()) {
        add_action('admin_print_scripts', 'nice_admin_scripts');
        add_action('admin_print_styles', 'nice_admin_styles');
    }
}
/**
 * nice_admin_scripts()
 *
 * enqueue scripts for admin section.
 *
 * @since 1.0.0
 * @updated 1.1.5
 *
 */
if (!function_exists('nice_admin_scripts')) {
    function nice_admin_scripts()
    {