コード例 #1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     // CSS default
     $css_default_lines = array();
     $css_default_lines[] = '.rp4wp-related-posts ul{width:100%;padding:0;margin:0;float:left;}';
     $css_default_lines[] = '.rp4wp-related-posts ul>li{list-style:none;padding:0;margin:0;padding-bottom:20px;clear:both;}';
     $css_default_lines[] = '.rp4wp-related-posts ul>li>p{margin:0;padding:0;}';
     $css_default_lines[] = '.rp4wp-related-post-image{width:35%;padding-right:25px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;}';
     if (is_rtl()) {
         $css_default_lines = array();
         $css_default_lines[] = '.rp4wp-related-posts ul{width:100%;padding:0;margin:0;float:right;}';
         $css_default_lines[] = '.rp4wp-related-posts ul>li{list-style:none;padding:0;margin:0;padding-bottom:20px;float:right;}';
         $css_default_lines[] = '.rp4wp-related-posts ul>li>p{margin:0;padding:0;}';
         $css_default_lines[] = '.rp4wp-related-post-image{width:35%;padding-left:25px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:right;}';
     }
     // The fields
     $this->sections = array('general' => array('id' => 'general', 'label' => __('General', 'related-posts-for-wp'), 'description' => __('The following options affect the general behaviour of the plugin.', 'related-posts-for-wp'), 'fields' => array(array('id' => 'automatic_linking', 'label' => __('Enable', 'related-posts-for-wp'), 'description' => __('Checking this will enable automatically linking posts to new posts', 'related-posts-for-wp'), 'type' => 'checkbox', 'default' => 1), array('id' => 'automatic_linking_post_amount', 'label' => __('Amount of Posts', 'related-posts-for-wp'), 'description' => __('The amount of automatically linked post', 'related-posts-for-wp'), 'type' => 'text', 'default' => '3'), array('id' => 'heading_text', 'label' => __('Heading text', 'related-posts-for-wp'), 'description' => __('The text that is displayed above the related posts. To disable, leave field empty.', 'related-posts-for-wp'), 'type' => 'text', 'default' => __('Related Posts', 'related-posts-for-wp')), array('id' => 'excerpt_length', 'label' => __('Excerpt length', 'related-posts-for-wp'), 'description' => __('The amount of words to be displayed below the title on website. To disable, set value to 0.', 'related-posts-for-wp'), 'type' => 'text', 'default' => '15'))), 'styling' => array('id' => 'styling', 'label' => __('Styling', 'related-posts-for-wp'), 'description' => __('The following options affect how related posts are displayed on the frontend.', 'related-posts-for-wp'), 'fields' => array(array('id' => 'display_image', 'label' => __('Display Image', 'related-posts-for-wp'), 'description' => __('Checking this will enable displaying featured images of related posts.', 'related-posts-for-wp'), 'type' => 'checkbox', 'default' => 0), array('id' => 'css', 'label' => __('CSS', 'related-posts-for-wp'), 'description' => __('Warning! This is an advanced feature! An error here will break frontend display. To disable, leave field empty.', 'related-posts-for-wp'), 'type' => 'textarea', 'default' => implode(PHP_EOL, $css_default_lines)))), 'misc' => array('id' => 'misc', 'label' => __('Misc', 'related-posts-for-wp'), 'description' => __("A shelter for options that just don't fit in anywhere else.", 'related-posts-for-wp'), 'fields' => array(array('id' => 'restart_wizard_button', 'label' => __('Restart the wizard?', 'related-posts-for-wp'), 'description' => __("Click this button if you want to restart the wizard. Please note that this will delete all current related post links, also those you've manually added. Of course, we will never delete your actual posts.", 'related-posts-for-wp'), 'type' => 'button_link', 'href' => admin_url('?page=rp4wp_install&reinstall=1&rp4wp_nonce=' . wp_create_nonce(RP4WP_Constants::NONCE_INSTALL)), 'default' => __('Restart wizard', 'related-posts-for-wp')), array('id' => 'clean_on_uninstall', 'label' => __('Remove Data on Uninstall?', 'related-posts-for-wp'), 'description' => __('Check this box if you would like to completely remove all of its data when the plugin is deleted.', 'related-posts-for-wp'), 'type' => 'checkbox', 'default' => 0), array('id' => 'show_love', 'label' => __('Show love?', 'related-posts-for-wp'), 'description' => __("Display a 'Powered by' line under your related posts. <strong>BEWARE! Only for the real fans.</strong>", 'related-posts-for-wp'), 'type' => 'checkbox', 'default' => 0))));
     // Set defaults
     foreach ($this->sections as $section) {
         foreach ($section['fields'] as $field) {
             $this->defaults[$field['id']] = $field['default'];
         }
     }
     // Setup settings
     add_action('admin_init', array($this, 'setup'));
 }
コード例 #2
0
ファイル: core.php プロジェクト: ashermanwmf/wordpress_test
function optimizer_body_class($classes)
{
    global $optimizer;
    // add classes to the $classes array
    $classes[] = '' . $optimizer['site_layout_id'] . '';
    if (!empty($optimizer['head_transparent'])) {
        $classes[] = 'has_trans_header';
    }
    global $optimizerdb;
    if (!empty($optimizerdb) && empty($optimizer['converted'])) {
        if ($optimizer['n_posts_type_id'] == 'product') {
            $classes[] = 'woocommerce';
        }
    }
    if ('site_boxed' == $optimizer['site_layout_id']) {
        $classes[] = 'is_boxed';
    }
    if (is_rtl()) {
        $classes[] = 'layer_rtl';
    }
    if (!is_front_page()) {
        $classes[] = 'not_frontpage';
    }
    if (is_customize_preview()) {
        $classes[] = 'customizer-prev';
    }
    return $classes;
}
コード例 #3
0
ファイル: scripts.php プロジェクト: kimyj9501/SingMyStory
function ct_author_load_scripts_styles()
{
    wp_register_style('ct-author-google-fonts', '//fonts.googleapis.com/css?family=Rokkitt:400|Lato:400');
    // main JS file
    wp_enqueue_script('ct-author-js', get_template_directory_uri() . '/js/build/production.min.js', array('jquery'), '', true);
    wp_localize_script('ct-author-js', 'objectL10n', array('openPrimaryMenu' => __('open primary menu', 'author'), 'closePrimaryMenu' => __('close primary menu', 'author'), 'openChildMenu' => __('open child menu', 'author'), 'closeChildMenu' => __('close child menu', 'author')));
    // Google Fonts
    wp_enqueue_style('ct-author-google-fonts');
    // Font Awesome
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/font-awesome/css/font-awesome.min.css');
    // load primary stylesheet
    if (is_rtl()) {
        wp_enqueue_style('ct-author-style-rtl', get_template_directory_uri() . '/styles/rtl.min.css');
    } else {
        wp_enqueue_style('ct-author-style', get_stylesheet_uri());
    }
    // enqueue comment-reply script only on posts & pages with comments open ( included in WP core )
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    /* Load Polyfills */
    // HTML5 shiv
    wp_enqueue_script('ct-author-html5-shiv', get_template_directory_uri() . '/js/build/html5shiv.min.js');
    wp_script_add_data('ct-author-html5-shiv', 'conditional', 'IE 8');
    // respond.js - media query support
    wp_enqueue_script('ct-author-respond', get_template_directory_uri() . '/js/build/respond.min.js', '', '', true);
    wp_script_add_data('ct-author-respond', 'conditional', 'IE 8');
}
コード例 #4
0
	public function uploader_style () {
		wp_enqueue_style( 'thickbox' );
		wp_enqueue_style( 'a3-uploader-style', $this->admin_uploader_url() . '/uploader.css' );
		if ( is_rtl() ) {
			wp_enqueue_style( 'a3-uploader-style-rtl', $this->admin_uploader_url() . '/uploader.rtl.css' );
		}
	}
