Exemplo n.º 1
0
/**
 * Scripts and stylesheets
 *
 * Enqueue stylesheets in the following order:
 * 1. /theme/assets/css/main.css
 *
 * Enqueue scripts in the following order:
 * 1. jquery-1.11.1.min.js via Google CDN
 * 2. /theme/assets/js/vendor/modernizr.min.js
 * 3. /theme/assets/js/scripts.js
 *
 * Google Analytics is loaded after enqueued scripts if:
 * - An ID has been defined in config.php
 * - You're not logged in as an administrator
 */
function roots_scripts()
{
    /**
     * The build task in Grunt renames production assets with a hash
     * Read the asset names from assets-manifest.json
     */
    if (WP_ENV === 'development') {
        $assets = array('css' => '/assets/css/main.css', 'js' => '/assets/js/scripts.js', 'modernizr' => '/assets/vendor/modernizr/modernizr.js', 'jquery' => '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js');
    } else {
        $get_assets = file_get_contents(get_template_directory() . '/assets/manifest.json');
        $assets = json_decode($get_assets, true);
        $assets = array('css' => '/assets/css/main.min.css?' . $assets['assets/css/main.min.css']['hash'], 'js' => '/assets/js/scripts.min.js?' . $assets['assets/js/scripts.min.js']['hash'], 'modernizr' => '/assets/js/vendor/modernizr.min.js', 'jquery' => '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js');
    }
    if (!is_apiuser_logged_in()) {
        $assets['css'] = '/assets/css/landing-page.css';
    }
    wp_enqueue_style('roots_css', get_template_directory_uri() . $assets['css'], false, null);
    /**
     * jQuery is loaded using the same method from HTML5 Boilerplate:
     * Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
     * It's kept in the header instead of footer to avoid conflicts with plugins.
     */
    if (!is_admin() && current_theme_supports('jquery-cdn')) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', $assets['jquery'], array(), null, true);
        add_filter('script_loader_src', 'roots_jquery_local_fallback', 10, 2);
    }
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('modernizr', get_template_directory_uri() . $assets['modernizr'], array(), null, true);
    wp_enqueue_script('jquery');
    wp_enqueue_script('roots_js', get_template_directory_uri() . $assets['js'], array(), null, true);
    /** add js for landing page */
    if (!is_apiuser_logged_in()) {
        wp_enqueue_script('landing_page_js', get_template_directory_uri() . '/assets/js/landing-page.js', array('jquery'), true);
    }
}
Exemplo n.º 2
0
function ideagist_block_unauthorized_pages()
{
    $secured_pages = array('dashboard');
    if (is_apiuser_logged_in()) {
        // do not let loggedin user access the landing page
        if (is_front_page()) {
            wp_redirect(site_url('/dashboard'));
            exit;
        }
    } else {
        foreach ($secured_pages as $secured_page) {
            if (is_page($secured_page)) {
                wp_redirect(site_url());
                exit;
            }
        }
    }
}
Exemplo n.º 3
0
    include roots_sidebar_path();
    ?>

	<?php 
}
?>

	<?php 
include roots_template_path();
?>


	<?php 
if (get_query_var('idea_slug', false)) {
    get_template_part('templates/footer');
} elseif (!is_apiuser_logged_in()) {
    if ($config->isglobal) {
        if (is_page('angel-investor') || is_page('entrepreneurs') || is_page('innovators') || is_page('job-seekers') || is_page('mentorsadvisors') || is_page('service-providers') || is_page('suspended-user')) {
            get_template_part('templates/footer-profile-types-page');
        } else {
            get_template_part('templates/footer-global-landing-page');
        }
    } else {
        get_template_part('templates/footer-landing-page');
    }
} else {
    get_template_part('templates/footer');
}
?>

	<?php 
Exemplo n.º 4
0
function is_apiuser_not_logged_in()
{
    return !is_apiuser_logged_in();
}
Exemplo n.º 5
0
<?php

/**
 * Landing Page
 */
?>

<?php 
if (is_apiuser_logged_in()) {
    ?>

	<div id="page-content-wrapper">
		<div id="page-content" class="pad10L pad10R">
			<div class="row">
				<div id="app-main-region-container" class="col-md-10 all-animate bounce">

					<div id="app-main-content" style="position:relative;/*z-index:1;*/background-color:#fafcfe"></div>
				</div>
				<button style="position:fixed;right:0;top:80px" class="btn btn-xs btn-danger" id="btn-toggle-featured-region">
					<i class="glyph-icon icon-chevron-right"></i>
					<i class="glyph-icon icon-chevron-left" style="display:none;"></i>
				</button>
				<div id="app-featured-region-container" class="col-md-2 all-animate pad0A" style="margin-top:10px;">
					<img class="img-responsive mrg10B" src="/wp-content/themes/ideagist-community/assets/img/ideagist-ads-1.jpg">
					<img class="img-responsive mrg10B" src="/wp-content/themes/ideagist-community/assets/img/ideagist-ads-2.jpg">
					<img class="img-responsive mrg10B" src="/wp-content/themes/ideagist-community/assets/img/ideagist-ads-3.jpg">
				</div>
			</div>
		</div>
	</div>