Mega update
This commit is contained in:
commit
65c2f03534
|
@ -0,0 +1,4 @@
|
|||
barebones
|
||||
=========
|
||||
|
||||
A barebones theme for WordPress 3.3+
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
/* =Add support for missing cool stuff
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
add_post_type_support( 'page', 'excerpt' );
|
||||
|
||||
/* =Remove gunk from <head>
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
remove_action( 'wp_head', 'rsd_link' );
|
||||
remove_action( 'wp_head', 'wlwmanifest_link' );
|
||||
remove_action( 'wp_head', 'wp_generator' );
|
||||
remove_action( 'wp_head', 'start_post_rel_link' );
|
||||
remove_action( 'wp_head', 'index_rel_link' );
|
||||
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
|
||||
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
|
||||
|
||||
function remove_comments_rss( $for_comments ) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_filter( 'post_comments_feed_link', 'remove_comments_rss' );
|
||||
|
||||
/* =Register a sidebar for the lolz
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
if ( function_exists( 'register_sidebar' ) )
|
||||
register_sidebar();
|
||||
|
||||
?>
|
|
@ -1,5 +1,6 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<<<<<<< HEAD
|
||||
<div class="content container">
|
||||
|
||||
<div class="main">
|
||||
|
@ -32,5 +33,10 @@
|
|||
</aside>
|
||||
|
||||
</div>
|
||||
=======
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
>>>>>>> e5b0a5f1e5b29ff6247673f4f848f03a9d4209f2
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -29,6 +29,11 @@ caption, th {
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-size: 100%;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
}
|
||||
|
@ -352,4 +357,4 @@ img.alignright {
|
|||
}
|
||||
|
||||
/* =Layout
|
||||
-------------------------------------------------------------- */
|
||||
-------------------------------------------------------------- */
|
|
@ -0,0 +1,156 @@
|
|||
<?php
|
||||
|
||||
function themename_customize_register($wp_customize){
|
||||
|
||||
$wp_customize->add_section('themename_color_scheme', array(
|
||||
'title' => __('Color Scheme', 'themename'),
|
||||
'priority' => 120,
|
||||
));
|
||||
|
||||
// =============================
|
||||
// = Text Input =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[text_test]', array(
|
||||
'default' => 'Arse!',
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
|
||||
));
|
||||
|
||||
$wp_customize->add_control('themename_text_test', array(
|
||||
'label' => __('Text Test', 'themename'),
|
||||
'section' => 'themename_color_scheme',
|
||||
'settings' => 'themename_theme_options[text_test]',
|
||||
));
|
||||
|
||||
// =============================
|
||||
// = Radio Input =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[color_scheme]', array(
|
||||
'default' => 'value2',
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
));
|
||||
|
||||
$wp_customize->add_control('themename_color_scheme', array(
|
||||
'label' => __('Color Scheme', 'themename'),
|
||||
'section' => 'themename_color_scheme',
|
||||
'settings' => 'themename_theme_options[color_scheme]',
|
||||
'type' => 'radio',
|
||||
'choices' => array(
|
||||
'value1' => 'Choice 1',
|
||||
'value2' => 'Choice 2',
|
||||
'value3' => 'Choice 3',
|
||||
),
|
||||
));
|
||||
|
||||
// =============================
|
||||
// = Checkbox =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[checkbox_test]', array(
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
));
|
||||
|
||||
$wp_customize->add_control('display_header_text', array(
|
||||
'settings' => 'themename_theme_options[checkbox_test]',
|
||||
'label' => __('Display Header Text'),
|
||||
'section' => 'themename_color_scheme',
|
||||
'type' => 'checkbox',
|
||||
));
|
||||
|
||||
|
||||
// =============================
|
||||
// = Select Box =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[header_select]', array(
|
||||
'default' => 'value2',
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
|
||||
));
|
||||
$wp_customize->add_control( 'example_select_box', array(
|
||||
'settings' => 'themename_theme_options[header_select]',
|
||||
'label' => 'Select Something:',
|
||||
'section' => 'themename_color_scheme',
|
||||
'type' => 'select',
|
||||
'choices' => array(
|
||||
'value1' => 'Choice 1',
|
||||
'value2' => 'Choice 2',
|
||||
'value3' => 'Choice 3',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
// =============================
|
||||
// = Image Upload =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[image_upload_test]', array(
|
||||
'default' => 'image.jpg',
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
|
||||
));
|
||||
|
||||
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'image_upload_test', array(
|
||||
'label' => __('Image Upload Test', 'themename'),
|
||||
'section' => 'themename_color_scheme',
|
||||
'settings' => 'themename_theme_options[image_upload_test]',
|
||||
)));
|
||||
|
||||
// =============================
|
||||
// = File Upload =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[upload_test]', array(
|
||||
'default' => 'arse',
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
|
||||
));
|
||||
|
||||
$wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize, 'upload_test', array(
|
||||
'label' => __('Upload Test', 'themename'),
|
||||
'section' => 'themename_color_scheme',
|
||||
'settings' => 'themename_theme_options[upload_test]',
|
||||
)));
|
||||
|
||||
|
||||
// =============================
|
||||
// = Color Picker =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[link_color]', array(
|
||||
'default' => '000',
|
||||
'sanitize_callback' => 'sanitize_hex_color',
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
|
||||
));
|
||||
|
||||
$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array(
|
||||
'label' => __('Link Color', 'themename'),
|
||||
'section' => 'themename_color_scheme',
|
||||
'settings' => 'themename_theme_options[link_color]',
|
||||
)));
|
||||
|
||||
|
||||
// =============================
|
||||
// = Page Dropdown =
|
||||
// =============================
|
||||
$wp_customize->add_setting('themename_theme_options[page_test]', array(
|
||||
'capability' => 'edit_theme_options',
|
||||
'type' => 'option',
|
||||
|
||||
));
|
||||
|
||||
$wp_customize->add_control('themename_page_test', array(
|
||||
'label' => __('Page Test', 'themename'),
|
||||
'section' => 'themename_color_scheme',
|
||||
'type' => 'dropdown-pages',
|
||||
'settings' => 'themename_theme_options[page_test]',
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
add_action('customize_register', 'themename_customize_register');
|
||||
|
||||
?>
|
Loading…
Reference in New Issue