コード例 #1
2
ファイル: functions.php プロジェクト: flasomm/Montkailash
/**
 * Enqueue scripts and styles.
 *
 * @since Twenty Fifteen 1.0
 */
function montkailash_scripts()
{
    // Load our main stylesheet.
    wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css');
    wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css');
    wp_enqueue_style('lightbox-style', get_template_directory_uri() . '/css/lightbox.css');
    wp_enqueue_style('montkailash-style', get_stylesheet_uri());
    if (is_page('Contact')) {
        wp_register_script('gmap', "http://maps.google.com/maps/api/js?sensor=true", '', '', true);
        wp_enqueue_script('gmap');
        wp_enqueue_script('gmaps', get_template_directory_uri() . '/js/gmaps.js', array('jquery'), '', true);
        wp_enqueue_script('function-map', get_template_directory_uri() . '/js/function_map.js', array('jquery'), '0.1', true);
    }
    if (!is_admin()) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js", '', '1.8.3', true);
        wp_enqueue_script('jquery');
        wp_deregister_script('wonderplugin-slider-skins-script');
        wp_deregister_script('wonderplugin-slider-script');
        wp_deregister_script('wonderplugin-slider-creator-script');
        wp_deregister_script('woo-vou-public-script');
        wp_register_script('wonderplugin-slider-skins-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginsliderskins.js', array('jquery'), '4.9', true);
        wp_register_script('wonderplugin-slider-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginslider.js', array('jquery'), '4.9', true);
        wp_register_script('wonderplugin-slider-creator-script', plugins_url() . '/wonderplugin-slider/app/wonderplugin-slider-creator.js', array('jquery'), '4.9', true);
        wp_register_script('woo-vou-public-script', plugins_url() . '/woocommerce-pdf-vouchers/includes/js/woo-vou-public.js', array('jquery'), '2.4.4', true);
        wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20150330', true);
        wp_enqueue_script('lightbox', get_template_directory_uri() . '/js/lightbox.js', array('jquery'), '2.8.1', true);
        wp_enqueue_script('montkailash-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '0.1', true);
    }
}
コード例 #2
0
 function md_add_footer()
 {
     // Drone JS
     wp_register_script('drone', get_template_directory_uri() . '/js/drone.js');
     wp_enqueue_script('drone');
     wp_localize_script('drone', 'mdajaxurl', array('ajax' => admin_url('admin-ajax.php')));
 }
コード例 #3
0
ファイル: slide.php プロジェクト: Ksajikyan/poiskuslug.ru
/**
 * Initialize Pitch's slide post type
 */
function pitch_slide_init()
{
    $labels = array('name' => _x('Slides', 'post type general name', 'pitch'), 'singular_name' => _x('Slide', 'post type singular name', 'pitch'), 'add_new' => _x('Add New', 'book', 'pitch'), 'add_new_item' => __('Add New Slide', 'pitch'), 'edit_item' => __('Edit Slide', 'pitch'), 'new_item' => __('New Slide', 'pitch'), 'all_items' => __('All Slide', 'pitch'), 'view_item' => __('View Slide', 'pitch'), 'search_items' => __('Search Slides', 'pitch'), 'not_found' => __('No slides found', 'pitch'), 'not_found_in_trash' => __('No slides found in Trash', 'pitch'), 'parent_item_colon' => '', 'menu_name' => __('Slides', 'pitch'));
    $args = array('labels' => $labels, 'public' => false, 'publicly_queryable' => false, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => false, 'rewrite' => false, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'excerpt', 'page-attributes'), 'menu_icon' => get_template_directory_uri() . '/images/post-types/slider-small.png');
    register_post_type('slide', $args);
    add_image_size('slide', 960, siteorigin_setting('slider_height'), true);
}
コード例 #4
0
 function constants($options)
 {
     define("THEME_DIR", get_template_directory());
     define("THEME_DIR_URI", get_template_directory_uri());
     define("THEME_NAME", $options["theme_name"]);
     if (defined("ICL_LANGUAGE_CODE")) {
         $lang = "_" . ICL_LANGUAGE_CODE;
     } else {
         $lang = "";
     }
     define("THEME_OPTIONS", $options["theme_name"] . '_options' . $lang);
     define("THEME_SLUG", $options["theme_slug"]);
     define("THEME_STYLES", THEME_DIR_URI . "/stylesheet/css");
     define("THEME_IMAGES", THEME_DIR_URI . "/images");
     define("THEME_JS", THEME_DIR_URI . "/js");
     define('FONTFACE_DIR', THEME_DIR . '/fontface');
     define('FONTFACE_URI', THEME_DIR_URI . '/fontface');
     define("THEME_FRAMEWORK", THEME_DIR . "/framework");
     define("THEME_PLUGINS", THEME_FRAMEWORK . "/plugins");
     define("THEME_ACTIONS", THEME_FRAMEWORK . "/actions");
     define("THEME_PLUGINS_URI", THEME_DIR_URI . "/framework/plugins");
     define("THEME_SHORTCODES", THEME_FRAMEWORK . "/shortcodes");
     define("THEME_WIDGETS", THEME_FRAMEWORK . "/widgets");
     define("THEME_SLIDERS", THEME_FRAMEWORK . "/sliders");
     define("THEME_HELPERS", THEME_FRAMEWORK . "/helpers");
     define("THEME_FUNCTIONS", THEME_FRAMEWORK . "/functions");
     define("THEME_CLASSES", THEME_FRAMEWORK . "/classes");
     define('THEME_ADMIN', THEME_FRAMEWORK . '/admin');
     define('THEME_METABOXES', THEME_ADMIN . '/metaboxes');
     define('THEME_ADMIN_POST_TYPES', THEME_ADMIN . '/post-types');
     define('THEME_GENERATORS', THEME_ADMIN . '/generators');
     define('THEME_ADMIN_URI', THEME_DIR_URI . '/framework/admin');
     define('THEME_ADMIN_ASSETS_URI', THEME_DIR_URI . '/framework/admin/assets');
 }
