Esempio n. 1
0
function mystique_xtranav_icons($nav_extra)
{
    if (get_mystique_option('xtranav_twitter')) {
        $nav_extra .= '<a href="http://twitter.com/' . wp_specialchars(get_mystique_option('xtranav_twitter')) . '" class="nav-extra twitter" title="' . __("Follow me on Twitter", "mystique") . '"><span>' . __("Follow me on Twitter", "mystique") . '</span></a>';
    }
    if (get_mystique_option('xtranav_rss')) {
        $nav_extra .= '<a href="' . wp_specialchars(get_mystique_option('xtranav_rss')) . '" class="nav-extra rss" title="' . __("RSS Feeds", "mystique") . '"><span>' . __("RSS Feeds", "mystique") . '</span></a>';
    }
    return $nav_extra;
}
Esempio n. 2
0
function mystique_ip2c_admin()
{
    ?>
   <tr>
    <th scope="row"><p><?php 
    _e("Show comment author's country flag", "mystique");
    ?>
<span><?php 
    _e("May slow down page loading", "mystique");
    ?>
</span></p></th>
    <td><input name="comment_author_country" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('comment_author_country'));
    ?>
 /></td>
   </tr> <?php 
}
Esempio n. 3
0
<?php 
if ($comments || comments_open()) {
    /* Count the totals */
    $numPingBacks = 0;
    $numComments = 0;
    $jquery = get_mystique_option('jquery');
    /* Loop throught comments to count these totals */
    foreach ($comments as $comment) {
        if (get_comment_type() != "comment") {
            $numPingBacks++;
        } else {
            $numComments++;
        }
    }
    if (get_mystique_option('post_single_related')) {
        // Related posts. Based on http://www.bin-co.com/blog/2009/04/show-related-post-in-wordpress-without-a-plugin/
        $tags = wp_get_post_tags($post->ID);
        if ($tags) {
            $tag_ids = array();
            foreach ($tags as $individual_tag) {
                $tag_ids[] = $individual_tag->term_id;
            }
            $args = array('tag__in' => $tag_ids, 'post__not_in' => array($post->ID), 'showposts' => 10, 'caller_get_posts' => 1);
            $backup = $post;
            $rp_query = new wp_query($args);
            $post = $backup;
            wp_reset_query();
        }
    }
}
Esempio n. 4
0
function mystique_load_scripts()
{
    if (get_mystique_option('jquery')) {
        wp_enqueue_script('jquery');
        wp_enqueue_script('mystique', THEME_URL . '/js/jquery.mystique.js', array('jquery'), $ver = THEME_VERSION, $in_footer = true);
        wp_enqueue_script('mystique-init', esc_url_raw(add_query_arg('mystique', 'jquery_init', is_404() ? get_bloginfo('url') : mystique_curPageURL())), array('jquery', 'mystique'), $ver = THEME_VERSION, $in_footer = true);
    }
}
Esempio n. 5
0
function mystique_list_comments($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    global $commentcount;
    if (!$commentcount) {
        $commentcount = 0;
    }
    ?>

  <!-- comment entry -->
  <li class="<?php 
    mystique_comment_class();
    ?>
" id="comment-<?php 
    comment_ID();
    ?>
">
    <div class="comment-head <?php 
    mystique_comment_class();
    ?>
">

      <?php 
    if (get_option('show_avatars')) {
        ?>
<div class="avatar-box"><?php 
        echo mystique_get_avatar($comment->comment_author_email, 48);
        ?>
</div><?php 
    }
    ?>
      <div class="author">
       <?php 
    if (get_comment_author_url()) {
        $authorlink = '<a class="comment-author" id="comment-author-' . get_comment_ID() . '" href="' . get_comment_author_url() . '" rel="nofollow">' . get_comment_author() . '</a>';
    } else {
        $authorlink = '<b class="comment-author" id="comment-author-' . get_comment_ID() . '">' . get_comment_author() . '</b>';
    }
    $authorlink = apply_filters("mystique_comment_author_link", $authorlink);
    ?>

        <span class="by"><?php 
    printf(__('%1$s written by %2$s', 'mystique'), '<a class="comment-id" href="#comment-' . get_comment_ID() . '">#' . ++$commentcount . '</a>', $authorlink);
    ?>
 </span>
        <br />
        <?php 
    echo mystique_timeSince(abs(strtotime($comment->comment_date . " GMT")));
    ?>
      </div>

      <div class="controls bubble">
        <?php 
    if (get_mystique_option('jquery') && comments_open()) {
        ?>
           <?php 
        if (get_option('thread_comments')) {
            ?>
           <a class="reply" id="reply-to-<?php 
            echo get_comment_ID();
            ?>
" href="<?php 
            echo esc_url(add_query_arg('replytocom', $comment->comment_ID));
            ?>
#respond"><?php 
            _e("Reply", "mystique");
            ?>
</a>
           <?php 
        }
        ?>
           <a class="quote" title="<?php 
        _e('Quote', 'mystique');
        ?>
" href="#respond"><?php 
        _e('Quote', 'mystique');
        ?>
</a>
        <?php 
    }
    ?>
        <?php 
    edit_comment_link('Edit', '', '');
    ?>
      </div>
    </div>
    <div class="comment-body clear-block" id="comment-body-<?php 
    comment_ID();
    ?>
">
      <?php 
    if ($comment->comment_approved == '0') {
        ?>
<p class="error"><?php 
        _e('Your comment is awaiting moderation.', 'mystique');
        ?>
</p><?php 
    }
    ?>
      <div class="comment-text"><?php 
    comment_text();
    ?>
</div>
      <a id="comment-reply-<?php 
    comment_ID();
    ?>
"></a>
    </div>
<?php 
}
Esempio n. 6
0
    <div class="rightFade"></div>
    <?php 
    }
    ?>

   </div>
   <!-- /blocks + slider -->
 <?php 
}
?>

    <div class="page-content">
    <div id="copyright">

     <?php 
