add_menu(
array( 'id' => 'edit-theme',
'title' => __('Theme Options', 'owd'),
'href' => admin_url( '/customize.php')
)
);
}
add_action( 'admin_bar_menu', 'admin_bar_theme_editor_option', 100 );
/*--------------------------------------------------------------
Thumbnail
----------------------------------------------------------------*/
function get_image_url(){
$image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id,'full');
$image_url = $image_url[0];
echo $image_url;
}
include ( 'aq_resizer.php' );
/* --- exceprt --- */
function custom_excerpt_more( $more ) {
return '...';
}
add_filter( 'excerpt_more', 'custom_excerpt_more' );
function css_new() {
if (is_single()) {
?>
body, td, textarea, input, select {
font-family: Helvetica, sans-serif;
font-size: 14px;
background:#FFF;
color:#024A68;
}
a:-webkit-any-link {
padding:2px;
color: #024A68;
text-decoration: none;
cursor: auto;
}
.widget, #widget-list .widget-top,
.postbox, #titlediv,
#poststuff .postarea,
.stuffbox {
border-color: #ccc;
-webkit-box-shadow: inset 0 1px 0 #AFAFAF;
box-shadow: inset 0 1px 0 #fff;
-webkit-border-radius: 4px;
border-radius: 3px;
}
#adminmenu .wp-submenu a:hover, #adminmenu .wp-submenu a:focus {
background-color: #ABD5FF;
color: #333;
font-weight: bold;
}
';
}
/* end style */
/*------------------------------------------------------------------
*
* REGISTER WIDGET FOOTER
*
*-------------------------------------------------------------------*/
//footer 1
register_sidebar(array(
'name' => __( 'Footer 1', 'bgw'),
'id' => 'footer-1',
'description' => __( 'Widgets footer 1', 'bgw' ),
'before_widget' => '',
'before_title' => '
',
));
//footer 2
register_sidebar(array(
'name' => __( 'Footer 2' , 'bgw'),
'id' => 'footer-2',
'description' => __( 'Widgets footer 2', 'bgw' ),
'before_widget' => '',
'before_title' => '',
));
//footer 3
register_sidebar(array(
'name' => __( 'Footer 3', 'bgw'),
'id' => 'footer-3',
'description' => __( 'Widgets footer 3', 'bgw' ),
'before_widget' => '',
'before_title' => '',
));
//footer 4
register_sidebar(array(
'name' => __( 'Footer 4', 'bgw'),
'id' => 'footer-4',
'description' => __( 'Widgets footer 4', 'bgw' ),
'before_widget' => '',
'before_title' => '',
));
function bgw_add_editor_styles() {
add_editor_style( 'custom-editor-style.css' );
}
add_action( 'init', 'bgw_add_editor_styles' );
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) )
$content_width = 640; /* pixels */
if ( ! function_exists( 'bgw_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support post thumbnails.
*/
function bgw_setup() {
/**
* Make theme available for translation
* Translations can be filed in the /languages/ directory
* If you're building a theme based on Blogwise, use a find and replace
* to change 'bgw' to the name of your theme in all the template files
*/
load_theme_textdomain( 'bgw', get_template_directory() . '/languages' );
/**
* Add default posts and comments RSS feed links to head
*/
add_theme_support( 'automatic-feed-links' );
/**
* Enable support for Post Thumbnails on posts and pages
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support( 'post-thumbnails' );
add_image_size( 'thumb-single', 630, 550, true );
/**
* This theme uses wp_nav_menu() in one location.
*/
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'bgw' ),
) );
/**
* Enable support for Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
/**
* Setup the WordPress core custom background feature.
*/
add_theme_support( 'custom-background', apply_filters( 'bgw_custom_background_args', array(
'default-color' => '383838',
'default-image' => '',
) ) );
}
endif; // bgw_setup
add_action( 'after_setup_theme', 'bgw_setup' );
/**
* Register widgetized area and update sidebar with default widgets
*/
function bgw_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'bgw' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'bgw_widgets_init' );
/**
* Enqueue scripts and styles
*/
function bgw_scripts() {
wp_enqueue_script('jquery');
wp_enqueue_style( 'bgw-style', get_stylesheet_uri() );
wp_enqueue_script( 'bgw-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'bgw-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
wp_enqueue_script( 'jquery.nicescroll.min', get_stylesheet_directory_uri() . '/js/jquery.nicescroll.min.js', array( 'jquery'), true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'bgw-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
add_action( 'wp_enqueue_scripts', 'bgw_scripts' );
/**
* Implement the Custom Header feature.
*/
//require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';