コード例 #5
0
ファイル: 10_functions.php プロジェクト: DonghuaLau/myblog
function twentyhua_10_scripts_styles()
{
    // bootstrap
    wp_enqueue_script('twentyhua-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20150701', true);
    wp_enqueue_style('twentyhua-style', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '20150701');
    wp_enqueue_style('twentyhua-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array(), '20150701');
}
コード例 #6
0
ファイル: theme-metabox.php プロジェクト: RobbiNespu/ukmtheme
/**
 * Define the metabox and field configurations.
 *
 * @param  array $meta_boxes
 * @return array
 */
function ukmtheme_metaboxes(array $meta_boxes)
{
    // Start with an underscore to hide fields from custom fields list
    $prefix = 'ut_';
    // Video
    $meta_boxes['video_metabox'] = array('id' => 'video_metabox', 'title' => __('Video Detail', 'ukmtheme'), 'pages' => array('video'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Video Link', 'ukmtheme'), 'desc' => __('Enter a youtube, twitter, or instagram URL. Supports services listed at <a href="http://codex.wordpress.org/Embeds">http://codex.wordpress.org/Embeds</a>.', 'ukmtheme'), 'id' => $prefix . 'video_url', 'type' => 'oembed')));
    // News Portal Link
    $meta_boxes['news_portal_metabox'] = array('id' => 'news_portal_metabox', 'title' => __('News Detail', 'ukmtheme'), 'pages' => array('news_portal'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('News URL', 'ukmtheme'), 'desc' => __('field description (optional)', 'ukmtheme'), 'id' => $prefix . 'news_portal_url', 'type' => 'text_url')));
    // Press Release
    $meta_boxes['press_metabox'] = array('id' => 'press_metabox', 'title' => __('Press Release Detail', 'ukmtheme'), 'pages' => array('press'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Date', 'ukmtheme'), 'desc' => __('Press Release Date', 'ukmtheme'), 'id' => $prefix . 'press_date', 'type' => 'text_date'), array('name' => __('Document File', 'ukmtheme'), 'desc' => __('Upload document file.', 'ukmtheme'), 'id' => $prefix . 'press_file', 'type' => 'file', 'allow' => array('url'))));
    // GALLERY
    $meta_boxes['gallery_metabox'] = array('id' => 'gallery_metabox', 'title' => __('Gallery Detail', 'ukmtheme'), 'pages' => array('gallery'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Gallery Cover Image', 'ukmtheme'), 'desc' => __('Upload an image or enter a URL. dimensions of the image should be 300x300 pixels. <a href="' . get_template_directory_uri() . '/img/300_300.psd">PSD File</a>', 'ukmtheme'), 'id' => $prefix . 'gallery_cover', 'type' => 'file', 'allow' => array('url')), array('name' => __('Date', 'ukmtheme'), 'desc' => __('Gallery Date', 'ukmtheme'), 'id' => $prefix . 'gallery_date', 'type' => 'text_date'), array('name' => __('Phographer', 'ukmtheme'), 'desc' => __('Photo by.', 'ukmtheme'), 'id' => $prefix . 'gallery_photographer', 'type' => 'text'), array('name' => __('Image', 'ukmtheme'), 'desc' => __('Upload or add multiple images/attachments.', 'cmb'), 'id' => $prefix . 'gallery_image', 'type' => 'file_list', 'preview_size' => array(100, 100))));
    // SLIDESHOW
    $meta_boxes['slideshow_metabox'] = array('id' => 'slideshow_metabox', 'title' => __('Slideshow Detail', 'ukmtheme'), 'pages' => array('slideshow'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Slideshow Image', 'ukmtheme'), 'desc' => __('Upload an image or enter a URL. dimensions of the image should be 960x350 pixels. <a href="' . get_template_directory_uri() . '/img/960_350.psd">PSD File</a>', 'ukmtheme'), 'id' => $prefix . 'slideshow_image', 'type' => 'file', 'allow' => array('url')), array('name' => __('Slideshow Link', 'ukmtheme'), 'desc' => __('links to posts, pages or external web.', 'ukmtheme'), 'id' => $prefix . 'slideshow_link', 'type' => 'text')));
    // APPRECIATION
    $meta_boxes['appreciation_metabox'] = array('id' => 'appreciation_metabox', 'title' => __('Appreciation Detail', 'ukmtheme'), 'pages' => array('appreciation'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('By', 'ukmtheme'), 'desc' => __('e.g. Jamaludin Rajalu', 'ukmtheme'), 'id' => $prefix . 'appreciation_by', 'type' => 'text'), array('name' => __('PTJ', 'ukmtheme'), 'desc' => __('e.g. Pusat Teknologi Maklumat', 'ukmtheme'), 'id' => $prefix . 'appreciation_ptj', 'type' => 'text'), array('name' => __('Date', 'ukmtheme'), 'desc' => __('Date of appreciation', 'ukmtheme'), 'id' => $prefix . 'appreciation_date', 'type' => 'text_date'), array('name' => __('Greeting', 'ukmtheme'), 'desc' => __('e.g. Terima kasih atas sumbangan sebagai urusetia majlis', 'ukmtheme'), 'id' => $prefix . 'appreciation_greeting', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5))));
    // EVENT MANAGER
    $meta_boxes['event_metabox'] = array('id' => 'event_metabox', 'title' => __('Event Detail', 'ukmtheme'), 'pages' => array('event'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Date', 'ukmtheme'), 'desc' => __('Date of event', 'ukmtheme'), 'id' => $prefix . 'event_date', 'type' => 'text_date'), array('name' => __('Time: Start', 'ukmtheme'), 'desc' => __('Start time of the event', 'ukmtheme'), 'id' => $prefix . 'event_time_start', 'type' => 'text_time'), array('name' => __('Time: End', 'ukmtheme'), 'desc' => __('End time of the event', 'ukmtheme'), 'id' => $prefix . 'event_time_end', 'type' => 'text_time'), array('name' => __('Venue', 'ukmtheme'), 'desc' => __('Venue of the event', 'ukmtheme'), 'id' => $prefix . 'event_venue', 'type' => 'text'), array('name' => __('Summary', 'ukmtheme'), 'desc' => __('Event Summary', 'ukmtheme'), 'id' => $prefix . 'event_summary', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5))));
    // PUBLICATION
    $meta_boxes['publication_metabox'] = array('id' => 'publication_metabox', 'title' => __('Publication Detail', 'ukmtheme'), 'pages' => array('publication'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Cover Image', 'ukmtheme'), 'desc' => __('Upload an image or enter a URL. dimensions of the image should be 300x380 pixels. <a href="' . get_template_directory_uri() . '/img/300_380.psd">PSD File</a>', 'ukmtheme'), 'id' => $prefix . 'publication_cover', 'type' => 'file', 'allow' => array('url')), array('name' => __('Author', 'ukmtheme'), 'desc' => __('e.g. Jamaludin Rajalu', 'ukmtheme'), 'id' => $prefix . 'publication_author', 'type' => 'text'), array('name' => __('Publisher', 'ukmtheme'), 'desc' => __('e.g. Pusat Teknologi Maklumat', 'ukmtheme'), 'id' => $prefix . 'publication_publisher', 'type' => 'text'), array('name' => __('Year', 'ukmtheme'), 'desc' => __('e.g. 2014', 'ukmtheme'), 'id' => $prefix . 'publication_year', 'type' => 'text'), array('name' => __('Number of Pages', 'ukmtheme'), 'desc' => __('e.g. 199', 'ukmtheme'), 'id' => $prefix . 'publication_pages', 'type' => 'text'), array('name' => __('Reference/Download', 'ukmtheme'), 'desc' => __('e.g. http://www.ukm.my', 'ukmtheme'), 'id' => $prefix . 'publication_reference', 'type' => 'text_url')));
    // STAFF DIRECTORY
    $meta_boxes['staff_metabox'] = array('id' => 'staff_metabox', 'title' => __('Staff Detail', 'ukmtheme'), 'pages' => array('staff'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Staff Photo', 'ukmtheme'), 'desc' => __('Upload an image or enter a URL. dimensions of the image should be 300x380 pixels. <a href="' . get_template_directory_uri() . '/img/300_380.psd">PSD File</a>', 'ukmtheme'), 'id' => $prefix . 'staff_photo', 'type' => 'file', 'allow' => array('url')), array('name' => __('Phone No.', 'ukmtheme'), 'desc' => __('e.g. 03-8921-7070', 'ukmtheme'), 'id' => $prefix . 'staff_phone', 'type' => 'text'), array('name' => __('Email', 'ukmtheme'), 'desc' => __('e.g. user@ukm.edu.my', 'ukmtheme'), 'id' => $prefix . 'staff_email', 'type' => 'text_email'), array('name' => __('Display Job Scope', 'ukmtheme'), 'desc' => __('Please check if want to display Scope of Work', 'ukmtheme'), 'id' => $prefix . 'staff_work_scope', 'type' => 'checkbox'), array('name' => __('Hide Title', 'ukmtheme'), 'desc' => __('Please check if want to hide Scope of Work title "Scope of Work"', 'ukmtheme'), 'id' => $prefix . 'staff_work_scope_title', 'type' => 'checkbox'), array('name' => __('New Title', 'ukmtheme'), 'desc' => __('e.g. "Expertise". Please leave it blank if do not want to display', 'ukmtheme'), 'id' => $prefix . 'staff_work_scope_title_custom', 'type' => 'text'), array('name' => __('Job Scope Detail', 'ukmtheme'), 'desc' => __('e.g. Do Multimedia Work', 'ukmtheme'), 'id' => $prefix . 'staff_work_scope_desc', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5))));
    // EXPERTISE
    $meta_boxes['expertise_metabox'] = array('id' => 'expertise_metabox', 'title' => __('Expertise Detail', 'ukmtheme'), 'pages' => array('expertise'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Expert Photo', 'ukmtheme'), 'desc' => __('Upload an image or enter a URL. dimensions of the image should be 300x380 pixels. <a href="' . get_template_directory_uri() . '/img/300_380.psd">PSD File</a>', 'ukmtheme'), 'id' => $prefix . 'expertise_photo', 'type' => 'file', 'allow' => array('url')), array('name' => __('Biography', 'ukmtheme'), 'desc' => __('A brief biography', 'ukmtheme'), 'id' => $prefix . 'expertise_biography', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Contact', 'ukmtheme'), 'desc' => __('e.g. 03-8921-7070', 'ukmtheme'), 'id' => $prefix . 'expertise_contact', 'type' => 'text'), array('name' => __('Email', 'ukmtheme'), 'desc' => __('e.g. user@ukm.edu.my', 'ukmtheme'), 'id' => $prefix . 'expertise_email', 'type' => 'text_email'), array('name' => __('Current Position', 'ukmtheme'), 'desc' => __('e.g. Professor', 'ukmtheme'), 'id' => $prefix . 'expertise_position', 'type' => 'text'), array('name' => __('Specialisation', 'ukmtheme'), 'desc' => __('Tourism and Hospitality Marketing, &amp; Services Marketing', 'ukmtheme'), 'id' => $prefix . 'expertise_specialisation', 'type' => 'text'), array('name' => __('Qualifications', 'ukmtheme'), 'desc' => __('e.g. Doctor of Philosophy (University of Malaya) [2002-2005]', 'ukmtheme'), 'id' => $prefix . 'expertise_qualification', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Areas of Research', 'ukmtheme'), 'desc' => __('e.g. Services Marketing and Consumer Behavior Analysis', 'ukmtheme'), 'id' => $prefix . 'expertise_research_area', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Research/<br/>Consultation/<br/>Expansion', 'ukmtheme'), 'desc' => __('e.g. Developing A Higher Education Brand Index for Malaysia. Jan1, 2009-June 30,2010. GSB-001-2009 (External Grant). Ongoing.', 'ukmtheme'), 'id' => $prefix . 'expertise_research_consultation', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Publications Journals', 'ukmtheme'), 'desc' => __('e.g. Ahmad Azmi M. Ariffin & Mohd Safar Hashim. 2009. Marketing Malaysia to the Middle East Tourists: Towards a Prime Inter-Regional Destination. International Journal of West Asian Studies. 1(1): 43-58. ISSN 1394-0902.', 'ukmtheme'), 'id' => $prefix . 'expertise_journal', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Proceedings', 'ukmtheme'), 'desc' => __('e.g. Ahmad Azmi M.Ariffin, Aliah Hanim M.Salleh, Norzalita A.Aziz & Astuti A.Asbudin. 2009. Determining Passengers’ Expectation, Service Quality and Satisfaction for Low Cost Carriers. The Proceeding of The 11th. International Business Research Conference. Sydney Australia. Dec 2-4, 2009. ISBN: 978-0-980-4557-0-7 (Presenter).', 'ukmtheme'), 'id' => $prefix . 'expertise_proceedings', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Book', 'ukmtheme'), 'desc' => __('e.g. Ahmad Azmi Mohd. Ariffin, Norzalita Abd. Aziz. 2009. Chapter 5: Service Quality and Zone of Tolerance in Malaysian Banking Services. In Services Management and Marketing: Studies in Malaysia. Edited by Aliah Hanim Mohd. Salleh, Ahmad Azmi Mohd. Ariffin, June M. L. Poon & Aini Aman. GSB-UKM. Bangi.', 'ukmtheme'), 'id' => $prefix . 'expertise_book', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Articles in Antologi/<br/>Chapters in Book', 'ukmtheme'), 'desc' => __('e.g. Ahmad Azmi Mohd. Ariffin, Norzalita Abd. Aziz. 2009. Chapter 5: Service Quality and Zone of Tolerance in Malaysian Banking Services. In Services Management and Marketing: Studies in Malaysia. Edited by Aliah Hanim Mohd. Salleh, Ahmad Azmi Mohd. Ariffin, June M. L. Poon & Aini Aman. GSB-UKM. Bangi.', 'ukmtheme'), 'id' => $prefix . 'expertise_antologi', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Monograph,<br/> Working Papers<br/> and Non-Periodical<br/> Publications', 'ukmtheme'), 'desc' => __('e.g. Module ”Tourism Marketing” (Code: BBAS 3103).  Open University Malaysia. 2007/2008', 'ukmtheme'), 'id' => $prefix . 'expertise_monograph', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Seminar', 'ukmtheme'), 'desc' => __('e.g. Ahmad Azmi Mohd. Ariffin, Norzalita Abd. Aziz. 2009. Chapter 5: Service Quality and Zone of Tolerance in Malaysian Banking Services. In Services Management and Marketing: Studies in Malaysia. Edited by Aliah Hanim Mohd. Salleh, Ahmad Azmi Mohd. Ariffin, June M. L. Poon & Aini Aman. GSB-UKM. Bangi.', 'ukmtheme'), 'id' => $prefix . 'expertise_seminar', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Award', 'ukmtheme'), 'desc' => __('e.g. EXCELLENT SERVICE AWARD 2007. Faculty of Economics and BusinessUniversiti Kebangsaan Malaysia', 'ukmtheme'), 'id' => $prefix . 'expertise_award', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Supervision', 'ukmtheme'), 'desc' => __('e.g. Lim Chui Seong (DBA. Disertasi) The Influence of e-Hospitality on Websites Satisfaction and Loyalty (Ongoing)', 'ukmtheme'), 'id' => $prefix . 'expertise_supervision', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Administrative<br/> Services/Committee', 'ukmtheme'), 'desc' => __('e.g. MANAGING EDITOR OF JURNAL PENGURUSAN 1 April 2007 – Present Graduate School of Business, Universiti Kebangsaan Malaysia', 'ukmtheme'), 'id' => $prefix . 'expertise_administrative', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Reports: Technical/<br/>Research/<br/>Consultation', 'ukmtheme'), 'desc' => __('e.g. Mohd Fauzi Mohd Jani, Zaimah Derawi, Tih Sio Hong, Rozita Amirudin, Ahmad Azmi Ariffin, Zafir Makhbul, Aini Aman, Mohd Radzuan Rahid, Ahmad Raflis Omar, Kamalrudin Mohamed Saleh. 2008. “Laporan Akhir Program Latihan Keusahawanan: Kerjasama Pelajar Universiti dan Entepris Kecil dan Sederhana (EKS)”. SMIDEC.', 'ukmtheme'), 'id' => $prefix . 'expertise_reports', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Research Grant', 'ukmtheme'), 'desc' => __('e.g. Ahmad Azmi Mohd. Ariffin, Norzalita Abd. Aziz. 2009. Chapter 5: Service Quality and Zone of Tolerance in Malaysian Banking Services. In Services Management and Marketing: Studies in Malaysia. Edited by Aliah Hanim Mohd. Salleh, Ahmad Azmi Mohd. Ariffin, June M. L. Poon & Aini Aman. GSB-UKM. Bangi.', 'ukmtheme'), 'id' => $prefix . 'expertise_research_grant', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5)), array('name' => __('Teaching', 'ukmtheme'), 'desc' => __('e.g. Courses Taught at Ph.D./DBA Level Hospitality Marketing: Theory and Research', 'ukmtheme'), 'id' => $prefix . 'expertise_teaching', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5))));
    // HIDE ITEM EXPERTISE
    $meta_boxes['expertise_metabox_hide'] = array('id' => 'expertise_metabox_hide', 'title' => __('Hide Option (Please check if want to hide)', 'ukmtheme'), 'pages' => array('expertise'), 'context' => 'normal', 'priority' => 'high', 'show_names' => false, 'fields' => array(array('name' => __('Hide Research/Consultation/Expansion', 'ukmtheme'), 'desc' => __('Hide Research/Consultation/Expansion', 'ukmtheme'), 'id' => $prefix . 'expertise_research_consultation_hide', 'type' => 'checkbox'), array('name' => __('Hide Publications Journals', 'ukmtheme'), 'desc' => __('Hide Publications Journals', 'ukmtheme'), 'id' => $prefix . 'expertise_journal_hide', 'type' => 'checkbox'), array('name' => __('Hide Proceedings', 'ukmtheme'), 'desc' => __('Hide Proceedings', 'ukmtheme'), 'id' => $prefix . 'expertise_proceedings_hide', 'type' => 'checkbox'), array('name' => __('Hide Book', 'ukmtheme'), 'desc' => __('Hide Book', 'ukmtheme'), 'id' => $prefix . 'expertise_book_hide', 'type' => 'checkbox'), array('name' => __('Hide Articles in Antologi/Chapters in Book', 'ukmtheme'), 'desc' => __('Hide Articles in Antologi/Chapters in Book', 'ukmtheme'), 'id' => $prefix . 'expertise_antologi_hide', 'type' => 'checkbox'), array('name' => __('Hide Monograph, Working Papers and Non-Periodical Publications', 'ukmtheme'), 'desc' => __('Hide Monograph, Working Papers and Non-Periodical Publications', 'ukmtheme'), 'id' => $prefix . 'expertise_monograph_hide', 'type' => 'checkbox'), array('name' => __('Hide Seminar', 'ukmtheme'), 'desc' => __('Hide Seminar', 'ukmtheme'), 'id' => $prefix . 'expertise_seminar_hide', 'type' => 'checkbox'), array('name' => __('Hide Award', 'ukmtheme'), 'desc' => __('Hide Award', 'ukmtheme'), 'id' => $prefix . 'expertise_award_hide', 'type' => 'checkbox'), array('name' => __('Hide Supervision', 'ukmtheme'), 'desc' => __('Hide Supervision', 'ukmtheme'), 'id' => $prefix . 'expertise_supervision_hide', 'type' => 'checkbox'), array('name' => __('Hide Administrative Services/Committee', 'ukmtheme'), 'desc' => __('Hide Administrative Services/Committee', 'ukmtheme'), 'id' => $prefix . 'expertise_administrative_hide', 'type' => 'checkbox'), array('name' => __('Hide Reports: Technical/Research/Consultation', 'ukmtheme'), 'desc' => __('Hide Reports: Technical/Research/Consultation', 'ukmtheme'), 'id' => $prefix . 'expertise_reports_hide', 'type' => 'checkbox'), array('name' => __('Hide Research Grant', 'ukmtheme'), 'desc' => __('Hide Research Grant', 'ukmtheme'), 'id' => $prefix . 'expertise_research_grant_hide', 'type' => 'checkbox'), array('name' => __('Hide Teaching', 'ukmtheme'), 'desc' => __('Hide Teaching', 'ukmtheme'), 'id' => $prefix . 'expertise_teaching_hide', 'type' => 'checkbox')));
    // END HERE
    return $meta_boxes;
}
コード例 #7
0
function add_scripts_after_footer()
{
    // Register the script like this for a plugin:
    //wp_register_script( 'custom-script', plugins_url( '/js/custom-script.js', __FILE__ ) );
    // or
    // Register the script like this for a theme:
    wp_register_script('jquery1.7', "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js", false);
    wp_register_script('bootstrap-alert', get_template_directory_uri() . '/js/bootstrap-alert.js');
    wp_register_script('bootstrap-button', get_template_directory_uri() . '/js/bootstrap-button.js');
    wp_register_script('bootstrap-carousel', get_template_directory_uri() . '/js/bootstrap-carousel.js');
    wp_register_script('bootstrap-collapse', get_template_directory_uri() . '/js/bootstrap-collapse.js');
    wp_register_script('bootstrap-dropdown', get_template_directory_uri() . '/js/bootstrap-dropdown.js');
    wp_register_script('bootstrap-modal', get_template_directory_uri() . '/js/bootstrap-modal.js');
    wp_register_script('bootstrap-popover', get_template_directory_uri() . '/js/bootstrap-popover.js');
    wp_register_script('bootstrap-scrollspy', get_template_directory_uri() . '/js/bootstrap-scrollspy.js');
    wp_register_script('bootstrap-tab', get_template_directory_uri() . '/js/bootstrap-tab.js');
    wp_register_script('bootstrap-tooltip', get_template_directory_uri() . '/js/bootstrap-tooltip.js');
    wp_register_script('bootstrap-transition', get_template_directory_uri() . '/js/bootstrap-transition.js');
    wp_register_script('bootstrap-typeahead', get_template_directory_uri() . '/js/bootstrap-typeahead.js');
    // For either a plugin or a theme, you can then enqueue the script:
    wp_enqueue_script('jquery1.7');
    wp_enqueue_script('bootstrap-transition');
    wp_enqueue_script('bootstrap-alert');
    wp_enqueue_script('bootstrap-modal');
    wp_enqueue_script('bootstrap-dropdown');
    wp_enqueue_script('bootstrap-scrollspy');
    wp_enqueue_script('bootstrap-tab');
    wp_enqueue_script('bootstrap-tooltip');
    wp_enqueue_script('bootstrap-popover');
    wp_enqueue_script('bootstrap-button');
    wp_enqueue_script('bootstrap-collapse');
    wp_enqueue_script('bootstrap-carousel');
    wp_enqueue_script('bootstrap-typeahead');
}
コード例 #8
0
function wl_removeScripts()
{
    //De-Queuing Styles sheet
    wp_dequeue_style('default', get_template_directory_uri() . '/css/default.css');
    //EN-Queing Style sheet
    wp_enqueue_style('lite-brown', get_stylesheet_directory_uri() . '/green.css');
}
コード例 #9
0
ファイル: functions.php プロジェクト: joaosigno/dazake-job
/**
 * Ladda script
 */
function dazake_load_script()
{
    if (!is_admin()) {
        /**
         * Deregister wordpress scripts
         */
        wp_deregister_script('jquery');
        /**
         * wp_register_script( $handle, $src, $deps, $ver, $in_footer );
         */
        wp_register_script('jquery', 'http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js');
        wp_register_script('modernizr', get_template_directory_uri() . '/js/libs/modernizr.js');
        wp_register_script('bootstrap', get_template_directory_uri() . '/js/libs/bootstrap/js/bootstrap.min.js');
        wp_register_script('less', get_template_directory_uri() . '/js/libs/less.js');
        wp_register_script('main', get_template_directory_uri() . '/js/main.js');
        /**
         * Laddar skripten vi registrerat ovan.
         */
        wp_enqueue_script('jquery');
        wp_enqueue_script('modernizr');
        wp_enqueue_script('bootstrap');
        wp_enqueue_script('less');
        wp_enqueue_script('main');
        /**
         * load stylesheet
         */
        wp_enqueue_style('style', get_stylesheet_uri());
        wp_enqueue_style('bootstrap', get_template_directory_uri() . '/js/libs/bootstrap/css/bootstrap.min.css');
        wp_enqueue_style('bootstrap-responsive', get_template_directory_uri() . '/js/libs/bootstrap/css/bootstrap-responsive.min.css');
    }
}
コード例 #10
0
ファイル: scripts.php プロジェクト: mukeshkumar108/wd_s
/**
 * Enqueue scripts and styles.
 */
function _s_scripts()
{
    /**
     * If WP is in script debug, or we pass ?script_debug in a URL - set debug to true.
     */
    $debug = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG == true || isset($_GET['script_debug']) ? true : false;
    /**
     * If we are debugging the site, use a unique version every page load so as to ensure no cache issues.
     */
    $version = '1.0.0';
    /**
     * Should we load minified scripts? Also enqueue live reload to allow for extensionless reloading.
     */
    $suffix = '.min';
    if (true === $debug) {
        $suffix = '';
        wp_enqueue_script('live-reload', '//localhost:35729/livereload.js', array(), $version, true);
    }
    wp_enqueue_style('_s-google-font', _s_font_url(), array(), null);
    wp_enqueue_style('_s-style', get_stylesheet_directory_uri() . '/style' . $suffix . '.css', array(), $version);
    wp_enqueue_script('_s-project', get_template_directory_uri() . '/assets/js/project' . $suffix . '.js', array('jquery'), $version, true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
コード例 #11
0
ファイル: functions.php プロジェクト: Guillaume4259/theme2015
/**
 * Enqueue scripts and styles for the front end.
 *
 * @since Twenty Fourteen 1.0
 */
function ieseg2_scripts()
{
    //<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,300,400italic' rel='stylesheet' type='text/css'>
    // Add Source Sans.
    wp_enqueue_style('ieseg-source-sans', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,300,400italic', array(), null);
    // Add Genericons font, used in the main stylesheet.
    //wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.2' );
    // Load our main stylesheet.
    //wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array( 'genericons' ) );
    wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', false, '1.0');
    wp_enqueue_style('bootstrap-theme', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array('bootstrap'), '1.0');
    wp_enqueue_style('animate', get_template_directory_uri() . '/css/animate.css', false, '1.0');
    // utile pour wow.js
    wp_enqueue_style('style-ieseg', get_template_directory_uri() . '/css/ieseg.min.css', array('bootstrap'), '1.0');
    if (is_page(array(1766, 59))) {
        wp_enqueue_style('style-timeline', get_template_directory_uri() . '/css/timeline.css');
    }
    //wp_enqueue_style('fancybox','/wp-content/themes/'.get_template().'/lib/fancybox/jquery.fancybox-1.3.4.css',false,'1.0');
    // Load the Internet Explorer specific stylesheet.
    //wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style', 'genericons' ), '20131205' );
    //wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );
    //BX slider
    if (is_front_page() || is_page_template('template-page-programs.php')) {
        wp_enqueue_script('bxslider', get_template_directory_uri() . '/js/jquery.bxslider.min.js', array('jquery'), '1.0', true);
        wp_enqueue_style('style-bxslider', get_template_directory_uri() . '/css/jquery.bxslider.css', array('style-ieseg'), '1.0');
    }
    wp_enqueue_script('ieseg-script', get_template_directory_uri() . '/js/ieseg.js', array('jquery'), '1.0', true);
    wp_enqueue_script('bootstrap-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '1.0', true);
    wp_enqueue_script('wow', get_template_directory_uri() . '/js/wow.min.js', array('jquery'), '1.0', true);
    //wp_enqueue_script( 'responsive-nav', get_template_directory_uri() . '/js/responsive-nav.min.js', array( 'jquery' ), '1.0', true ); //menu de gauche responsive
    if (is_page(array('mib-class-profile', 'mib-career-opportunities', 'mfm-student-profiles', 'msc-digital-marketing-crm-class-profile', 'msc-business-analysis-consulting-class-profile', 'msc-accounting-audit-control', 'msc-finance-class-profile', 'msc-banking-capital-markets-class-profile', 'msc-in-negotiation-for-organizations-class-profile', 'msc-big-data-analytics-business-class-profile', 'imba-class-profile', 'programme-grande-ecole', 33306, 33325))) {
        wp_enqueue_script('classprofiles', get_bloginfo('template_directory') . '/js/classprofiles.js', array(), '1.1', true);
    }
}
コード例 #12
0
 /**
  * Enqueue the styles and scripts
  **/
 public function enqueue()
 {
     // styles
     wp_enqueue_style('lsx-font-picker-custom-control', get_template_directory_uri() . '/css/customizer-font.css');
     // scripts
     wp_enqueue_script('lsx-font-picker-custom-control', get_template_directory_uri() . '/js/customizer-font.js');
 }
コード例 #13
0
function theme_scripts_with_jquery()
{
    // For either a plugin or a theme, you can then enqueue the script:
    wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '', true);
    wp_enqueue_script('camera_js', get_template_directory_uri() . '/js/camera.js', array(), '', true);
    wp_enqueue_script('superfish_js', get_template_directory_uri() . '/js/superfish.js', array(), '', true);
}
コード例 #14
0
function kingjoytravel_js()
{
    global $wp_scripts;
    wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/vendor/bootstrap.min.js', array('jquery'), '', true);
    wp_enqueue_script('fastclick-js', get_template_directory_uri() . '/js/vendor/fastclick.js', '', '', true);
    wp_enqueue_script('app-js', get_template_directory_uri() . '/js/app.js', '', '', true);
}
コード例 #15
0
ファイル: tinymce.php プロジェクト: luxifel/Bionerd
function fb_add_tinymce_plugin($plugin_array)
{
    $plugin_array['td_shortcode_plugin'] = get_template_directory_uri() . '/includes/wp_booster/wp-admin/tinymce/customcodes.js';
    // Print all plugin js path
    //var_dump( $plugin_array );
    return $plugin_array;
}
コード例 #16
0
ファイル: custom-header.php プロジェクト: DonghuaLau/myblog
/**
 * Load our special font CSS files.
 *
 * @since Twenty Thirteen 1.0
 */
function twentythirteen_custom_header_fonts()
{
    // Add Source Sans Pro and Bitter fonts.
    wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null);
    // Add Genericons font.
    wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03');
}
コード例 #17
0
 public function print_scripts()
 {
     if (!isset($_REQUEST['page'])) {
         return;
     }
     $this->add_existed_script('jquery');
     $this->add_existed_script('plupload');
     //add de sort category
     $this->add_existed_script('jquery-ui-sortable');
     $this->add_script('lib-nested-sortable', ae_get_url() . '/assets/js/jquery.nestedSortable.js', array('jquery', 'jquery-ui-sortable'));
     // tam thoi add de xai
     $this->add_script('jquery-validator', ae_get_url() . '/assets/js/jquery.validate.min.js', 'jquery');
     $this->add_script('ae-colorpicker', ae_get_url() . '/assets/js/colorpicker.js', array('jquery'));
     $this->add_script('marionette', ae_get_url() . '/assets/js/marionette.js', array('jquery', 'underscore', 'backbone'));
     // control backend user list
     $this->add_script('gmap', ae_get_url() . '/assets/js/gmap.js', array('et-googlemap-api'));
     // ae core js appengine
     $this->add_script('appengine', ae_get_url() . '/assets/js/appengine.js', array('jquery', 'underscore', 'backbone', 'marionette', 'plupload', 'ae-colorpicker'));
     // control backend user list
     $this->add_script('backend-user', ae_get_url() . '/assets/js/user-list.js', array('appengine'));
     // control backend order list
     $this->add_script('order-list', ae_get_url() . '/assets/js/payment-list.js', array('appengine'));
     //  option settings and save
     $this->add_script('option-view', ae_get_url() . '/assets/js/option-view.js', array('appengine'));
     // control option translate
     $this->add_script('language-view', ae_get_url() . '/assets/js/language-view.js', array('appengine', 'option-view'));
     // control pack view add delete update pack
     $this->add_script('pack-view', ae_get_url() . '/assets/js/pack-view.js', array('appengine', 'option-view'));
     // backend js it should be separate by theme
     $this->add_script('backend', ae_get_url() . '/assets/js/backend.js', array('appengine'));
     wp_localize_script('appengine', 'ae_globals', array('ajaxURL' => admin_url('admin-ajax.php'), 'imgURL' => ae_get_url() . '/assets/img/', 'jsURL' => ae_get_url() . '/assets/js/', 'themeImgURL' => get_template_directory_uri() . '/img/', 'loadingImg' => '<img class="loading loading-wheel" src="' . ae_get_url() . '/assets/img/loading.gif" alt="' . __('Loading...', 'aecore-class-ae-page-backend') . '">', 'loading' => __('Loading', 'aecore-class-ae-page-backend'), 'texts' => array('limit_category_level' => __("Categories' level is limited to 3", 'aecore-class-ae-page-backend')), 'ae_is_mobile' => et_load_mobile() ? 1 : 0, 'plupload_config' => array('max_file_size' => '3mb', 'url' => admin_url('admin-ajax.php'), 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), 'filters' => array(array('title' => __('Image Files', 'aecore-class-ae-page-backend'), 'extensions' => 'jpg,jpeg,gif,png')))));
 }
コード例 #18
0
ファイル: functions.php プロジェクト: ko31/pigeon
/**
 * JavaScript読み込み
 */
function pigeon_enqueue_scripts()
{
    wp_enqueue_script('jquery');
    wp_enqueue_script('html5shiv', get_template_directory_uri() . '/js/html5shiv.min.js');
    wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');
    wp_enqueue_script('respond', get_template_directory_uri() . '/js/respond.min.js');
}
コード例 #19
0
ファイル: init.php プロジェクト: gigikir/adebe
 public static function ktz_definitions()
 {
     /* 
      * Get slug for kentooz framework look @ define( 'ktz_theme_textdomain', ktz_theme_slug );
      */
     define('ktz_theme_slug', get_template());
     /* 
      * Retrieves the absolute path to the directory of the current theme, without the trailing slash.
      * ktz or kentooz use directory /includes for all function
      */
     define('ktz_dir', get_template_directory() . '/');
     define('ktz_inc', get_template_directory() . '/includes/');
     /* 
      * Retrieve template directory URI for the current theme. Checks for SSL.
      * Note: Does not return a trailing slash following the directory address. 
      * This can use path for JS, stylesheet, or image
      * ktz or kentooz use directory /includes for all function
      */
     define('ktz_url', get_template_directory_uri() . '/');
     define('ktz_styleinc', get_template_directory_uri() . '/includes/');
     /* 
      * Get locale or translating for kentooz framework
      */
     define('ktz_theme_textdomain', ktz_theme_slug);
 }
コード例 #20
0
 function foundationpress_scripts()
 {
     // Enqueue Main Stylesheet
     wp_enqueue_style('Main Stylesheet', get_stylesheet_directory_uri() . '/css/foundation.css');
     // Deregister the jquery version bundled with wordpress
     wp_deregister_script('jquery');
     // Modernizr is used for polyfills and feature detection. Must be placed in header. (Not required)
     wp_register_script('modernizr', get_template_directory_uri() . '/js/vendor/modernizr.js', array(), '2.8.3', false);
     // Fastclick removes the 300ms delay on click events in mobile environments. Must be placed in header. (Not required)
     wp_register_script('fastclick', get_template_directory_uri() . '/js/vendor/fastclick.js', array(), '1.0.0', false);
     // CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.
     wp_enqueue_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false);
     // Self hosted jQuery placed in the footer. (Comment the script above and uncomment the script below if you want to switch).
     //wp_register_script( 'jquery', get_template_directory_uri() . '/js/vendor/jquery.js', array(), '2.1.3', true );
     // If you'd like to cherry-pick the foundation components you need in your project, head over to Gruntfile.js and see lines 67-88
     // It's a good idea to do this, performance-wise. No need to load everything if you're just going to use the grid anyway, you know :)
     wp_register_script('foundation', get_template_directory_uri() . '/js/foundation.js', array('jquery'), '5.5.1', true);
     wp_register_script('troispointszero', get_template_directory_uri() . '/js/custom/troispointzero.js', array('jquery'), '1.0');
     // Enqueue all registered scripts
     wp_enqueue_script('modernizr');
     wp_enqueue_script('fastclick');
     wp_enqueue_script('jquery');
     wp_enqueue_script('foundation');
     wp_enqueue_script('troispointszero');
 }
コード例 #21
0
ファイル: functions.php プロジェクト: blinkcursor/stockholm
function theme_enqueue_styles()
{
    wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css', array(), '20150407');
    wp_enqueue_style('child-style', get_stylesheet_uri(), array('parent-style', '20150407'));
    wp_enqueue_style('dashicons');
    // add dashicons to front end
}
コード例 #22
0
ファイル: enqueue-scripts.php プロジェクト: stevelolz/dean
function site_scripts()
{
    global $wp_styles;
    // Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    // Load What-Input files in footer
    wp_enqueue_script('what-input', get_template_directory_uri() . '/vendor/what-input/what-input.min.js', array(), '', true);
    // Adding Foundation scripts file in the footer
    wp_enqueue_script('foundation-js', get_template_directory_uri() . '/assets/js/foundation.min.js', array('jquery'), '6.0', true);
    // Adding scripts file in the footer
    wp_enqueue_script('site-js', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery', 'masonry'), '', true);
    // Adding scripts file in the footer
    wp_enqueue_script('slick', get_template_directory_uri() . '/assets/js/slick.min.js', array('jquery'), '', true);
    // Adding imagesLoaded
    wp_enqueue_script('imagesLoaded', get_template_directory_uri() . '/node_modules/imagesloaded/imagesloaded.pkgd.min.js', array('jquery'), '', true);
    // Adding Slick Nav
    wp_enqueue_script('slicknav', get_template_directory_uri() . '/assets/js/slicknav/dist/jquery.slicknav.min.js', array('jquery'), '', true);
    // Smooth Scroll
    wp_enqueue_script('smoscroll', get_template_directory_uri() . '/assets/js/jquery.smooth-scroll.min.js', array("jquery"), '3.3.2', true);
    // Register main stylesheet
    wp_enqueue_style('site-css', get_template_directory_uri() . '/assets/css/style.css', array(), '', 'all');
    // Register main stylesheet
    wp_enqueue_style('slicknav-css', get_template_directory_uri() . '/assets/css/slicknav.css', array(), '', 'all');
    // Register Foundation Icons
    wp_enqueue_style('icons', get_template_directory_uri() . '/assets/css/social_foundicons.css', array(), '', 'all');
    wp_enqueue_style('iconsie7', get_template_directory_uri() . '/assets/css/social_foundicons_ie7.css', array(), '', 'all');
    // Comment reply script for threaded comments
    if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
        wp_enqueue_script('comment-reply');
    }
}
コード例 #23
0
ファイル: enqueue.php プロジェクト: derk153/diamescort
/**
 * understrap enqueue scripts
 *
 * @package understrap
 */
function understrap_scripts()
{
    // wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), '0.2.8', false );
    wp_enqueue_style('understrap-theme', get_stylesheet_directory_uri() . '/css/theme.css', array(), '0.2.8', false);
    // wp_enqueue_script('jquery');
    wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery.js', array(), '2.1.4', false);
    wp_enqueue_script('understrap-navigation', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20120206', true);
    wp_enqueue_script('understrap-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);
    // angular relations
    wp_enqueue_script('angular', get_template_directory_uri() . '/js/angular.js', array(), '1.4.9', true);
    wp_enqueue_script('angular-ui-router', '//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.17/angular-ui-router.min.js', array(), '0.2.17', true);
    wp_enqueue_script('angular-animate', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-animate.js', array(), '1.4.9', true);
    wp_enqueue_script('angular-sanitize', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-sanitize.min.js', array(), '1.4.9', true);
    wp_enqueue_script('ui-bootstrap', '//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.1.2.js', array(), '1.1.2', true);
    // Angualr APP
    wp_enqueue_script('app', get_template_directory_uri() . '/js/app.js', array(), null, true);
    // Custom JS
    wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', array(), null, true);
    // NON SASS CSS
    wp_enqueue_style('animate', get_stylesheet_directory_uri() . '/css/animate.css', array(), '0.2.8', false);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_active_sidebar('hero')) {
        wp_enqueue_style('understrap-carousel-style', get_template_directory_uri() . '/css/owl.carousel.css', array(), '20024', false);
        wp_enqueue_script('understrap-carousel-script', get_template_directory_uri() . '/js/owl.carousel.min.js', array(), '20024', true);
    }
}
コード例 #24
0
 /**
  * Upload the Javascripts for the media uploader
  */
 public function upload_scripts()
 {
     wp_enqueue_script('media-upload');
     wp_enqueue_script('thickbox');
     wp_enqueue_script('upload_media_widget', get_template_directory_uri() . '/widgets/upload-media.js', array('jquery'));
     wp_enqueue_style('thickbox');
 }
コード例 #25
0
/**
 * Enqueue scripts and styles for the theme.
 */
function fast_scripts()
{
    //LOAD style.css via filesystem. Uses Sass to ompile '/assets/scss/style.scss' to: 'styl.css'
    wp_enqueue_style('fast-sass', get_stylesheet_uri(), array(), '1.0.0');
    //LOAD jQuery.min.js via CDN JS
    wp_enqueue_script('fast-jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js', array(), '1.0.0', true);
    //LOAD Boostrap.min.js via CDN JS
    wp_enqueue_script('fast-bootstrap', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js', array(), '1.0.0', true);
    //LOAD navigation.js via filesystem
    wp_enqueue_script('fast-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '1.0.0', true);
    //LOAD fast-skip-link-focus.js via filesystem
    //wp_enqueue_script( 'fast-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '1.0.0', true );
    //LOAD instantclick.js via CDN JS
    wp_enqueue_script('fast-instantclick', 'https://cdnjs.cloudflare.com/ajax/libs/instantclick/3.0.1/instantclick.min.js', array(), '1.0.0', true);
    //CALL instant click into end of footer scripts, for init
    function call_instant_click()
    {
        echo '<script data-no-instant>InstantClick.init();</script>';
    }
    add_action('wp_footer', 'call_instant_click', 200);
    //load at end
    //IF IS singlular & comments are enabled, load comment-reply.js via filesystem
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
コード例 #26
0
function reciprocal_essential_functions()
{
    // for dynamic title
    add_theme_support('title-tag');
    // for customize Header Image
    $els_header_img = array('default-image' => get_template_directory_uri() . '/images/custom-header-bg.jpg');
    add_theme_support('custom-header', $els_header_img);
    //---------------------------
    // for customize background color
    add_theme_support('custom-background');
    //---------------------------
    // for add featured image
    add_theme_support('post-thumbnails');
    //---------------------------
    // theme textdomain
    load_theme_textdomain('reciprocal', get_template_directory_uri() . '/languages');
    //---------------------------
    // for menu register--------
    if (function_exists('register_nav_menus')) {
        register_nav_menus(array('prodhanmenu' => __('Main Menu', 'reciprocal'), 'nichermenu' => __('Footer Menu', 'reciprocal')));
    }
    //---------------------------
    function short_description($limit)
    {
        $content = explode(' ', get_the_content());
        $less_content = array_slice($content, 0, $limit);
        echo implode(' ', $less_content);
    }
}
コード例 #27
0
ファイル: functions.php プロジェクト: OlgaX/wp-template
function ox_adding_scripts()
{
    if (!function_exists('is_login_page')) {
        function is_login_page()
        {
            return !strncmp($_SERVER['REQUEST_URI'], '/wp-login.php', strlen('/wp-login.php'));
        }
    }
    if (!is_admin() && !is_login_page()) {
        /*removed wp-embed.min.js*/
        wp_deregister_script('wp-embed');
        /*jquery*/
        wp_deregister_script('jquery');
        $infooter = !is_page(array($order_form_pages)) ? true : false;
        wp_register_script('jquery', "http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js", false, '1.11.3', $infooter);
        wp_enqueue_script('jquery');
        /*bootstrap*/
        wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');
        /*slicknav menu*/
        wp_enqueue_script('slicknav', get_template_directory_uri() . '/js/jquery.slicknav.min.js', array('jquery'), '', true);
        /*bxslider*/
        wp_enqueue_style('bxslider', get_template_directory_uri() . '/css/jquery.bxslider.min.css');
        wp_enqueue_script('bxslider', get_template_directory_uri() . '/js/jquery.bxslider.min.js', array('jquery'), '', true);
        /*zopim chat*/
        wp_enqueue_script('zopim', get_template_directory_uri() . '/js/zopimClear.js', array('jquery'), '', true);
        /*custom css*/
        wp_enqueue_style('custom', get_template_directory_uri() . '/style.css', array('bootstrap'));
        /*custom js*/
        wp_enqueue_script('custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '', true);
    }
}
コード例 #28
0
ファイル: theme-options.php プロジェクト: hiroki-tkg/bitmaker
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.3.0
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'themecountry'), 'content' => '<p>' . __('Help content goes here!', 'themecountry') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'themecountry') . '</p>'), 'sections' => array(array('id' => 'option_general', 'title' => __('General', 'themecountry')), array('id' => 'option_style', 'title' => __('Styles', 'themecountry')), array('id' => 'option_header', 'title' => __('Header', 'themecountry')), array('id' => 'option_footer', 'title' => __('Footer', 'themecountry')), array('id' => 'option_blog', 'title' => __('Home Page', 'themecountry')), array('id' => 'option_home_slider', 'title' => __('Feature Slider', 'themecountry')), array('id' => 'option_single', 'title' => __('Single Post', 'themecountry')), array('id' => 'option_sidebar', 'title' => __('Sidebar', 'themecountry')), array('id' => 'option_social_button', 'title' => __('Social Buttons', 'themecountry')), array('id' => 'option_typography', 'title' => __('Typography', 'themecountry')), array('id' => 'option_ad_mangment', 'title' => __('Ad Managment', 'themecountry')), array('id' => 'option_import_export', 'title' => __('Import/Export', 'themecountry'))), 'settings' => array(array('id' => 'responsive', 'label' => __('Responsiveness', 'themecountry'), 'desc' => __('Wimple pro is responsive witch mean that the layout is adapt to Mobile and table screen. Using This option to enable or disable responsiveness.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'header-code', 'label' => __('Header Code', 'themecountry'), 'desc' => __('If you have any code you want to appear between and , Pastes it here. For example: Google Web Master Cool Code or Pinterest Verify Code.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'tracking-code', 'label' => __('Footer Code (Tracing, JavaScript Code)', 'themecountry'), 'desc' => __('If you have tracking code (Google Analytic or other ), Pastes Your Code here which be inserted before the closing body tag of your theme.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'page-comments', 'label' => __('Comment on Page', 'themecountry'), 'desc' => __('Use this option to to enable or completely Hide Comment and Comment form on Page', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'back_to_top', 'label' => __('Back To Top Button', 'themecountry'), 'desc' => __('Use this option to hide or show "Back To Top" button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'logo', 'label' => __('Custom Logo Image', 'themecountry'), 'desc' => __('Upload your custom logo image here.', 'themecountry'), 'type' => 'upload', 'section' => 'option_header'), array('id' => 'header_layout', 'label' => __('Header Layout', 'themecountry'), 'desc' => __('Use this option to Choose Header Design Style for your website.', 'themecountry'), 'std' => 'left', 'type' => 'radio-image', 'section' => 'option_header', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Header Content With Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/header-menu.png'), array('value' => 'right', 'label' => __('Header Suppurate From Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/menu-out-of-header.png'))), array('id' => 'fixed_menu', 'label' => __('Floating Navigation Menu', 'themecountry'), 'desc' => __('Use this option to enable Floating Navigation Menu.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_header'), array('id' => 'footer-widgets', 'label' => __('Footer Widget Columns', 'themecountry'), 'desc' => __('Select Number of Columns for your Footer area or Disable it.', 'themecountry'), 'std' => '3', 'type' => 'radio-image', 'section' => 'option_footer', 'class' => '', 'choices' => array(array('value' => '0', 'label' => __('Disable', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/layout-off.png'), array('value' => '1', 'label' => __('1 Column', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-1.png'), array('value' => '2', 'label' => __('2 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-2.png'), array('value' => '3', 'label' => __('3 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-3.png'))), array('id' => 'copyright', 'label' => __('Footer Copyright Text', 'themecountry'), 'desc' => __('Add Text you want to show in "Copyright Sction" at Bottom Left of your Website.', 'themecountry'), 'type' => 'textarea-simple', 'rows' => '3', 'section' => 'option_footer'), array('id' => 'post-text', 'label' => __('Home Page Entry Text', 'themecountry'), 'desc' => __('Use this option to show Expert or Full Content from your each post show on Homepage and Archive Page.', 'themecountry'), 'std' => 'excerpt', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'excerpt', 'label' => __('Show Excerpt', 'themecountry')), array('value' => 'content', 'label' => __('Show Content', 'themecountry')))), array('id' => 'home-post-read-more', 'label' => __('Read More Button', 'themecountry'), 'desc' => __('Enable or Disable Read More Button on Homepage for Each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'excerpt-length', 'label' => 'Excerpt Length', 'desc' => __('Number of word as Expert Length To be Shown in Homepage when you choose to show entry text as Excerpt.', 'themecountry'), 'std' => '34', 'type' => 'numeric-slider', 'section' => 'option_blog', 'min_max_step' => '0,100,1'), array('id' => 'home-post-meta', 'label' => __('HomePage & Single Post Meta Info', 'themecountry'), 'desc' => __('Use this button to Show or Hide Post Meta Info on HomePage. (Author name, Date etc.).', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'home-post-meta-show', 'label' => __('What To Hide in Meta Info', 'themecountry'), 'desc' => __('Choose What Meta Info to Hide.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_blog', 'choices' => array(array('value' => 'autho_name', 'label' => __('Author Name', 'themecountry')), array('value' => 'date', 'label' => __('Date', 'themecountry')), array('value' => 'category', 'label' => __('Category', 'themecountry')), array('value' => 'tag', 'label' => __('Tag', 'themecountry')), array('value' => 'comment_count', 'label' => __('Comment Count', 'themecountry')))), array('id' => 'pagination', 'label' => __('Pagination', 'themecountry', 'themecountry'), 'desc' => __('Choose your Preferred Pagination Style.', 'themecountry'), 'std' => 'default', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'default', 'label' => __('Default (Older Posts/Newer Posts)', 'themecountry')), array('value' => 'numberal', 'label' => __('Numberal (1 2 3 ...)', 'themecountry')), array('value' => 'loading', 'label' => __('Load More...', 'themecountry')), array('value' => 'infinite', 'label' => __('Auto Infinite Scroll', 'themecountry')))), array('id' => 'enable-home-slider', 'label' => __('Featured Content Slider', 'themecountry'), 'desc' => __('use this option to enable or Disable Featured Content Slider.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'number-of-post', 'label' => __('Number of Slides', 'themecountry'), 'desc' => __('Enter the number of Slides', 'themecountry'), 'std' => '5', 'type' => 'text', 'section' => 'option_home_slider'), array('id' => 'type-of-slider', 'label' => __('Use Categories Slider', 'themecountry'), 'desc' => __('Use Post from Category As Featured Content Sliders', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'category-slide-option', 'label' => __('Choose Categories', 'themecountry'), 'desc' => '', 'std' => '', 'type' => 'category-checkbox', 'section' => 'option_home_slider', 'operator' => 'and'), array('id' => 'customize_slider_option', 'label' => __('Custom Sliders', 'themecountry'), 'desc' => __('With this option you can set up a Sliders with custom image and text instead of the default slidshow automatically generated from your posts.', 'themecountry'), 'std' => '', 'type' => 'list-item', 'section' => 'option_home_slider', 'operator' => 'and', 'settings' => array(array('id' => 'slide_image', 'label' => __('Image', 'themecountry'), 'desc' => __('Upload or select an image for this slide', 'themecountry'), 'type' => 'upload'), array('id' => 'slide_url', 'label' => __('Link', 'themecountry'), 'desc' => __('URL of the slide', 'themecountry'), 'std' => '#', 'type' => 'text', 'operator' => 'and'))), array('id' => 'author-bio', 'label' => __('Author Bio', 'themecountry'), 'desc' => __('Display Author Bio below each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'author-highlight', 'label' => __('Highlight Author Comment', 'themecountry'), 'desc' => __('Use this Option to highlight author comments.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'breadcrumb', 'label' => __('Breadcrumbs', 'themecountry'), 'desc' => __('Use This Option to enable or Disable breadcrumbs.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'yoast_breadcrumb', 'desc' => __('Check it if you install WordPress SEO by Yoast', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_single', 'choices' => array(array('value' => 'yoast_breadcrumb_yes', 'label' => __('Use Yoast Breadcrumb', 'option-tree-theme')))), array('id' => 'post-nav', 'label' => __('Post Navigation', 'themecountry'), 'desc' => __('Shows links to the next and previous post', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'post-related', 'label' => __('Related Posts', 'themecountry'), 'desc' => __('Use This Option to enable or Disable related Posts below your Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'related-posts-taxonomy', 'label' => __('Related Posts Taxonomy', 'themecountry'), 'desc' => __('Choose the Way Related Post Work.', 'themecountry'), 'std' => 'tag', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'tag', 'label' => 'Tags'), array('value' => 'category', 'label' => 'Categories'))), array('id' => 'number-related', 'std' => '3', 'label' => __('Number Related Posts', 'themecountry'), 'desc' => __('Enter the number of posts to show in the related posts section.', 'themecountry'), 'type' => 'text', 'section' => 'option_single'), array('id' => 'display-related-posts', 'label' => __('Display Related Posts', 'themecountry'), 'desc' => __('Related Posts type to display.'), 'std' => 'thumbnail', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'thumbnail', 'label' => __('Thumbnail and Title', 'themecountry')), array('value' => 'list', 'label' => __('Only Tittle, In List style.', 'themecountry')))), array('id' => 'pinterest', 'label' => __('Pinterest Pin In Button', 'themecountry'), 'desc' => __('Use This Option to enable or Disable Pinterest "Pin In" button which will be shown when visitor add mouse hover images in your post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'sidebar-areas', 'label' => __('Create Sidebars', 'themecountry'), 'desc' => __('Create Custom Sidebars Here if you want to Have Different Sidebar for Homepage and Single Post and So on.', 'themecountry'), 'type' => 'list-item', 'section' => 'option_sidebar', 'choices' => array(), 'settings' => array(array('id' => 'id', 'label' => __('Sidebar ID', 'themecountry'), 'desc' => __('This ID must be unique, for example "sidebar-about"', 'themecountry'), 'std' => 'sidebar-select', 'type' => 'text', 'choices' => array()))), array('id' => 's1-home', 'label' => __('Home', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Hompage.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-single', 'label' => __('Single', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Single Post.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive', 'label' => __('Archive (Date Based)', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Archive Page (Date Based Archive)', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive-category', 'label' => __('Archive Category', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Category Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-search', 'label' => __('Search', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Search Page', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-404', 'label' => __('Error 404', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Error 404, Page Not Found" Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-page', 'label' => __('Page', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Page".', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 'tc-google-typography', 'label' => '', 'desc' => '', 'type' => 'typography-google', 'section' => 'option_typography'), array('id' => 'social-button-enable', 'label' => __('Social Sharing Button', 'themecountry'), 'desc' => __('Use This Option to Show Social Sharing Button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'twitter-username', 'label' => __('Twitter Username', 'themecountry'), 'desc' => __('Your @username will be added to share-tweets of your posts (optional)', 'themecountry'), 'type' => 'text', 'section' => 'option_social_button'), array('id' => 'social-sharing-pos', 'label' => __('Social Sharing Buttons Position', 'themecountry'), 'desc' => __('Choose position for Social Sharing Buttons.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_social_button', 'std' => 'top', 'choices' => array(array('value' => 'top', 'label' => __('After Title', 'themecountry')), array('value' => 'bottom', 'label' => __('After Post', 'themecountry')), array('value' => 'float', 'label' => __('Float Social To Left', 'themecountry')))), array('id' => 'social-twitter', 'label' => __('Twitter', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-facebook', 'label' => __('Facebook', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-google-plus', 'label' => __('Google Plus', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-linkedin', 'label' => __('Linkedin', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-pinterest', 'label' => __('Pinterest', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'ad-header-banner', 'label' => __('Header Banner Ads', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown on the top of Header ( Note: This Ads won`t be shown If you choose the 1st design in Header Option )', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'ad-after-post-title', 'label' => __('Below Post Title', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post title.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'top-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-middle-post', 'label' => __('Middle Post Content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown right middle of your post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'middle-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-below-post', 'label' => __('Below Post content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'below-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'duration-ads-top', 'label' => __('Ads and Post Age', 'themecountry'), 'desc' => __('Only Show Ads on Post Which is Older than number of days you choose.', 'themecountry'), 'type' => 'numeric-slider', 'std' => '100', 'section' => 'option_ad_mangment'), array('id' => 'layout-width-sidebar', 'label' => __('Layout', 'themecountry'), 'desc' => __('Choose To Show Sidebar On Left Or Right or No-Sidebar', 'themecountry'), 'std' => 'right', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Sidebare Left', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cr.png'), array('value' => 'right', 'label' => __('Sidebar Right', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cl.png'), array('value' => 'no-sidebar', 'label' => __('No Sidebar', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-1cl.png'))), array('id' => 'on-off-option-style', 'label' => __('Custom Header Color', 'themecountry'), 'desc' => __('Enable Custom Header Color Setting Or Use Our Ready Made Color Scheme.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_style'), array('id' => 'header_style', 'label' => __('Ready Made Header Color Scheme', 'themecountry'), 'desc' => __('Choose Color You Like.', 'themecountry'), 'std' => 'default', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'default', 'label' => '', 'src' => get_template_directory_uri() . '/images/default.jpg'), array('value' => 'green-sea', 'label' => '', 'src' => get_template_directory_uri() . '/images/green-sea.jpg'), array('value' => 'belize-hole', 'label' => '', 'src' => get_template_directory_uri() . '/images/belize-hole.jpg'), array('value' => 'wisteria', 'label' => '', 'src' => get_template_directory_uri() . '/images/wisteria.jpg'), array('value' => 'midnight-blue', 'label' => '', 'src' => get_template_directory_uri() . '/images/midnight-blue.jpg'), array('value' => 'orange', 'label' => '', 'src' => get_template_directory_uri() . '/images/orange.jpg'), array('value' => 'pumkin', 'label' => '', 'src' => get_template_directory_uri() . '/images/pumkin.jpg'), array('value' => 'asbestos', 'label' => '', 'src' => get_template_directory_uri() . '/images/asbestos.jpg'), array('value' => 'pomegranate', 'label' => '', 'src' => get_template_directory_uri() . '/images/pomegranate.jpg'))), array('id' => 'primary_header_color', 'label' => __('Custom Primary Header Color', 'themecountry'), 'desc' => __('Pick the primary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'secondary_header_color', 'label' => __('Custom Secondary Header Color', 'themecountry'), 'desc' => __('Pick the secondary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'custom_style', 'label' => __('Custom CSS', 'themecountry'), 'desc' => __('Add you CSS Custom Code here. (Only For Advance User)', 'themecountry'), 'type' => 'css', 'section' => 'option_style', 'rows' => '3'), array('id' => 'text_desscription_import_export', 'desc' => sprintf(__('<b>Click link to <a href="%s">Import/Export</a></b>', 'themecountry'), admin_url('themes.php?page=tc-theme-backup')), 'std' => '', 'type' => 'textblock', 'section' => 'option_import_export')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
コード例 #29
0
function my_post_type_portfolio() {
	register_post_type( 'portfolio',
		array( 
				'label'             => theme_locals("portfolio"),
				'singular_label'    => theme_locals("portfolio"),
				'_builtin'          => false,
				'public'            => true, 
				'show_ui'           => true,
				'show_in_nav_menus' => true,
				'hierarchical'      => true,
				'capability_type'   => 'page',
				'menu_icon'         => get_template_directory_uri() . '/includes/images/icon_portfolio.png',
				'rewrite'           => array(
					'slug'       => 'portfolio-view',
					'with_front' => FALSE,
				),
				'supports' => array(
						'title',
						'editor',
						'thumbnail',
						'excerpt',
						'custom-fields',
						'comments')
					) 
				);
	register_taxonomy('portfolio_category', 'portfolio', array('hierarchical' => true, 'label' => theme_locals("categories"), 'singular_name' => theme_locals("category"), "rewrite" => true, "query_var" => true));
	register_taxonomy('portfolio_tag', 'portfolio', array('hierarchical' => false, 'label' => theme_locals("tags"), 'singular_name' => theme_locals("tag"), 'rewrite' => true, 'query_var' => true));
}
コード例 #30
0
ファイル: functions.php プロジェクト: TheDraguun/julitewoo
function avada_child_scripts()
{
    if (!is_admin() && !in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))) {
        $theme_info = wp_get_theme();
        wp_enqueue_style('avada-child-stylesheet', get_template_directory_uri() . '/style.css', array(), $theme_info->get('Version'));
    }
}