コード例 #5
0
/**
 * Properly enqueue styles and scripts for our theme options page.
 *
 * This function is attached to the admin_enqueue_scripts action hook.
 */
function bouquet_admin_enqueue_scripts($hook_suffix)
{
    wp_enqueue_style('bouquet-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-09-30');
    if (is_rtl()) {
        wp_enqueue_style('bouquet-theme-options-rtl', get_template_directory_uri() . '/inc/theme-options-rtl.css', false, '2011-09-30');
    }
}
コード例 #6
0
ファイル: actions.php プロジェクト: alexandruspataru/Starter
function nexus_pagination()
{
    $prev_arrow = is_rtl() ? '&laquo;' : '&laquo;';
    $next_arrow = is_rtl() ? '&raquo;' : '&raquo;';
    global $wp_query;
    $total = $wp_query->max_num_pages;
    $big = 999999999;
    // need an unlikely integer
    if ($total > 1) {
        if (!($current_page = get_query_var('paged'))) {
            $current_page = 1;
        }
        if (get_option('permalink_structure')) {
            $format = 'page/%#%/';
        } else {
            $format = '&paged=%#%';
        }
        $pages = paginate_links(array('base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 'format' => $format, 'current' => max(1, get_query_var('paged')), 'total' => $total, 'mid_size' => 4, 'end_size' => 4, 'type' => 'array', 'prev_text' => $prev_arrow, 'next_text' => $next_arrow));
        if (is_array($pages)) {
            $paged = get_query_var('paged') == 0 ? 1 : get_query_var('paged');
            echo '<div class="preview"><div class="cont text-center"><div class="pagination"><ul class="pagination">';
            foreach ($pages as $page) {
                echo "<li>{$page}</li>";
            }
            echo '</ul></div></div><div class="clear">&nbsp;</div></div>	';
        }
    }
}
コード例 #7
0
function ratings_scripts()
{
    if (@file_exists(get_stylesheet_directory() . '/postratings-css.css')) {
        wp_enqueue_style('wp-postratings', get_stylesheet_directory_uri() . '/postratings-css.css', false, WP_POSTRATINGS_VERSION, 'all');
    } elseif (@file_exists(get_stylesheet_directory() . '/css/postratings-css.css')) {
        wp_enqueue_style('wp-postratings', get_stylesheet_directory_uri() . '/css/postratings-css.css', false, WP_POSTRATINGS_VERSION, 'all');
    } else {
        wp_enqueue_style('wp-postratings', plugins_url('wp-postratings/css/postratings-css.css'), false, WP_POSTRATINGS_VERSION, 'all');
    }
    if (is_rtl()) {
        if (@file_exists(get_stylesheet_directory() . '/postratings-css-rtl.css')) {
            wp_enqueue_style('wp-postratings-rtl', get_stylesheet_directory_uri() . '/postratings-css-rtl.css', false, WP_POSTRATINGS_VERSION, 'all');
        } elseif (@file_exists(get_stylesheet_directory() . '/css/postratings-css-rtl.css')) {
            wp_enqueue_style('wp-postratings-rtl', get_stylesheet_directory_uri() . '/css/postratings-css-rtl.css', false, WP_POSTRATINGS_VERSION, 'all');
        } else {
            wp_enqueue_style('wp-postratings-rtl', plugins_url('wp-postratings/css/postratings-css-rtl.css'), false, WP_POSTRATINGS_VERSION, 'all');
        }
    }
    $postratings_max = intval(get_option('postratings_max'));
    $postratings_custom = intval(get_option('postratings_customrating'));
    $postratings_ajax_style = get_option('postratings_ajax_style');
    $postratings_javascript = '';
    if ($postratings_custom) {
        for ($i = 1; $i <= $postratings_max; $i++) {
            $postratings_javascript .= 'var ratings_' . $i . '_mouseover_image=new Image();ratings_' . $i . '_mouseover_image.src=ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_' . $i . '_over."+ratingsL10n.image_ext;';
        }
    } else {
        $postratings_javascript = 'var ratings_mouseover_image=new Image();ratings_mouseover_image.src=ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_over."+ratingsL10n.image_ext;';
    }
    wp_enqueue_script('wp-postratings', plugins_url('wp-postratings/js/postratings-js.js'), array('jquery'), WP_POSTRATINGS_VERSION, true);
    wp_localize_script('wp-postratings', 'ratingsL10n', array('plugin_url' => plugins_url('wp-postratings'), 'ajax_url' => admin_url('admin-ajax.php'), 'text_wait' => __('Please rate only 1 item at a time.', 'wp-postratings'), 'image' => get_option('postratings_image'), 'image_ext' => RATINGS_IMG_EXT, 'max' => $postratings_max, 'show_loading' => intval($postratings_ajax_style['loading']), 'show_fading' => intval($postratings_ajax_style['fading']), 'custom' => $postratings_custom, 'l10n_print_after' => $postratings_javascript));
}
コード例 #8
0
ファイル: class-charts.php プロジェクト: NickIvanter/wp-ulike
 /**
  * Add chart scripts files + Creating Localize Objects
  *
  * @author       	Alimir
  * @since           2.0
  * @updated         2.3
  * @return			Void
  */
 public function enqueue_script($hook)
 {
     $currentScreen = get_current_screen();
     $get_option = get_option('wp_ulike_statistics_screen');
     if ($currentScreen->id != $hook) {
         return;
     }
     if (is_rtl()) {
         wp_register_style('wp_ulike_stats_style', plugins_url('css/statistics-rtl.css', __FILE__));
     } else {
         wp_register_style('wp_ulike_stats_style', plugins_url('css/statistics.css', __FILE__));
     }
     //wp_enqueue_style
     wp_enqueue_style('wp_ulike_stats_style');
     wp_register_script('wp_ulike_chart', plugins_url('js/chart.min.js', __FILE__), array('jquery'), null, true);
     wp_enqueue_script('wp_ulike_chart');
     wp_register_script('wp_ulike_vmap', plugins_url('js/jquery.vmap.min.js', __FILE__), array('jquery'), null, true);
     wp_enqueue_script('wp_ulike_vmap');
     wp_register_script('wp_ulike_world', plugins_url('js/jquery.vmap.world.js', __FILE__), array('jquery'), null, true);
     wp_enqueue_script('wp_ulike_world');
     wp_register_script('wp_ulike_stats', plugins_url('js/statistics.js', __FILE__), array('jquery'), null, true);
     wp_enqueue_script('wp_ulike_stats');
     wp_localize_script('wp_ulike_stats', 'wp_ulike_statistics', array('posts_date_labels' => $this->posts_dataset('label'), 'comments_date_labels' => $this->comments_dataset('label'), 'activities_date_labels' => $this->activities_dataset('label'), 'topics_date_labels' => $this->topics_dataset('label'), 'posts_dataset' => $this->posts_dataset('dataset'), 'comments_dataset' => $this->comments_dataset('dataset'), 'activities_dataset' => $this->activities_dataset('dataset'), 'topics_dataset' => $this->topics_dataset('dataset'), 'data_map' => $get_option['likers_map'] == 1 ? $this->data_map() : null));
     wp_enqueue_script('postbox');
 }
コード例 #9
0
ファイル: scflickr.class.php プロジェクト: mpaskew/isc-dev
    function get_gallery_images($attr = array())
    {
        global $omnigallery, $SCFlickr, $post;
        static $instance = 0;
        $instance++;
        $attr = array_merge(array('order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'thumbnail', 'include' => '', 'exclude' => '', 'width' => '150', 'height' => '150'), $attr);
        extract($attr);
        $id = intval($id);
        $f = $SCFlickr;
        $recent = $f->people_getPublicPhotos(get_option('sc_username_flickr'), NULL, NULL, get_option('sc_piccount_flickr'), NULL);
        $columns = intval($columns);
        $itemwidth = $columns > 0 ? floor(100 / $columns) : 100;
        $float = is_rtl() ? 'right' : 'left';
        $selector = "sc_gallery_flickr-{$instance}";
        $return = '';
        $size_class = sanitize_html_class($size);
        $return .= "\r\n\t\t<style type='text/css'>\r\n\t\t\t#{$selector} {\r\n\t\t\t\tmargin: auto;\r\n                display: block\r\n\t\t\t}\r\n\t\t\t#{$selector}:after {\r\n                width: 0;\r\n                height: 0;\r\n                clear: both;\r\n                content: ' ';\r\n                display: block;\r\n                overflow: hidden;\r\n                visibility: hidden;\r\n\t\t\t}\r\n\t\t\t#{$selector} .gallery-item {\r\n\t\t\t\tfloat: {$float};\r\n\t\t\t\tmargin-top: 10px;\r\n\t\t\t\ttext-align: center;\r\n\t\t\t\twidth: {$itemwidth}%;\r\n\t\t\t}\r\n\t\t\t#{$selector} img {\r\n\t\t\t\tborder: 2px solid #cfcfcf;\r\n\t\t\t}\r\n\t\t\t#{$selector} .gallery-caption {\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t}\r\n\t\t</style>";
        $return .= "<div id='{$selector}' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
        foreach ($recent['photos']['photo'] as $photo) {
            $urlimg = $f->buildPhotoURL($photo, "small");
            $urlimgori = $f->buildPhotoURL($photo, "large");
            $return .= '
            <dl class="gallery-item">
                <dt class="gallery-icon">
					<a href="' . $urlimgori . '" title="' . $photo['title'] . '" rel="lightbox-" target="_blank">
						<img src="' . $omnigallery->plugin_url . '/includes/timthumb.php?src=' . $urlimg . '&amp;w=' . $width . '&amp;h=' . $height . '&amp;zc=1&amp;q=90" alt="Flickr Gallery" class="sc-image" width="' . $width . '" height="' . $height . '"/>
					</a>
                </dt>
            </dl>';
        }
        $return .= '</div><!--/#gallery-->';
        return $return;
    }
コード例 #10
0
ファイル: functions.php プロジェクト: htmELS/stargazer
/**
 * The theme setup function.  This function sets up support for various WordPress and framework functionality.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function stargazer_theme_setup()
{
    /* Load files. */
    require_once trailingslashit(get_template_directory()) . 'inc/stargazer.php';
    require_once trailingslashit(get_template_directory()) . 'inc/customize.php';
    /* Load widgets. */
    add_theme_support('hybrid-core-widgets');
    /* Theme layouts. */
    add_theme_support('theme-layouts', array('1c' => __('1 Column Wide', 'stargazer'), '1c-narrow' => __('1 Column Narrow', 'stargazer'), '2c-l' => __('2 Columns: Content / Sidebar', 'stargazer'), '2c-r' => __('2 Columns: Sidebar / Content', 'stargazer')), array('default' => is_rtl() ? '2c-r' : '2c-l'));
    /* Load stylesheets. */
    add_theme_support('hybrid-core-styles', array('stargazer-fonts', 'one-five', 'gallery', 'stargazer-mediaelement', 'parent', 'style'));
    /* Enable custom template hierarchy. */
    add_theme_support('hybrid-core-template-hierarchy');
    /* The best thumbnail/image script ever. */
    add_theme_support('get-the-image');
    /* Breadcrumbs. Yay! */
    add_theme_support('breadcrumb-trail');
    /* Pagination. */
    add_theme_support('loop-pagination');
    /* Nicer [gallery] shortcode implementation. */
    add_theme_support('cleaner-gallery');
    /* Better captions for themes to style. */
    add_theme_support('cleaner-caption');
    /* Automatically add feed links to <head>. */
    add_theme_support('automatic-feed-links');
    /* Whistles plugin. */
    add_theme_support('whistles', array('styles' => true));
    /* Post formats. */
    add_theme_support('post-formats', array('aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    /* Editor styles. */
    add_editor_style(stargazer_get_editor_styles());
    /* Handle content width for embeds and images. */
    // Note: this is the largest size based on the theme's various layouts.
    hybrid_set_content_width(1025);
}
コード例 #11
0
ファイル: subscribes.php プロジェクト: jekv/devia
function wpsms_group_pointer()
{
    ?>
<script type="text/javascript">
jQuery(document).ready( function($) {
	$('#wpsms_groups').pointer({
		content: '<h3><?php 
    _e('Group', 'wp-sms');
    ?>
</h3><p><?php 
    _e('Outset Create group to better manage the subscribers.', 'wp-sms');
    ?>
</p>',
		position: {
			my: '<?php 
    echo is_rtl() ? 'right' : 'left';
    ?>
 top',
			at: 'center bottom',
			offset: '-25 0'
		},
		/*close: function() {
			setusernameSetting('wpsms_p1', '1');
		}*/
	}).pointer('open');
});
</script>
<?php 
}
コード例 #12
0
/**
 * Set up theme defaults and registers support for various WordPress features.
 *
 * @since 1.0.0
 */
function shrake_setup()
{
    // Add support for translating strings in this theme.
    // @link http://codex.wordpress.org/Function_Reference/load_theme_textdomain
    load_theme_textdomain('shrake', get_template_directory() . '/languages');
    // This theme styles the visual editor to resemble the theme style.
    add_editor_style(array(is_rtl() ? 'assets/css/editor-style-rtl.css' : 'assets/css/editor-style.css', shrake_fonts_url(), shrake_fonts_icon_url()));
    // Add default posts and comments RSS feed links to head.
    add_theme_support('automatic-feed-links');
    // Add support for the title tag.
    // @link https://make.wordpress.org/core/2014/10/29/title-tags-in-4-1/
    add_theme_support('title-tag');
    // Add support for a logo.
    add_theme_support('site-logo', array('size' => 'medium'));
    // Add support for post thumbnails.
    add_theme_support('post-thumbnails');
    add_image_size('shrake-featured', 1280, 600, array('center', 'top'));
    set_post_thumbnail_size(320, 9999);
    // Add support for Custom Background functionality.
    add_theme_support('custom-background', apply_filters('shrake_custom_background_args', array('default-color' => 'ffffff')));
    // Add support for HTML5 markup.
    add_theme_support('html5', array('caption', 'comment-form', 'comment-list', 'gallery', 'search-form'));
    // Add support for Post Formats.
    add_theme_support('post-formats', array('aside', 'link', 'quote'));
    // Add support for page excerpts.
    add_post_type_support('page', 'excerpt');
    // Register default nav menus.
    register_nav_menus(array('primary' => __('Primary Menu', 'shrake'), 'social' => __('Social Menu', 'shrake')));
    // Register support for archive settings.
    shrake_theme()->archive_content->add_support()->set_full_text_formats(array('aside', 'audio', 'link', 'quote', 'status'));
}
コード例 #13
0
ファイル: pagination.php プロジェクト: pixelstorm/pagination
    function ml_pagination()
    {
        ?>

<?php 
        $prev_arrow = is_rtl() ? '
    
    <span class = "icon more_icon">' : '<span class = "icon previous_icon">';
        $next_arrow = is_rtl() ? '
    
    <span class = "icon more_icon">' : '<span class = "icon more_icon">';
        global $wp_query;
        $total = $wp_query->max_num_pages;
        $big = 999999999;
        // need an unlikely integer
        if ($total > 1) {
            ?>


  <h6>Browse the Archives:</h6>


<?php 
            if (!($current_page = get_query_var('paged'))) {
                $current_page = 1;
            }
            if (get_option('permalink_structure')) {
                $format = 'page/%#%/';
            } else {
                $format = '&paged=%#%';
            }
            echo paginate_links(array('base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 'format' => $format, 'current' => max(1, get_query_var('paged')), 'total' => $total, 'mid_size' => 3, 'type' => 'list', 'prev_text' => $prev_arrow, 'next_text' => $next_arrow));
        }
    }
コード例 #14
0
function user_panel_api_content($content)
{
    $request = Daq_Request::getInstance();
    // URL does not have ?panel=my_link param, this means some other panel is being executed
    // return default content then.
    if ($request->get("panel") != "my_link") {
        return $content;
    }
    // Make sure to authenticate user!
    // Load default WPJB styles
    wp_enqueue_style("wpjb-css");
    // Create breadcrumbs, basically two links:
    // - User Panel home
    // - Current page
    $breadcrumbs = array(array("title" => __("Home", "wpjobboard"), "url" => get_permalink(), "glyph" => "wpjb-icon-home"), array("title" => "My Link", "url" => get_permalink() . "?panel=my_link", "glyph" => is_rtl() ? "wpjb-icon-left-open" : "wpjb-icon-right-open"));
    // initiate view object and add new templates directory so we can load
    // a custom template file.
    $view = Wpjb_Project::getInstance()->getApplication("frontend")->getView();
    $view->addDir(dirname(__FILE__), true);
    $view->breadcrumbs = $breadcrumbs;
    // initatte session to allow flash messages
    $flash = new Wpjb_Utility_Session();
    $flash->addInfo("Custom My Link Panel Loaded!");
    $flash->save();
    // render template
    ob_start();
    $view->render("custom-template.php");
    $render = ob_get_clean();
    return $render;
}
コード例 #15
0
ファイル: functions.php プロジェクト: jimrucinski/Vine
function builder_filter_wp_title($title, $seperator, $direction)
{
    global $paged, $page;
    if (is_feed()) {
        return $title;
    }
    $seperator = ' ' . trim($seperator) . ' ';
    if (builder_is_home() && apply_filters('builder_filter_flip_title_direction_on_home', true)) {
        $direction = 'right' == $direction ? 'left' : 'right';
    }
    if ($paged >= 2 || $page >= 2) {
        $page_description = sprintf(__('Page %s', 'it-l10n-Builder-Cohen'), max($paged, $page));
        if ('right' == $direction) {
            $title .= $page_description . $seperator;
        } else {
            if (is_rtl()) {
                $title = $seperator . $page_description . $title;
            } else {
                $title .= $seperator . $page_description;
            }
        }
    }
    if ('right' == $direction) {
        $title .= get_bloginfo('name');
    } else {
        $title = get_bloginfo('name') . $title;
    }
    return $title;
}
コード例 #16
0
ファイル: install.php プロジェクト: snagga/urbantac
/**
 * Display install header.
 *
 * @since 2.5.0
 * @package WordPress
 * @subpackage Installer
 */
function display_header()
{
    header('Content-Type: text/html; charset=utf-8');
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>
>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?>
</title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    if (is_rtl()) {
        echo ' rtl';
    }
    ?>
">
<h1 id="logo"><a href="<?php 
    esc_attr_e('http://wordpress.org/');
    ?>
"><?php 
    _e('WordPress');
    ?>
</a></h1>

<?php 
}
コード例 #17
0
ファイル: shortcodes.php プロジェクト: serker72/T3S
/**
 * Render the View.
 *
 * @param $out
 *
 * @return mixed|string|void
 */
function wpmtst_render_view($out)
{
    // Did we find this view?
    if (isset($out['view_not_found']) && $out['view_not_found']) {
        return '<p style="color:red">' . __(sprintf('Strong Testimonials error: View %s not found', $out['view'])) . '</p>';
    }
    // Container class is shared by display and form in templates.
    $out['container_class'] = 'strong-view-id-' . $out['view'];
    if ($out['class']) {
        $out['container_class'] .= ' ' . str_replace(',', ' ', $out['class']);
    }
    if (is_rtl()) {
        $out['container_class'] .= ' rtl';
    }
    WPMST()->set_atts($out);
    /**
     * MODE: FORM
     */
    if ($out['form']) {
        return wpmtst_form_view($out);
    }
    /**
     * MODE: DISPLAY (default)
     */
    global $view;
    $view = new Strong_View($out);
    $view->build();
    return $view->output();
}
コード例 #18
0
ファイル: meta-box.php プロジェクト: jesusmarket/jesusmarket
 /**
  * Enqueue common scripts and styles.
  */
 public function enqueue()
 {
     if (!$this->is_edit_screen()) {
         return;
     }
     wp_enqueue_style('rwmb', RWMB_CSS_URL . 'style.css', array(), RWMB_VER);
     if (is_rtl()) {
         wp_enqueue_style('rwmb-rtl', RWMB_CSS_URL . 'style-rtl.css', array(), RWMB_VER);
     }
     // Load clone script conditionally
     foreach ($this->fields as $field) {
         if ($field['clone']) {
             wp_enqueue_script('rwmb-clone', RWMB_JS_URL . 'clone.js', array('jquery-ui-sortable'), RWMB_VER, true);
             break;
         }
     }
     // Enqueue scripts and styles for fields
     foreach ($this->fields as $field) {
         RWMB_Field::call($field, 'admin_enqueue_scripts');
     }
     // Auto save
     if ($this->meta_box['autosave']) {
         wp_enqueue_script('rwmb-autosave', RWMB_JS_URL . 'autosave.js', array('jquery'), RWMB_VER, true);
     }
     /**
      * Allow developers to enqueue more scripts and styles
      * @param RW_Meta_Box $object Meta Box object
      */
     do_action('rwmb_enqueue_scripts', $this);
 }
コード例 #19
0
ファイル: install.php プロジェクト: sontv1003/vtcacademy
/**
 * Display install header.
 *
 * @since 2.5.0
 * @package WordPress
 * @subpackage Installer
 */
function display_header()
{
    header('Content-Type: text/html; charset=utf-8');
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>
>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?>
</title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body<?php 
    if (is_rtl()) {
        echo ' class="rtl"';
    }
    ?>
>
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>

<?php 
}
コード例 #20
0
 function start_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0)
 {
     global $wp_query;
     $indent = $depth > 0 ? str_repeat("\t", $depth) : '';
     // code indent
     // Passed classes
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $class_names = esc_attr(implode(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item)));
     // build html
     $output .= $indent . '<li id="nav-menu-item-' . intval($item->ID) . '" class="' . esc_attr($class_names) . '">';
     // link attributes
     $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
     $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
     $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
     $attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
     $attributes .= $args->has_children ? ' class="dropdown-toggle"' : '';
     if (is_rtl()) {
         $nav_arrow = 'fa-caret-left';
     } else {
         $nav_arrow = 'fa-caret-right';
     }
     if ($args->has_children) {
         if ($depth > 0) {
             $item_output = sprintf('%1$s<a%2$s>%3$s%4$s%5$s</a>%6$s', $args->before, $attributes, $args->link_before, apply_filters('the_title', $item->title . ' <i class="fa ' . $nav_arrow . '"></i>', $item->ID), $args->link_after, $args->after);
         } else {
             $item_output = sprintf('%1$s<a%2$s>%3$s%4$s%5$s</a>%6$s', $args->before, $attributes, $args->link_before, apply_filters('the_title', $item->title . ' <i class="fa fa-caret-down"></i>', $item->ID), $args->link_after, $args->after);
         }
     } else {
         $item_output = sprintf('%1$s<a%2$s>%3$s%4$s%5$s</a>%6$s', $args->before, $attributes, $args->link_before, apply_filters('the_title', $item->title, $item->ID), $args->link_after, $args->after);
     }
     // build html
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
コード例 #21
0
    /**
     * Load the introduction tour
     */
    function intro_tour()
    {
        global $pagenow, $current_user;
        $admin_pages = array('dashboard' => array('content' => '<h3>' . __('General settings', 'wordpress-seo') . '</h3><p>' . __('These are the General settings for WordPress SEO, here you can restart this tour or revert the WP SEO settings to default.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Tracking', 'wordpress-seo') . '</strong><br/>' . __('To provide you with the best experience possible, we need your help. Please enable tracking to help us gather anonymous usage data.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Tab: Your Info / Company Info', 'wordpress-seo') . '</strong><br/>' . __('Add some info here needed for Google\'s Knowledge Graph.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Tab: Webmaster Tools', 'wordpress-seo') . '</strong><br/>' . __('You can add the verification codes for the different Webmaster Tools programs here, we highly encourage you to check out both Google and Bing&#8217;s Webmaster Tools.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Tab: Security', 'wordpress-seo') . '</strong><br/>' . __('Determine who has access to the plugins advanced settings on the post edit screen.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('More WordPress SEO', 'wordpress-seo') . '</strong><br/>' . sprintf(__('There&#8217;s more to learn about WordPress &amp; SEO than just using this plugin. A great start is our article %1$sthe definitive guide to WordPress SEO%2$s.', 'wordpress-seo'), '<a target="_blank" href="' . esc_url('https://yoast.com/articles/wordpress-seo/#utm_source=wpseo_dashboard&utm_medium=wpseo_tour&utm_campaign=tour') . '">', '</a>') . '</p>' . '<p><strong style="font-size:150%;">' . __('Subscribe to our Newsletter', 'wordpress-seo') . '</strong><br/>' . __('If you would like us to keep you up-to-date regarding WordPress SEO and other plugins by Yoast, subscribe to our newsletter:', 'wordpress-seo') . '</p>' . '<form action="http://yoast.us1.list-manage1.com/subscribe/post?u=ffa93edfe21752c921f860358&amp;id=972f1c9122" method="post" id="newsletter-form" accept-charset="' . esc_attr(get_bloginfo('charset')) . '">' . '<p>' . '<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr($current_user->user_email) . '" id="newsletter-email" placeholder="' . __('Email', 'wordpress-seo') . '"/>' . '<input type="hidden" name="group" value="2"/>' . '<button type="submit" class="button-primary">' . __('Subscribe', 'wordpress-seo') . '</button>' . '</p></form>', 'next_page' => 'titles'), 'titles' => array('content' => '<h3>' . __('Title &amp; Metas settings', 'wordpress-seo') . '</h3>' . '<p>' . __('This is where you set the titles and meta-information for all your post types, taxonomies, archives, special pages and for your homepage. The page is divided into different tabs. Make sure you check &#8217;em all out!', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Sitewide settings', 'wordpress-seo') . '</strong><br/>' . __('The first tab will show you site-wide settings for titles, normally you\'ll only need to change the Title Separator.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Templates and settings', 'wordpress-seo') . '</strong><br/>' . sprintf(__('Now click on the &#8216;%1$sPost Types%2$s&#8217;-tab, as this will be our example.', 'wordpress-seo'), '<a target="_blank" href="' . esc_url(admin_url('admin.php?page=wpseo_titles#top#post_types')) . '">', '</a>') . '<br />' . __('The templates are built using variables. You can find all these variables in the help tab (in the top-right corner of the page). The settings allow you to set specific behavior for the post types.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Archives', 'wordpress-seo') . '</strong><br/>' . __('On the archives tab you can set templates for specific pages like author archives, search results and more.', 'wordpress-seo') . '<p><strong>' . __('Other', 'wordpress-seo') . '</strong><br/>' . __('On the Other tab you can change sitewide meta settings, like enable meta keywords.', 'wordpress-seo'), 'next_page' => 'social', 'prev_page' => 'dashboard'), 'social' => array('content' => '<h3>' . __('Social settings', 'wordpress-seo') . '</h3>' . '<p><strong>' . __('Facebook', 'wordpress-seo') . '</strong><br/>' . sprintf(__('On this tab you can enable the %1$sFacebook Open Graph%2$s functionality from this plugin, as well as assign a Facebook user or Application to be the admin of your site, so you can view the Facebook insights.', 'wordpress-seo'), '<a target="_blank" href="' . esc_url('https://yoast.com/facebook-open-graph-protocol/#utm_source=wpseo_social&utm_medium=wpseo_tour&utm_campaign=tour') . '">', '</a>') . '</p><p>' . __('The frontpage settings allow you to set meta-data for your homepage, whereas the default settings allow you to set a fallback for all posts/pages without images. ', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Twitter', 'wordpress-seo') . '</strong><br/>' . sprintf(__('With %1$sTwitter Cards%2$s, you can attach rich photos, videos and media experience to tweets that drive traffic to your website. Simply check the box, sign up for the service, and users who Tweet links to your content will have a &#8220;Card&#8221; added to the tweet that&#8217;s visible to all of their followers.', 'wordpress-seo'), '<a target="_blank" href="' . esc_url('https://yoast.com/twitter-cards/#utm_source=wpseo_social&utm_medium=wpseo_tour&utm_campaign=tour') . '">', '</a>') . '</p>' . '<p><strong>' . __('Pinterest', 'wordpress-seo') . '</strong><br/>' . __('On this tab you can verify your site with Pinterest and enter your Pinterest account.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Google+', 'wordpress-seo') . '</strong><br/>' . sprintf(__('This tab allows you to add specific post meta data for Google+. And if you have a Google+ page for your business, add that URL here and link it on your %1$sGoogle+%2$s page&#8217;s about page.', 'wordpress-seo'), '<a target="_blank" href="' . esc_url('https://plus.google.com/') . '">', '</a>') . '</p>' . '<p><strong>' . __('Other', 'wordpress-seo') . '</strong><br/>' . __('On this tab you can enter some more of your social accounts, mostly used for Google\'s Knowledge Graph.', 'wordpress-seo') . '</p>', 'next_page' => 'xml', 'prev_page' => 'titles'), 'xml' => array('content' => '<h3>' . __('XML Sitemaps', 'wordpress-seo') . '</h3>' . '<p><strong>' . __('What are XML sitemaps?', 'wordpress-seo') . '</strong><br/>' . __('A Sitemap is an XML file that lists the URLs for a site. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site. This allows search engines to crawl the site more intelligently.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('What does the plugin do with XML Sitemaps?', 'wordpress-seo') . '</strong><br/>' . __('This plugin adds XML sitemaps to your site. The sitemaps are automatically updated when you publish a new post, page or custom post and Google and Bing will be automatically notified.', 'wordpress-seo') . '</p><p>' . __('If you want to exclude certain post types and/or taxonomies, you can also set that on this page.', 'wordpress-seo') . '</p><p>' . __('Is your webserver low on memory? Decrease the entries per sitemap (default: 1000) to reduce load.', 'wordpress-seo') . '</p>', 'next_page' => 'advanced', 'prev_page' => 'social'), 'advanced' => array('content' => '<h3>' . __('Advanced Settings', 'wordpress-seo') . '</h3><p>' . __('All of the options on these tabs are for advanced users only, if you don&#8217;t know whether you should check any, don&#8217;t touch them.', 'wordpress-seo') . '</p>', 'next_page' => 'licenses', 'prev_page' => 'xml'), 'licenses' => array('content' => '<h3>' . __('Extensions and Licenses', 'wordpress-seo') . '</h3>' . '<p><strong>' . __('Extensions', 'wordpress-seo') . '</strong><br/>' . sprintf(__('The powerful functions of WordPress SEO can be extended with %1$sYoast premium plugins%2$s. These premium plugins require the installation of WordPress SEO or WordPress SEO Premium and add specific functionality. You can read all about the Yoast Premium Plugins %1$shere%2$s.', 'wordpress-seo'), '<a target="_blank" href="' . esc_url('https://yoast.com/wordpress/plugins/#utm_source=wpseo_licenses&utm_medium=wpseo_tour&utm_campaign=tour') . '">', '</a>') . '</p>' . '<p><strong>' . __('Licenses', 'wordpress-seo') . '</strong><br/>' . __('Once you&#8217;ve purchased WordPress SEO Premium or any other premium Yoast plugin, you&#8217;ll have to enter a license key. You can do so on the Licenses-tab. Once you&#8217;ve activated your premium plugin, you can use all its powerful features.', 'wordpress-seo') . '</p>' . '<p><strong>' . __('Like this plugin?', 'wordpress-seo') . '</strong><br/>' . sprintf(__('So, we&#8217;ve come to the end of the tour. If you like the plugin, please %srate it 5 stars on WordPress.org%s!', 'wordpress-seo'), '<a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">', '</a>') . '</p>' . '<p>' . sprintf(__('Thank you for using our plugin and good luck with your SEO!<br/><br/>Best,<br/>Team Yoast - %1$sYoast.com%2$s', 'wordpress-seo'), '<a target="_blank" href="' . esc_url('https://yoast.com/#utm_source=wpseo_licenses&utm_medium=wpseo_tour&utm_campaign=tour') . '">', '</a>') . '</p>', 'prev_page' => 'advanced'));
        $page = filter_input(INPUT_GET, 'page');
        $page = str_replace('wpseo_', '', $page);
        $button_array = array('button1' => array('text' => __('Close', 'wordpress-seo'), 'function' => ''));
        $opt_arr = array();
        $id = '#wpseo-title';
        if ('admin.php' != $pagenow || !array_key_exists($page, $admin_pages)) {
            $id = 'li.toplevel_page_wpseo_dashboard';
            $content = '
				<h3>' . __('Congratulations!', 'wordpress-seo') . '</h3>
				<p>' . __('You&#8217;ve just installed WordPress SEO by Yoast! Click &#8220;Start Tour&#8221; to view a quick introduction of this plugin&#8217;s core functionality.', 'wordpress-seo') . '</p>';
            $opt_arr = array('content' => $content, 'position' => array('edge' => 'bottom', 'align' => 'center'));
            $button_array['button2']['text'] = __('Start Tour', 'wordpress-seo');
            $button_array['button2']['function'] = sprintf('document.location="%s";', admin_url('admin.php?page=wpseo_dashboard'));
        } else {
            if ('' != $page && in_array($page, array_keys($admin_pages))) {
                $align = is_rtl() ? 'left' : 'right';
                $default_position = array('edge' => 'top', 'align' => $align);
                $opt_arr = array('content' => $admin_pages[$page]['content'], 'position' => isset($admin_pages[$page]['position']) ? $admin_pages[$page]['position'] : $default_position, 'pointerWidth' => 450);
                if (isset($admin_pages[$page]['next_page'])) {
                    $button_array['button2'] = array('text' => __('Next', 'wordpress-seo'), 'function' => 'window.location="' . admin_url('admin.php?page=wpseo_' . $admin_pages[$page]['next_page']) . '";');
                }
                if (isset($admin_pages[$page]['prev_page'])) {
                    $button_array['button3'] = array('text' => __('Previous', 'wordpress-seo'), 'function' => 'window.location="' . admin_url('admin.php?page=wpseo_' . $admin_pages[$page]['prev_page']) . '";');
                }
            }
        }
        $this->print_scripts($id, $opt_arr, $button_array);
    }
コード例 #22
0
 /**
  * Set all header hooks
  * wp callback
  * @return  void
  *
  * @package Customizr
  * @since Customizr 3.2.6
  */
 function tc_set_header_hooks()
 {
     //html > head actions
     add_action('__before_body', array($this, 'tc_head_display'));
     //The WP favicon (introduced in WP 4.3) will be used in priority
     add_action('wp_head', array($this, 'tc_favicon_display'));
     //html > header actions
     add_action('__before_main_wrapper', 'get_header');
     //boolean filter to control the header's rendering
     if (!apply_filters('tc_display_header', true)) {
         return;
     }
     add_action('__header', array($this, 'tc_prepare_logo_title_display'), 10);
     add_action('__header', array($this, 'tc_tagline_display'), 20, 1);
     add_action('__header', array($this, 'tc_navbar_display'), 30);
     //New menu view (since 3.2.0)
     add_filter('tc_navbar_display', array($this, 'tc_new_menu_view'), 10, 2);
     //body > header > navbar actions ordered by priority
     // GY : switch order for RTL sites
     if (is_rtl()) {
         add_action('__navbar', array($this, 'tc_social_in_header'), 20, 2);
         add_action('__navbar', array($this, 'tc_tagline_display'), 10, 1);
     } else {
         add_action('__navbar', array($this, 'tc_social_in_header'), 10, 2);
         add_action('__navbar', array($this, 'tc_tagline_display'), 20, 1);
     }
     //add a 100% wide container just after the sticky header to reset margin top
     if (1 == esc_attr(TC_utils::$inst->tc_opt('tc_sticky_header')) || TC___::$instance->tc_is_customizing()) {
         add_action('__after_header', array($this, 'tc_reset_margin_top_after_sticky_header'), 0);
     }
 }
コード例 #23
0
 /**
  * add styles.
  */
 public function add_style()
 {
     wp_enqueue_style('hello-kushimoto-admin-notices', plugins_url('assets/styles/hello-kushimoto-admin-notices.css', HELLO_KUSHIMOTO_FILE), array(), HELLO_KUSHIMOTO_VERSION);
     if (is_rtl()) {
         wp_enqueue_style('hello-kushimoto-admin-notices-rtl', plugins_url('assets/styles/hello-kushimoto-admin-notices-rtl.css', HELLO_KUSHIMOTO_FILE), array('hello-kushimoto-admin-notices'), HELLO_KUSHIMOTO_VERSION);
     }
 }
コード例 #24
0
ファイル: wj_engine.php プロジェクト: namwoody/SAAZINDIAN.COM
 function setLanguageDirection()
 {
     // right to left language property
     if (function_exists('is_rtl')) {
         $this->_is_rtl = is_rtl();
     }
 }
コード例 #25
0
ファイル: credits.php プロジェクト: fka2004/webkit
function _wp_credits_add_css()
{
    ?>
<style type="text/css">
div.wrap { max-width: 750px }
h3.wp-people-group, p.wp-credits-list { clear: both; }
ul.compact { margin-bottom: 0 }

<?php 
    if (is_rtl()) {
        ?>
ul.wp-people-group { margin-bottom: 30px; float: right; clear: both; }
li.wp-person { float: right; height: 70px; width: 220px; margin-left: 10px; }
li.wp-person img.gravatar { float: right; margin-left: 10px; margin-bottom: 10px; }
<?php 
    } else {
        ?>
li.wp-person { float: left; margin-right: 10px; }
li.wp-person img.gravatar { float: left; margin-right: 10px; margin-bottom: 10px; }
<?php 
    }
    ?>
li.wp-person img.gravatar { width: 60px; height: 60px; }
ul.compact li.wp-person img.gravatar { width: 30px; height: 30px; }
li.wp-person { height: 70px; width: 220px; }
ul.compact li.wp-person { height: 40px; width: auto; white-space: nowrap }
li.wp-person a.web { font-size: 16px; text-decoration: none; }
</style>
<?php 
}
コード例 #26
0
 /**
  * Setup Toolbar fields
  * 
  * @param array $sections
  *
  * @return array
  */
 public function section_a11y_toolbar($sections = array())
 {
     $fields = array();
     $fields[] = array('id' => 'pojo_a11y_toolbar', 'title' => __('Toolbar', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'options' => array('enable' => __('Show on all devices', 'pojo-accessibility'), 'visible-desktop' => __('Visible Desktop', 'pojo-accessibility'), 'visible-tablet' => __('Visible Tablet', 'pojo-accessibility'), 'visible-phone' => __('Visible Phone', 'pojo-accessibility'), 'hidden-desktop' => __('Hidden Desktop', 'pojo-accessibility'), 'hidden-tablet' => __('Hidden Tablet', 'pojo-accessibility'), 'hidden-phone' => __('Hidden Phone', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $toolbar_options_classes = 'pojo-a11y-toolbar-button';
     $fields[] = array('id' => 'pojo_a11y_toolbar_title', 'title' => __('Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes, 'std' => __('Accessibility Title', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_position', 'title' => __('Position', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('left' => __('Left', 'pojo-accessibility'), 'right' => __('Right', 'pojo-accessibility')), 'std' => is_rtl() ? 'right' : 'left');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_resize_font', 'title' => __('Resize Font', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('enable' => __('Enable', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_resize_font_add_title', 'title' => __('A+', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Increase text', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_resize_font_less_title', 'title' => __('A-', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Decrease text', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_grayscale', 'title' => __('Grayscale', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('enable' => __('Enable', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_grayscale_title', 'title' => __('Grayscale Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Grayscale', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_high_contrast', 'title' => __('High Contrast', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('enable' => __('Enable', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_high_contrast_title', 'title' => __('High Contrast Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('High Contrast', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_negative_contrast', 'title' => __('Negative Contrast', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('enable' => __('Enable', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_negative_contrast_title', 'title' => __('Negative Contrast Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Negative Contrast', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_light_bg', 'title' => __('Light Background', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('enable' => __('Enable', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_light_bg_title', 'title' => __('Light Background Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Light Background', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_links_underline', 'title' => __('Links Underline', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('enable' => __('Enable', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_links_underline_title', 'title' => __('Links Underline Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Links Underline', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_readable_font', 'title' => __('Readable Font', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_SELECT, 'class' => $toolbar_options_classes, 'options' => array('enable' => __('Enable', 'pojo-accessibility'), 'disable' => __('Disable', 'pojo-accessibility')), 'std' => 'enable');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_readable_font_title', 'title' => __('Readable Font Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Readable Font', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_sitemap_title', 'title' => __('Sitemap Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Sitemap', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_sitemap_link', 'title' => __('Sitemap Link', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => '');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_help_title', 'title' => __('Help Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Help', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_help_link', 'title' => __('Help Link', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => '');
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_feedback_title', 'title' => __('Feedback Title', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => __('Feedback', 'pojo-accessibility'));
     $fields[] = array('id' => 'pojo_a11y_toolbar_button_feedback_link', 'title' => __('Feedback Link', 'pojo-accessibility'), 'type' => Pojo_Settings::FIELD_TEXT, 'class' => $toolbar_options_classes . ' pojo-settings-child-row', 'std' => '');
     $sections[] = array('id' => 'section-a11y-toolbar', 'page' => $this->_page_id, 'title' => __('Toolbar Setting:', 'pojo-accessibility'), 'intro' => '', 'fields' => $fields);
     return $sections;
 }
コード例 #27
0
ファイル: functions.php プロジェクト: flagshipwp/compass
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which
 * runs before the init hook. The init hook is too late for some features, such
 * as indicating support for post thumbnails.
 *
 * @since   1.0.0
 * @return  void
 */
function compass_setup()
{
    // http://themehybrid.com/docs/theme-layouts
    add_theme_support('theme-layouts', array('1c' => __('1 Column Wide', 'compass'), '1c-narrow' => __('1 Column Narrow', 'compass'), '2c-l' => __('2 Columns: Content / Sidebar', 'compass'), '2c-r' => __('2 Columns: Sidebar / Content', 'compass')), array('default' => is_rtl() ? '2c-r' : '2c-l'));
    // http://themehybrid.com/docs/hybrid_set_content_width
    hybrid_set_content_width(1140);
    // http://codex.wordpress.org/Automatic_Feed_Links
    add_theme_support('automatic-feed-links');
    // http://themehybrid.com/docs/hybrid-core-styles
    add_theme_support('hybrid-core-styles', array('style', 'google-fonts'));
    // https://github.com/FlagshipWP/flagship-library/wiki/Flagship-Site-Logo
    add_theme_support('site-logo');
    // https://developer.wordpress.org/themes/functionality/navigation-menus/
    register_nav_menus(array('primary' => _x('Primary Menu', 'nav menu location', 'compass'), 'secondary' => _x('Secondary Menu', 'nav menu location', 'compass')));
    // https://developer.wordpress.org/themes/functionality/post-formats/
    add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
    // https://github.com/justintadlock/breadcrumb-trail
    add_theme_support('breadcrumb-trail');
    // https://github.com/justintadlock/get-the-image
    add_theme_support('get-the-image');
    // http://themehybrid.com/docs/template-hierarchy
    add_theme_support('hybrid-core-template-hierarchy');
    // https://github.com/FlagshipWP/flagship-library/wiki/Flagship-Author-Box
    add_theme_support('flagship-author-box');
    // https://github.com/FlagshipWP/flagship-library/wiki/Flagship-Footer-Widgets
    add_theme_support('flagship-footer-widgets', 3);
}
コード例 #28
0
/**
 * Register jQuery scripts and 
 * CSS Styles only for the front-end
 *
 * @package Magzilla
 * @since 	Magzilla 1.0
**/
function fave_theme_scripts()
{
    global $ft_option;
    /**
     * Register CSS styles
     */
    wp_register_style('fave-owl.carousel.all.min', get_template_directory_uri() . '/css/owl.carousel.all.min.css', array(), '2.0.0', 'all');
    wp_register_style('fave-bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '', 'all');
    wp_register_style('fave-bootstrap-theme.min', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array(), '', 'all');
    wp_register_style('fave-font-awesome.min', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.5.0', 'all');
    wp_register_style('fave-jquery.jscrollpane', get_template_directory_uri() . '/css/jquery.jscrollpane.css', array(), '', 'all');
    wp_register_style('fave-magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css', array(), '1.0.0', 'all');
    wp_register_style('fave-main', get_template_directory_uri() . '/css/main.css', array(), '', 'all');
    wp_register_style('fave-options', get_template_directory_uri() . '/css/options.css', array(), '', 'all');
    wp_enqueue_style('fave-bootstrap.min');
    wp_enqueue_style('fave-bootstrap-theme.min');
    wp_enqueue_style('fave-font-awesome.min');
    wp_enqueue_style('fave-jquery.jscrollpane');
    wp_enqueue_style('fave-owl.carousel.all.min');
    wp_enqueue_style('fave-magnific-popup');
    wp_enqueue_style('fave-main');
    wp_enqueue_style('fave-options');
    wp_enqueue_style('style', get_stylesheet_uri(), array(), '1', 'all');
    if (is_rtl()) {
        wp_enqueue_style('magzilla-rtl', get_template_directory_uri() . "/css/rtl.css", array(), '1', 'screen');
    }
    wp_enqueue_script('fave-bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), THEME_VERSION, true);
    wp_enqueue_script('fave-plugins', get_template_directory_uri() . '/js/plugins.js', array('jquery'), THEME_VERSION, true);
    wp_enqueue_script('fave-custom.min', get_template_directory_uri() . '/js/custom.min.js', array('jquery'), THEME_VERSION, true);
    if ((is_singular('post') || is_singular('gallery') || is_singular('video')) && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
コード例 #29
0
ファイル: recipe.php プロジェクト: StefanBonilla/CoupSoup
 /**
  * Enqueue scripts and styles
  */
 function add_scripts()
 {
     if (empty($GLOBALS['posts']) || !is_array($GLOBALS['posts'])) {
         return;
     }
     foreach ($GLOBALS['posts'] as $p) {
         if (has_shortcode($p->post_content, 'recipe')) {
             $this->scripts_and_style_included = true;
             break;
         }
     }
     if (!$this->scripts_and_style_included) {
         return;
     }
     if (is_rtl()) {
         wp_enqueue_style('jetpack-recipes-style', plugins_url('/css/rtl/recipes-rtl.css', __FILE__), array(), '20130919');
     } else {
         wp_enqueue_style('jetpack-recipes-style', plugins_url('/css/recipes.css', __FILE__), array(), '20130919');
     }
     wp_enqueue_script('jetpack-recipes-printthis', plugins_url('/js/recipes-printthis.js', __FILE__), array('jquery'), '20131230');
     wp_enqueue_script('jetpack-recipes-js', plugins_url('/js/recipes.js', __FILE__), array('jquery', 'jetpack-recipes-printthis'), '20131230');
     $title_var = wp_title('|', false, 'right');
     $print_css_var = plugins_url('/css/recipes-print.css', __FILE__);
     wp_localize_script('jetpack-recipes-js', 'jetpack_recipes_vars', array('pageTitle' => $title_var, 'loadCSS' => $print_css_var));
 }
コード例 #30
-1
function easy_ads_manager_admin_eq()
{
    if (is_rtl()) {
        wp_enqueue_style('mian-css-admin_ads', plugin_dir_url(__FILE__) . 'css/easy-ads-manager.css');
        wp_enqueue_style('mian-css-admin_rtl_ads', plugin_dir_url(__FILE__) . 'css/rtl.css');
    } else {
        wp_enqueue_style('mian-css-admin_ads', plugin_dir_url(__FILE__) . 'css/easy-ads-manager.css');
    }
    wp_enqueue_style('jquery-ui-datepicker-style', plugin_dir_url(__FILE__) . 'css/jquery-ui.css');
    wp_enqueue_style('font_awesom-admin_ads', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css');
    ?>
	<script type="text/javascript">
		var pluginurl_ads = '<?php 
    echo plugin_dir_url(__FILE__);
    ?>
',
			path_ads = '<?php 
    echo get_home_path();
    ?>
';
	</script>
	<?php 
    wp_enqueue_media();
    wp_enqueue_script('jquery-ui-datepicker');
    wp_enqueue_script('ajax-script_ads', plugin_dir_url(__FILE__) . 'js/easy-ads-manager.js', array('jquery'));
    wp_localize_script('ajax-script_ads', 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php')));
}