summaryrefslogtreecommitdiff
path: root/functions.php
blob: ad5e2a7c2e11ed2f43b10c14c2f8c1cfd575df1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
 * remulus functions and definitions
 *
 * @package remulus
 */

if ( ! function_exists( 'remulus_setup' ) ) :
function remulus_setup() {
  register_nav_menus(array(
    'primary' => __('Primary Menu', 'remulus'),
    'secondary' => __('Footer Menu', 'remulus'),
  ));

}
endif; // remulus_setup
add_action( 'after_setup_theme', 'remulus_setup' );


function remulus_scripts() {
  wp_enqueue_style('remulus-style', get_stylesheet_uri());
  wp_enqueue_style('remulus-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3');
  wp_enqueue_style('remulus-open-sans', '//fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic');
}
add_action( 'wp_enqueue_scripts', 'remulus_scripts' );


if ( ! function_exists( 'remulus_paging_nav' ) ) :
function remulus_paging_nav() {
  // Don't print empty markup if there's only one page.
  if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
    return;
  }
  ?>
  <article>
    <nav class="navigation paging-navigation" role="navigation">
      <div class="nav-links">
        <?php if ( get_next_posts_link() ) : ?>
        <div class="nav-previous"><?php next_posts_link( __( 'Older posts', 'remulus' ) ); ?></div>
        <?php endif; ?>

        <?php if ( get_previous_posts_link() ) : ?>
        <div class="nav-next"><?php previous_posts_link( __( 'Newer posts', 'remulus' ) ); ?></div>
        <?php endif; ?>
      </div>
    </nav>
  <article>
  <?php
}
endif;


function remulus_modify_contact_methods($profile_fields) {
  $profile_fields['twitter'] = 'Twitter URL';
  $profile_fields['facebook'] = 'Facebook URL';
  $profile_fields['linkedin'] = 'linkedin URL';
  $profile_fields['xing'] = 'xing URL';

  return $profile_fields;
}
add_filter('user_contactmethods', 'remulus_modify_contact_methods');