'002728',
'border' => '034450',
'text' => 'ffffff',
'link' => 'a8ef9d',
'url' => 'afdaff',
);
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) )
$content_width = 640;
/**
* Sets up theme defaults and registers support for WordPress features.
*/
if ( ! function_exists( 'motion_setup' ) ):
function motion_setup() {
//Make theme available for translation
load_theme_textdomain( 'structuretheme', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
// This theme uses wp_nav_menu()
register_nav_menus( array(
'primary' => __( 'Primary Navigation' ),
) );
// Add support for Post Formats
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
}
endif;
add_action( 'after_setup_theme', 'motion_setup' );
//Create Theme Options Page
require_once ( get_template_directory() . '/functions/options-page.php' );
// Custom background
add_theme_support( 'custom-background' );
add_theme_support( 'print-style' );
/**
* Enqueue scripts and styles
*/
function motion_scripts() {
wp_enqueue_style( 'motion', get_stylesheet_uri() );
wp_enqueue_script( 'sfhover', get_template_directory_uri() . '/js/sfhover.js' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'motion_scripts' );
function motion_custom_background() {
if ( '' != get_background_color() && '' == get_background_image() ) { ?>
'Sidebar',
'id' => 'sidebar',
'before_widget' => '
',
'after_widget' => '',
'before_title' => ''
)
);
register_sidebar(
array(
'name' => 'Footer Left',
'id' => 'footer_left',
'before_widget' => '',
'after_widget' => '',
'before_title' => ''
)
);
register_sidebar(
array(
'name' => 'Footer Middle',
'id' => 'footer_middle',
'before_widget' => '',
'after_widget' => '',
'before_title' => ''
)
);
register_sidebar(
array(
'name' => 'Footer Right',
'id' => 'footer_right',
'before_widget' => '',
'after_widget' => '',
'before_title' => ''
)
);
register_sidebar(
array(
'name' => 'Header',
'id' => 'header',
'before_widget' => '',
'before_title' => ''
)
);
}
function motion_page_menu() { // fallback for primary navigation ?>
id="li-comment-">
id="li-comment-">
'%s/images/genericlogo.png',
'default-text-color' => '',
'header-text' => false,
'width' => 50,
'height' => 50,
'admin-head-callback' => 'motion_admin_header_style',
) ) );
}
add_action( 'after_setup_theme', 'motion_custom_header_setup' );
function motion_admin_header_style() { ?>
tag based on what is being viewed.
*
* @since Motion 1.1.6
*/
function motion_wp_title( $title, $sep ) {
global $page, $paged;
if ( is_feed() )
return $title;
// Add the blog name
$title .= get_bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title .= " $sep $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
$title .= " $sep " . sprintf( __( 'Page %s', 'motion' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'motion_wp_title', 10, 2 );