echo do_shortcode(stripslashes(get_mystique_option('footer_content')));
?>

     <!--[if lte IE 6]> <script type="text/javascript"> isIE6 = true; isIE = true; </script> <![endif]-->
     <!--[if gte IE 7]> <script type="text/javascript"> isIE = true; </script> <![endif]-->

     <?php 
wp_footer();
?>

    </div>

   </div>
  </div>
  <!-- /footer -->
Esempio n. 7
0
    //  add_filter('posts_groupby', 'mystique_search_groupby');
    add_action('mystique_jquery_init', 'mystique_highlight_search_query');
    add_action('init', 'mystique_verify_options');
    add_action('init', 'mystique_user_functions');
    add_action('wp_head', 'mystique_load_stylesheets', 1);
    add_action('wp_head', 'mystique_load_scripts', 1);
    add_action('template_redirect', 'mystique_meta_redirect');
    //add_action('get_header', 'mystique_compress_html');
    add_filter('query_vars', 'mystique_query_vars');
    add_action('template_redirect', 'mystique_dynamic_css_and_js');
    add_filter('excerpt_more', 'mystique_excerpt_more');
    // set up widget areas
    if (function_exists('register_sidebar')) {
        register_sidebar(array('name' => __('Default sidebar', 'mystique'), 'id' => 'sidebar-1', 'description' => __("This is the default sidebar, visible on 2 or 3 column layouts. If no widgets are active, the default theme widgets will be displayed instead.", "mystique"), 'before_widget' => '<li class="block"><div class="block-%2$s clear-block" id="instance-%1$s">', 'after_widget' => '</div></li>', 'before_title' => '<h3 class="title"><span>', 'after_title' => '</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>'));
        register_sidebar(array('name' => __('Secondary sidebar', 'mystique'), 'id' => 'sidebar-2', 'description' => __("This sidebar is active only on a 3 column setup. ", "mystique"), 'before_widget' => '<li class="block"><div class="block-%2$s clear-block" id="instance-%1$s">', 'after_widget' => '</div></li>', 'before_title' => '<h3 class="title"><span>', 'after_title' => '</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>'));
        register_sidebar(array('name' => __('Footer', 'mystique'), 'id' => 'footer-1', 'description' => __("You can add between 1 and 6 widgets here (3 or 4 are optimal). They will adjust their size based on the widget count. ", "mystique"), 'before_widget' => '<li class="block block-%2$s" id="instance-%1$s"><div class="block-content clear-block">', 'after_widget' => '</div></li>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>'));
        register_sidebar(array('name' => __('Footer (slide 2)', 'mystique'), 'id' => 'footer-2', 'description' => __("Only visible if jQuery is enabled. ", "mystique"), 'before_widget' => '<li class="block block-%2$s" id="instance-%1$s"><div class="block-content clear-block">', 'after_widget' => '</div></li>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>'));
        register_sidebar(array('name' => __('Footer (slide 3)', 'mystique'), 'id' => 'footer-3', 'description' => __("Only visible if jQuery is enabled. ", "mystique"), 'before_widget' => '<li class="block block-%2$s" id="instance-%1$s"><div class="block-content clear-block">', 'after_widget' => '</div></li>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>'));
        register_sidebar(array('name' => __('Footer (slide 4)', 'mystique'), 'id' => 'footer-4', 'description' => __("Only visible if jQuery is enabled. ", "mystique"), 'before_widget' => '<li class="block block-%2$s" id="instance-%1$s"><div class="block-content clear-block">', 'after_widget' => '</div></li>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>'));
    }
    // set up post thumnails
    add_theme_support('post-thumbnails');
    $size = explode('x', get_mystique_option('post_thumb'));
    set_post_thumbnail_size($size[0], $size[1], true);
    add_image_size('featured-thumbnail', 150, 150);
    // nav menus
    if (function_exists('register_nav_menus')) {
        register_nav_menus(array('primary' => __('Primary Navigation', 'mystique')));
    }
    add_theme_support('automatic-feed-links');
}
Esempio n. 8
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title']);
        $apikey = empty($instance['apikey']) ? '' : $instance['apikey'];
        $numphotos = empty($instance['numphotos']) ? '16' : $instance['numphotos'];
        $photoset = empty($instance['photoset']) ? '' : $instance['photoset'];
        $userid = empty($instance['userid']) ? '' : $instance['userid'];
        $type = empty($instance['type']) ? 'name' : $instance['type'];
        $id = $args['widget_id'];
        $jquery = get_mystique_option('jquery');
        echo $before_widget;
        $icon = '<span class="icon"></span>';
        if ($title) {
            echo $before_title . $title . $icon . $after_title;
        }
        ?>
      <?php 
        if ($jquery) {
            ?>
      <script type="text/javascript">
      /* <![CDATA[ */
      jQuery(document).ready(function () {

        //var flickrAPI = '52ca4906451ca4d51e6ef9ba4758f77d';
        //var flickrPhotoset = "72157600073457403";

        jQuery(function () {
         jQuery("<?php 
            if ($id) {
                echo '#instance-' . $id;
            }
            ?>
.block-flickr .flickrGallery").flickr({
         api_key: '<?php 
            echo $apikey;
            ?>
',
         <?php 
            if ($type == 'user') {
                ?>
         type: 'search',
         user_id: '<?php 
                echo $userid;
                ?>
',
         <?php 
            } elseif ($type == 'photoset') {
                ?>
         type: 'photoset',
         photoset_id: '<?php 
                echo $photoset;
                ?>
',
         <?php 
            }
            ?>
         per_page: <?php 
            echo $numphotos;
            ?>
,
         callback: liteboxCallback
        });
      });

      });
      /* ]]> */
      </script>

      <div class="flickrGallery"></div>
      <?php 
        } else {
            ?>
      <p class="error"><?php 
            _e("jQuery is disabled and this widget needs it", "mystique");
            ?>
</p>
      <?php 
        }
        ?>
      <?php 
        echo $after_widget;
    }
