Esempio n. 1
0
function fc_editor_style($url)
{
    if (!empty($url)) {
        $url .= ',';
    }
    if (function_exists('onemozilla_get_theme_options')) {
        // fail gracefully if we can't get theme options
        $options = onemozilla_get_theme_options();
        // get the theme options
    }
    if ($options['color_scheme']) {
        // if we have a color scheme, use its editor stylesheet
        $url .= trailingslashit(get_template_directory_uri()) . 'colors/' . $options['color_scheme'] . '/' . $options['color_scheme'] . '-editor-style.css';
    } else {
        // fall back to the default
        $url .= trailingslashit(get_template_directory_uri()) . 'colors/stone/stone-editor-style.css';
    }
    return $url;
}
Esempio n. 2
0
<?php

$theme_options = onemozilla_get_theme_options();
?>

  </main><!-- #content -->
</div></div><!-- /.wrap /#page -->

<footer id="site-info" role="contentinfo">
  <div class="wrap">
    <p id="foot-logo">
      <a class="top" href="#page"><?php 
_e('Return to top', 'onemozilla');
?>
</a>
      <a class="logo" href="http://mozilla.org" rel="external">Mozilla</a>
    </p>

    <p id="colophon">
      <?php 
printf(__('Except where otherwise <a href="%1s" rel="external">noted</a>, content on this site is licensed under the <a href="%2s" rel="external license">Creative Commons Attribution Share-Alike License v3.0</a> or any later version.', 'onemozilla'), esc_attr('http://www.mozilla.org/en-US/about/legal.html#site'), esc_attr('http://creativecommons.org/licenses/by-sa/3.0/'));
?>
    </p>

    <nav id="nav-meta">
      <ul role="navigation">
        <li><a href="https://www.mozilla.org/contact/" rel="external"><?php 
_e('Contact Us', 'onemozilla');
?>
</a></li>
        <li><a href="https://www.mozilla.org/en-US/privacy/" rel="external"><?php 
Esempio n. 3
0
/**
 * Enqueue the styles for the current color scheme.
 */
function onemozilla_enqueue_color_scheme()
{
    $options = onemozilla_get_theme_options();
    $color_scheme = $options['color_scheme'];
    if ('sand' == $color_scheme) {
        wp_enqueue_style('sand', get_template_directory_uri() . '/colors/sand/sand.css', array(), null);
    }
    if ('sky' == $color_scheme) {
        wp_enqueue_style('sky', get_template_directory_uri() . '/colors/sky/sky.css', array(), null);
    }
    if ('stone' == $color_scheme) {
        wp_enqueue_style('stone', get_template_directory_uri() . '/colors/stone/stone.css', array(), null);
    }
    if ('obsidian' == $color_scheme) {
        wp_enqueue_style('obsidian', get_template_directory_uri() . '/colors/obsidian/obsidian.css', array(), null);
    }
    do_action('onemozilla_enqueue_color_scheme', $color_scheme);
}