Esempio n. 9
0
function mystique_theme_settings()
{
    global $is_IE;
    if (!current_user_can('switch_themes')) {
        wp_die(__('You are not authorised to perform this operation.', 'mystique'));
    }
    ?>

  <div id="mystique-settings" class="wrap clear-block">
   <form action="<?php 
    echo admin_url('admin-post.php?action=mystique_update');
    ?>
" method="post" enctype="multipart/form-data">

   <div class="clear-block">
     <?php 
    screen_icon();
    ?>
<h2 class="alignleft"><?php 
    _e('Mystique settings', 'mystique');
    ?>
</h2>
     <p class="controls alignleft"><input type="submit" class="button-primary" name="submit" value="<?php 
    _e("Save Changes", "mystique");
    ?>
" /><input type="submit" class="button-primary" name="reset" value="<?php 
    _e("Reset to Defaults", "mystique");
    ?>
" onclick="if(confirm('<?php 
    _e("Reset all theme settings to the default values? Are you sure?", "mystique");
    ?>
')) return true; else return false;" /></p>
   </div>

   <?php 
    wp_nonce_field('theme-settings');
    ?>

   <?php 
    mystique_check_update();
    ?>

   <?php 
    if (isset($_GET['updated'])) {
        ?>
   <div class="updated fade below-h2">
    <p><?php 
        printf(__('Settings saved. %s', 'mystique'), '<a href="' . user_trailingslashit(get_bloginfo('url')) . '">' . __('View site', 'mystique') . '</a>');
        ?>
</p>
   </div>
   <?php 
    } elseif (isset($_GET['error'])) {
        $errors = array(1 => __("Please upload a valid image file!", "mystique"), 2 => __("The file you uploaded doesn't seem to be a valid JPEG, PNG or GIF image", "mystique"), 3 => __("The image could not be saved on your server", "mystique"));
        ?>
   <div class="error fade below-h2">
    <p><?php 
        printf(__('Error: %s', 'mystique'), $errors[$_GET['error']]);
        ?>
</p>
   </div>
   <?php 
    }
    ?>

   <!-- tabbed content -->
   <div id="mystique-settings-tabs">

    <div class="clear-block">
     <ul class="subsubsub">
      <li class="design"><a href='#tab-design'><?php 
    _e("Design", "mystique");
    ?>
</a></li> |
      <li class="content"><a href='#tab-content'><?php 
    _e("Content", "mystique");
    ?>
</a></li> |
      <li class="nav"><a href='#tab-navigation'><?php 
    _e("Navigation", "mystique");
    ?>
</a></li> |
      <li class="seo"><a href='#tab-seo'><?php 
    _e("SEO", "mystique");
    ?>
</a></li> |
      <li class="ads"><a href='#tab-ads'><?php 
    _e("Ads", "mystique");
    ?>
</a></li> |
      <li class="adv"><a href='#tab-advanced'><?php 
    _e("Advanced", "mystique");
    ?>
</a></li> |
      <li class="usercss"><a href='#tab-css'><?php 
    _e("User CSS", "mystique");
    ?>
</a></li> |
     </ul>
    </div>

    <!-- sections -->
    <div class="sections wrap metabox-holder">

     <div class="section" id="tab-design">

      <?php 
    if ($is_IE) {
        ?>
      <p><?php 
        _e("The design settings panel is not yet supported by Internet Explorer. Sorry :(", "mystique");
        ?>
</p>
      <?php 
    } else {
        ?>

      <div id="themepreview-wrap"><div class="clear-block"><div class="loading"><?php 
        _e("Loading site preview...", "mystique");
        ?>
</div></div></div>

      <table class="form-table">
       <?php 
        $layout = get_mystique_option('layout');
        ?>
       <tr>
        <th scope="row"><p><?php 
        _e("Layout style", "mystique");
        ?>
<span><?php 
        _e("Use page templates if you want to apply these only to specific pages", "mystique");
        ?>
</span></p></th>
        <td id="layout-settings" class="clear-block">
         <div class="layout-box">
          <label for="layout-settings-col-1" class="layout col-1 <?php 
        echo mystique_selected_class('col-1', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-1" value="col-1" <?php 
        checked('col-1', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-2-left" class="layout col-2-left <?php 
        echo mystique_selected_class('col-2-left', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-2-left" value="col-2-left" <?php 
        checked('col-2-left', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-2-right" class="layout col-2-right <?php 
        echo mystique_selected_class('col-2-right', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-2-right" value="col-2-right" <?php 
        checked('col-2-right', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3" class="layout col-3 <?php 
        echo mystique_selected_class('col-3', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3" value="col-3" <?php 
        checked('col-3', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3-left" class="layout col-3-left <?php 
        echo mystique_selected_class('col-3-left', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3-left" value="col-3-left" <?php 
        checked('col-3-left', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3-right" class="layout col-3-right <?php 
        echo mystique_selected_class('col-3-right', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3-right" value="col-3-right" <?php 
        checked('col-3-right', $layout);
        ?>
/>
         </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Color scheme", "mystique");
        ?>
</p></th>
        <td id="color-scheme">

         <div class="color-box">
          <label for="color-box-green" class="color_scheme green"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-green" value="green" <?php 
        checked('green', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-blue" class="color_scheme blue"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-blue" value="blue" <?php 
        checked('blue', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-red" class="color_scheme red"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-red" value="red" <?php 
        checked('red', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-grey" class="color_scheme grey"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-grey" value="grey" <?php 
        checked('grey', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Page (content) width", "mystique");
        ?>
<span><?php 
        _e("Note that fluid pages can be hard to read on large resolutions.", "mystique");
        ?>
</span></p></th>
        <td>

         <label for="opt_page_width_fixed"><input name="page_width" type="radio" id="opt_page_width_fixed" class="radio" value="fixed" <?php 
        checked('fixed', get_mystique_option('page_width'));
        ?>
 /><?php 
        printf(__("Fixed (%s)", "mystique"), '<a href="http://960.gs/" target="_blank">960gs</a>');
        ?>
</label>
         <label for="opt_page_width_fluid"><input name="page_width" type="radio" id="opt_page_width_fluid" class="radio" value="fluid" <?php 
        checked('fluid', get_mystique_option('page_width'));
        ?>
 /><?php 
        _e("Fluid (100%)/Custom", "mystique");
        ?>
</label>

        </td>
       </tr>

       <tr id="dimension_controls"<?php 
        if (get_mystique_option('layout') == 'col-1') {
            ?>
 class="hidden"<?php 
        }
        ?>
>
        <th scope="row"><p><?php 
        _e("Column sizes", "mystique");
        ?>
<span><?php 
        _e("(With 10 pixel padding between them)", "mystique");
        ?>
</span></p></th>
        <td>
         <div id="slider"></div>
         <?php 
        $dimensions = get_mystique_option('dimensions');
        foreach ($dimensions as $layout_size => $layout_types) {
            foreach ($layout_types as $layout => $values) {
                echo '<input type="hidden" id="opt_dimensions_' . $layout_size . '_' . $layout . '" name="dimensions_' . $layout_size . '_' . $layout . '" value="' . $values . '" />' . PHP_EOL;
            }
        }
        ?>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Font style", "mystique");
        ?>
</p></th>
        <td>
          <?php 
        $font_styles = font_styles();
        ?>

          <select name="font_style" id="opt_font_style">
           <?php 
        foreach ($font_styles as $entry => $name) {
            ?>
           <option value="<?php 
            echo $entry;
            ?>
" <?php 
            selected($entry, get_mystique_option('font_style'));
            ?>
 style='font-size:100%; font-family: <?php 
            echo $font_styles[$entry]['code'];
            ?>
;'><?php 
            echo $font_styles[$entry]['desc'];
            ?>
</option>
           <?php 
        }
        ?>
         </select>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Background color", "mystique");
        ?>
<span><?php 
        _e("Leave Black (#000000) to keep the default background", "mystique");
        ?>
</span></p></th>
        <td>

           <div class="color-selector clear-block" id="opt_background_color">
             <div class="preview" style="background-color: #<?php 
        echo wp_specialchars(get_mystique_option('background_color'));
        ?>
">
               <input name="background_color" type="hidden" value="<?php 
        echo wp_specialchars(get_mystique_option('background_color'));
        ?>
" />
             </div>
           </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Custom logo image", "mystique");
        ?>
<span><?php 
        _e("Show a logo image instead of text; Upload the graphic file from your computer", "mystique");
        ?>
</span></p></th>
        <td>
          <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>
           <input type="file" name="file-logo" id="file-logo" />
           <?php 
            if (get_mystique_option('logo')) {
                ?>
           <button type="submit" class="button" name="remove-logo" value="0"><?php 
                _e("Remove current image", "mystique");
                ?>
</button>
           <div class="clear-block">
            <div class="image-preview"><img src="<?php 
                echo get_mystique_option('logo');
                ?>
" style="padding:10px;" /></div>
           </div>
           <?php 
            }
            ?>
         <?php 
        } else {
            ?>
         <p class="error" style="padding: 4px;"><?php 
            printf(__("Directory %s doesn't have write permissions - can't upload!", "mystique"), '<strong>' . get_upload_dir('basedir') . '</strong>');
            ?>
</p><p><?php 
            _e("Check your upload path in Settings/Misc or CHMOD this directory to 755/777.<br />Contact your host if you don't know how", "mystique");
            ?>
</p>
         <?php 
        }
        ?>
         <input type="hidden" name="logo" value="<?php 
        echo get_mystique_option('logo');
        ?>
">
         <input type="hidden" name="logo_size" value="<?php 
        echo get_mystique_option('logo_size');
        ?>
">
        </td>
       </tr>


       <tr>
        <th scope="row"><p><?php 
        _e("Custom background image", "mystique");
        ?>
<span><?php 
        _e("Upload a new background/header image to replace the default one", "mystique");
        ?>
</span></p></th>
        <td>
         <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>
           <input type="file" name="file-background" id="file-background" />
           <?php 
            if (get_mystique_option('background')) {
                ?>
           <button type="submit" class="button" name="remove-background" value="0"><?php 
                _e("Remove current image", "mystique");
                ?>
</button>
           <div class="clear-block">
            <div class="image-preview"><img src="<?php 
                echo get_mystique_option('background');
                ?>
" style="padding:10px;" /></div>
           </div>
           <?php 
            }
            ?>
         <?php 
        } else {
            ?>
         <p class="error" style="padding: 4px;"><?php 
            printf(__("Directory %s doesn't have write permissions - can't upload!", "mystique"), '<strong>' . get_upload_dir('basedir') . '</strong>');
            ?>
</p><p><?php 
            _e("Check your upload path in Settings/Misc or CHMOD this directory to 755/777.<br />Contact your host if you don't know how", "mystique");
            ?>
</p>
         <?php 
        }
        ?>
         <input type="hidden" name="background" value="<?php 
        echo get_mystique_option('background');
        ?>
">
        </td>
       </tr>

      </table>
     <?php 
    }
    ?>
     </div>

     <div class="section" id="tab-content">
      <table class="form-table">

       <tr>
        <th scope="row"><p><?php 
    _e("Posts (single)", "mystique");
    ?>
<span><?php 
    _e("How much information do you want to show on the single post page?", "mystique");
    ?>
</span></p></th>
        <td>
         <label for="opt_single_tags">
           <input name="post_single_tags" id="opt_single_tags" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_tags'));
    ?>
 /> <?php 
    _e("Tags", "mystique");
    ?>
         </label>
         <label for="opt_single_meta">
           <input name="post_single_meta" id="opt_single_meta" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_meta'));
    ?>
 /> <?php 
    _e("Meta", "mystique");
    ?>
         </label>
         <label for="opt_single_share">
          <input name="post_single_share" id="opt_single_share" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_share'));
    ?>
 /> <?php 
    _e("Share", "mystique");
    ?>
         </label>
         <label for="opt_single_author">
           <input name="post_single_author" id="opt_single_author" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_author'));
    ?>
 /> <?php 
    _e("About the author", "mystique");
    ?>
         </label>
         <label for="opt_single_print">
          <input name="post_single_print" id="opt_single_print" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_print'));
    ?>
 /> <?php 
    _e("Print link", "mystique");
    ?>
         </label>
         <label for="opt_single_related">
           <input name="post_single_related" id="opt_single_related" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_related'));
    ?>
 /> <?php 
    _e("Related posts", "mystique");
    ?>
         </label>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Post previews", "mystique");
    ?>
<span><?php 
    _e("How much info do you want to show on blog/category/archive/search pages?", "mystique");
    ?>
</span></p></th>
        <td>
         <label for="opt_post_title">
           <input name="post_title" id="opt_post_title" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_title'));
    ?>
 /> <?php 
    _e("Title", "mystique");
    ?>
         </label>
         <label for="opt_post_info">
           <input name="post_info" id="opt_post_info" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_info'));
    ?>
 /> <?php 
    _e("Info bar", "mystique");
    ?>
         </label>
         <label for="opt_post_tags">
          <input name="post_tags" id="opt_post_tags" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_tags'));
    ?>
 /> <?php 
    _e("Tags");
    ?>
         </label>
         <label for="opt_post_content" style="margin-right: 0;">
          <input name="post_content" id="opt_post_content" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_content'));
    ?>
 /> <?php 
    _e("Content", "mystique");
    ?>
         </label>
         <select name="post_content_length" id="opt_post_content_length"<?php 
    if (!get_mystique_option('post_content')) {
        ?>
 disabled="disabled"<?php 
    }
    ?>
>
           <option value="50" <?php 
    selected('50', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 50 words, filtered', 'mystique');
    ?>
</option>
           <option value="100" <?php 
    selected('100', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 100 words, filtered', 'mystique');
    ?>
</option>
           <option value="200" <?php 
    selected('200', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 200 words, filtered', 'mystique');
    ?>
</option>
           <option value="f" <?php 
    selected('f', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('full', 'mystique');
    ?>
</option>
           <option value="ff" <?php 
    selected('ff', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('full, filtered', 'mystique');
    ?>
</option>
           <option value="e" <?php 
    selected('e', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('excerpt', 'mystique');
    ?>
</option>
         </select>
        </td>
       </tr>

       <tr>
         <th scope="row"><p><?php 
    _e("Auto generate thumbnails", "mystique");
    ?>
<span><?php 
    _e("Get the 1st image attached to a post, if no thumbnail is set manually", "mystique");
    ?>
</span></p></th>
         <td><input name="post_thumb_auto" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_thumb_auto'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Post thumbnail size", "mystique");
    ?>
<span><?php 
    printf(__("Note that this only works for images you upload from now on, older images will be browser-resized. You should use the %s plugin to create missing image sizes", "mystique"), '<a href="http://wordpress.org/extend/plugins/regenerate-thumbnails/" target="_blank">Regenerate Thumbnails</a>');
    ?>
</span></p></th>
        <td>
         <select name="post_thumb">
          <?php 
    $wpsize = get_option('thumbnail_size_w') . ' x ' . get_option('thumbnail_size_h');
    ?>
          <option value="48x48" <?php 
    selected('48x48', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Very small: 48 x 48', 'mystique');
    ?>
</option>
          <option value="64x64" <?php 
    selected('64x64', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Small: 64 x 64', 'mystique');
    ?>
</option>
          <option value="80x80" <?php 
    selected('80x80', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Medium: 80 x 80', 'mystique');
    ?>
</option>
          <option value="100x100" <?php 
    selected('100x100', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Larger: 100 x 100', 'mystique');
    ?>
</option>
          <option value="<?php 
    echo str_replace(" ", "", $wpsize);
    ?>
" <?php 
    selected(str_replace(" ", "", $wpsize), get_mystique_option('post_thumb'));
    ?>
><?php 
    printf(__("WP's Media setting: %s", "mystique"), $wpsize);
    ?>
</option>
         </select>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_content");
    ?>

       <tr>
        <th scope="row"><p><?php 
    _e("Footer content", "mystique");
    ?>
<span><?php 
    if (current_user_can('unfiltered_html')) {
        _e("You can post HTML code", 'mystique');
    } else {
        _e("Only some HTML tags and attributes are allowed", 'mystique');
    }
    ?>
</span></p></th>
        <td>
         <textarea id="opt_footer_content" rows="8" cols="60" name="footer_content" class="code"><?php 
    echo wp_specialchars(get_mystique_option('footer_content'));
    ?>
</textarea>
         <br />
         <?php 
    printf(__("Use the following short codes for convenient adjustments: <br />%s", 'mystique'), '<code>[rss]</code> <code>[copyright]</code> <code>[credit]</code> <code>[ad code=#]</code> <code>[wp-link]</code> <code>[theme-link]</code> <code>[login-link]</code> <code>[blog-title]</code> <code>[xhtml]</code> <code>[css]</code> <code>[top]</code> <code>[page-rank]</code>.');
    ?>
        </td>
       </tr>

      </table>
     </div>

     <div class="section" id="tab-navigation">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Top navigation shows", "mystique");
    ?>
</p></th>
        <td class="clear-block">
         <select name="navigation" id="opt_navigation" class="alignleft">
          <option value="0" <?php 
    selected('0', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Nothing (disabled)', 'mystique');
    ?>
</option>
          <option value="pages" <?php 
    selected('pages', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Pages', 'mystique');
    ?>
</option>
          <option value="categories" <?php 
    selected('categories', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Categories', 'mystique');
    ?>
</option>
          <option value="links" <?php 
    selected('links', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Links', 'mystique');
    ?>
</option>
          <?php 
    if (WP_VERSION > 2.9) {
        ?>
<option value="menus" <?php 
        selected('menus', get_mystique_option('navigation'));
        ?>
><?php 
        _e('Custom Menus', 'mystique');
        ?>
</option><?php 
    }
    ?>
         </select>
         <div class="hidden alignleft inline opt_links">
          <?php 
    $taxonomy = 'link_category';
    $args = '';
    $terms = get_terms($taxonomy, $args);
    if ($terms) {
        ?>
             <?php 
        _e("from category", "mystique");
        ?>
             <select name="navigation_links">
             <?php 
        foreach ($terms as $term) {
            if ($term->count > 0) {
                ?>
               <option value="<?php 
                echo $term->name;
                ?>
" <?php 
                selected($term->name, get_mystique_option('navigation_links'));
                ?>
><?php 
                echo $term->name;
                ?>
 (<?php 
                printf(__("%s links", "mystique"), $term->count);
                ?>
)</option>
              <?php 
            }
        }
        ?>
             </select>
             <?php 
    } else {
        ?>
             <p class="error"><?php 
        _e("No links found", "mystique");
        ?>
</p>
           <?php 
    }
    ?>
         </div>
        </td>
       </tr>

       <tr id="nav-list" <?php 
    if (!get_mystique_option('navigation')) {
        ?>
class="hidden"<?php 
    }
    ?>
>
        <th scope="row"><p><?php 
    _e("Exclude from navigation", "mystique");
    ?>
<span><?php 
    _e("Check the items you wish to hide from the main menu", "mystique");
    ?>
</span></p></th>
        <td>

          <?php 
    if (get_option('show_on_front') != 'page') {
        ?>
          <ul class="nav-exclude">
            <li><input name="exclude_home" id="opt_exclude_home" class="checkbox" type="checkbox" value="1" <?php 
        checked('1', get_mystique_option('exclude_home'));
        ?>
 /><label> <a href="<?php 
        echo get_settings('home');
        ?>
"><?php 
        _e('Home', 'mystique');
        ?>
</a> </label></li>
          </ul>
          <?php 
    }
    ?>


          <?php 
    $categories =& get_categories(array('hide_empty' => false));
    $exclude_categories = explode(',', get_mystique_option('exclude_categories'));
    $walker = new mystique_CategoryWalker('checkbox', 'ul', $exclude_categories);
    if (!empty($categories)) {
        ?>
             <ul class="hidden nav-exclude" id="category-list">
              <?php 
        echo $walker->walk($categories, 0, array('checkboxes' => true, 'count' => true));
        ?>
             </ul>
           <?php 
    }
    ?>

          <?php 
    $pages =& get_pages('sort_column=post_parent,menu_order');
    $exclude_pages = explode(',', get_mystique_option('exclude_pages'));
    $walker = new mystique_PageWalker('checkbox', 'ul', $exclude_pages);
    if (!empty($pages)) {
        ?>
             <ul class="hidden nav-exclude" id="page-list">
              <?php 
        echo $walker->walk($pages, 0, array(), 0);
        ?>
             </ul>
           <?php 
    }
    ?>

        </td>
       </tr>
       <?php 
    do_action("mystique_admin_navigation");
    ?>

      </table>
     </div>

     <div class="section" id="tab-seo">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Additional site optimization for search engines", "mystique");
    ?>
<span><?php 
    _e("Uncheck if you are using a SEO plugin!", "mystique");
    ?>
</span></p></th>
        <td><input name="seo" type="checkbox" class="checkbox" id="opt_seo" value="1" <?php 
    checked('1', get_mystique_option('seo'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"></th>
        <td>
         <h3><?php 
    _e("What does this do?", "mystique");
    ?>
</h3>
         <ul style="list-style: disc">
          <li><em><?php 
    printf(__('enables canonical URLs for comments (duplicate content fix, only needed on wp < 2.9)', 'mystique'));
    ?>
</em></li>
          <li><em><?php 
    printf(__('generates unique titles for posts with multiple comment pages (prevents duplicate titles)', 'mystique'));
    ?>
</em></li>
          <li><em><?php 
    printf(__('generates a unique meta description tag for each page (no meta keywords; why? -<a %s>useless</a>)', 'mystique'), 'href="http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html" target="_blank"');
    ?>
 </em></li>
         </ul>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_seo");
    ?>

      </table>
     </div>

     <div class="section" id="tab-ads">
      <table class="form-table">

       <tr>
        <th scope="row">
         <p><?php 
    printf(__("Advertisment blocks", "mystique"), $i);
    ?>
<span><?php 
    printf(__('Use the %s short code to insert these ads into posts, text widgets or footer', 'mystique'), '<code>[ad]</code>');
    ?>
<br /><br><?php 
    if (!current_user_can('unfiltered_html')) {
        _e("Only some HTML tags and attributes are allowed", 'mystique');
    }
    ?>
</span></p><br />
         <p><span><?php 
    _e("Example:", "mystique");
    ?>
</span></p>
         <p><code>[ad code=4 align=center]</code></p>
        </th>
        <td class="clear-block">
         <?php 
    for ($i = 1; $i <= 6; $i++) {
        ?>
         <div class="ad-code clear-block">
          <label for="opt_ad_code_<?php 
        echo $i;
        ?>
"><?php 
        printf(__("Ad code #%s:", "mystique"), $i);
        ?>
</label><br />
          <textarea rows="8" cols="40" name="ad_code_<?php 
        echo $i;
        ?>
" id="opt_ad_code_<?php 
        echo $i;
        ?>
" class="code"><?php 
        echo wp_specialchars(get_mystique_option('ad_code_' . $i));
        ?>
</textarea>

         </div>
         <?php 
    }
    ?>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_ads");
    ?>

      </table>
     </div>

     <div class="section" id="tab-advanced">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Use jQuery", "mystique");
    ?>
<span><?php 
    _e("For testing purposes only. Only uncheck if you know what you're doing!", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_jquery" name="jquery" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('jquery'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Enable AJAX for comments", "mystique");
    ?>
<span><?php 
    _e("Navigate trough comment pages and post comments without refreshing (faster load, but may be incompatible with some plugins)", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_ajax_comments" name="ajax_comments" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('ajax_comments'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Enable theme built-in lightbox on all image links", "mystique");
    ?>
<span><?php 
    _e("Uncheck if you prefer a lightbox plugin", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_lightbox" name="lightbox" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('lightbox'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Remove Mystique settings from the database after theme switch", "mystique");
    ?>
<span><?php 
    _e("Only check if you're planning to remove and change the theme", "mystique");
    ?>
</span></p></th>      <td>
         <input name="remove_settings" id="opt_remove_settings" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('remove_settings'));
    ?>
 />
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_advanced");
    ?>

      </table>

      <?php 
    if (current_user_can('edit_themes')) {
        // disable this option for users that can't edit themes (usually on wpmu)
        ?>
      <hr />
      <table class="form-table">

       <tr>
        <th scope="row">
         <p><?php 
        _e("User functions", "mystique");
        ?>
<span><?php 
        _e("PHP code to add to the theme functions. Useful if you have plugins that require you to change the theme's functions.php file", "mystique");
        ?>
</span></p>
       </th>
        <td>
         <textarea rows="16" cols="60" name="functions" id="opt_functions" class="code"><?php 
        echo wp_specialchars(get_mystique_option('functions'));
        ?>
</textarea>
        </td>
       </tr>

      </table>
      <?php 
    }
    ?>
     </div>

     <div class="section" id="tab-css">
      <table class="form-table">

       <tr>
        <th scope="row"><p><?php 
    _e("CSS to add, or modify theme styles", "mystique");
    ?>
<span><?php 
    printf(__("Check %s to see existing theme classes and properties", "mystique"), '<a href="' . get_bloginfo('stylesheet_url') . '">style.css</a>');
    ?>
</span></p>
        </th>
        <td valign="top">
         <textarea rows="30" cols="80" name="user_css" id="opt_user_css" class="code"><?php 
    echo wp_specialchars(get_mystique_option('user_css'));
    ?>
</textarea>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_user_css");
    ?>

      </table>
     </div>


    </div>
    <!-- /sections -->

   </div>
   <!-- /tabbed content -->

   </form>

   <div class="support">
    <form class="alignleft" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="4605915" /> <input alt="Donate" name="submit" src="<?php 
    echo THEME_URL;
    ?>
/admin/images/pp.gif" type="image" /></form>
    <a href="http://digitalnature.ro/projects/mystique"><strong>Mystique</strong></a> is a free theme designed by <a href="http://digitalnature.ro">digitalnature</a>.<br />You can support the development of more free resources by donating.
   </div>

  </div>
  <?php 
}
Esempio n. 10
0
function mystique_advertisment($atts)
{
    extract(shortcode_atts(array('code' => 1, 'align' => 'left', 'inline' => 0), $atts));
    $ad = get_mystique_option('ad_code_' . $code);
    if (!empty($ad)) {
        $ad = '<div class="ad align' . wp_specialchars($align) . '">' . $ad . '</div>';
        if (!$inline) {
            $ad = '<div class="clear-block">' . $ad . '</div>';
        }
        return $ad;
    } else {
        return '<p class="error"><strong>[ad]</strong> ' . sprintf(__("Empty ad slot (#%s)!", "mystique"), wp_specialchars($code)) . '</p>';
    }
}
Esempio n. 11
0
function mystique_featured_admin()
{
    ?>
 <tr>
  <th scope="row"><p><?php 
    _e("Featured posts", "mystique");
    ?>
<span><?php 
    printf(__("You can mark posts as featured on the %s page", "mystique"), '<a href="' . admin_url('edit.php') . '">Posts</a>');
    ?>
</span></p></th>
  <td>

    <table>

     <tr>
      <th scope="row"><p><?php 
    _e("Show on", "mystique");
    ?>
</p></th>
      <td>

       <label for="opt_featured_on_template">
         <input disabled="disabled" checked="checked" name="featured_on_template" id="opt_featured_on_template" type="checkbox" class="checkbox" value="1" ?> <?php 
    _e("Pages that use the Featured posts template", "mystique");
    ?>
       </label>
       <br />

       <label for="opt_featured_on_home">
         <input name="featured_on_home" id="opt_featured_on_home" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('featured_on_home'));
    ?>
 /> <?php 
    _e("Home page", "mystique");
    ?>
       </label>
       <br />

       <label for="opt_featured_on_single">
         <input name="featured_on_single" id="opt_featured_on_single" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('featured_on_single'));
    ?>
 /> <?php 
    _e("Single post pages", "mystique");
    ?>
       </label>
       <br />

       <label for="opt_featured_on_archives">
         <input name="featured_on_archives" id="opt_featured_on_archives" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('featured_on_archives'));
    ?>
 /> <?php 
    _e("Archive pages (Category, Tags etc)", "mystique");
    ?>
       </label>
       <br />

       <label for="opt_featured_on_404">
         <input name="featured_on_404" id="opt_featured_on_404" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('featured_on_404'));
    ?>
 /> <?php 
    _e("404 pages", "mystique");
    ?>
       </label>
       <br />

       <label for="opt_featured_on_search">
         <input name="featured_on_search" id="opt_featured_on_search" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('featured_on_search'));
    ?>
 /> <?php 
    _e("Search page", "mystique");
    ?>
       </label>
       <br />

       <label for="opt_featured_on_pages">
         <input name="featured_on_pages" id="opt_featured_on_pages" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('featured_on_pages'));
    ?>
 /> <?php 
    _e("All other pages", "mystique");
    ?>
       </label>

      </td>
     </tr>

     <tr>
      <th scope="row"><p><?php 
    _e("Maximum number of posts to display", "mystique");
    ?>
</p></th>
      <td>
       <input type="text" size="5" name="featured_count" value="<?php 
    echo wp_specialchars(get_mystique_option('featured_count'));
    ?>
" />
      </td>
     </tr>

     <tr>
      <th scope="row"><p><?php 
    _e("Slide delay", "mystique");
    ?>
</p></th>
      <td>
       <input type="text" size="5" name="featured_timeout" value="<?php 
    echo wp_specialchars(get_mystique_option('featured_timeout'));
    ?>
" />
       <?php 
    _e("seconds", "mystique");
    ?>
      </td>
     </tr>

     <tr>
      <th scope="row"><p><?php 
    _e("Don't show posts older than", "mystique");
    ?>
</p></th>
      <td>
       <input type="text" size="5" name="featured_timeframe" value="<?php 
    echo wp_specialchars(get_mystique_option('featured_timeframe'));
    ?>
" />
       <?php 
    _e("days", "mystique");
    ?>
      </td>
     </tr>

    </table>

    <input type="hidden" name="featured_posts" value="<?php 
    echo get_mystique_option('featured_posts');
    ?>
" />

  </td>
 </tr>
 <?php 
}
Esempio n. 12
0
  // fade effect
  if (!isIE) {
    jQuery('.fadeThis').append('<span class="hover"></span>').each(function () {
      var jQueryspan = jQuery('> span.hover', this).css('opacity', 0);
      jQuery(this).hover(function () {
        jQueryspan.stop().fadeTo(333, 1);
      },
      function () {
        jQueryspan.stop().fadeTo(333, 0);
      });
    });
  }
  jQuery("#footer-blocks.withSlider").loopedSlider();
  jQuery("#featured-content.withSlider").loopedSlider({
    autoStart: <?php 
echo (int) get_mystique_option('featured_timeout') * 1000;
?>
,
    autoHeight: false
  }); // scroll to top
  jQuery("a#goTop").click(function () {
    jQuery('html').animate({
      scrollTop: 0
    },
    'slow');
  });
  jQuery('.clearField').clearField({
    blurClass: 'clearFieldBlurred',
    activeClass: 'clearFieldActive'
  });