Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( ! isset( $content_width ) )
- $content_width = 940;
- function register_my_menu() {
- register_nav_menu('primary',__( 'Primary Menu' ));
- register_nav_menu('footer',__( 'Footer Menu' ));
- }
- add_action( 'init', 'register_my_menu' );
- function simple_rabbit_widgets_init() {
- register_sidebar( array(
- 'name' => __( 'Main Sidebar', 'simple-rabbit' ),
- 'id' => 'sidebar-0',
- 'description' => __( 'Appears on all pages', 'simple-rabbit' ),
- 'before_widget' => '<div id="%1$s" class="widget %2$s">',
- 'after_widget' => '</div>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Widget Area', 'simple-rabbit' ),
- 'id' => 'sidebar-1',
- 'description' => __( 'Appears on all pages', 'simple-rabbit' ),
- 'before_widget' => '<div id="%1$s" class="widget %2$s">',
- 'after_widget' => '</div>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>',
- ) );
- }
- add_action( 'widgets_init', 'simple_rabbit_widgets_init' );
- wp_register_style( 'mainstyle', get_stylesheet_uri());
- wp_enqueue_style( 'mainstyle', get_stylesheet_uri());
- /*
- * Loads the Options Panel
- *
- * If you're loading from a child theme use stylesheet_directory
- * instead of template_directory
- */
- if ( !function_exists( 'optionsframework_init' ) ) {
- define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/' );
- require_once dirname( __FILE__ ) . '/inc/options-framework.php';
- }
- /*
- * This is an example of how to add custom scripts to the options panel.
- * This one shows/hides the an option when a checkbox is clicked.
- *
- * You can delete it if you not using that option
- */
- add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
- function twentytwelve_comment( $comment, $args, $depth ) {
- $GLOBALS['comment'] = $comment;
- switch ( $comment->comment_type ) :
- case 'pingback' :
- case 'trackback' :
- // Display trackbacks differently than normal comments.
- ?>
- <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
- <p>
- <?php _e( 'Pingback:', 'twentytwelve' ); ?>
- <?php comment_author_link(); ?>
- <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
- </p>
- <?php
- break;
- default :
- // Proceed with normal comments.
- global $post;
- ?>
- <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
- <article id="comment-<?php comment_ID(); ?>" class="comment">
- <header class="comment-meta comment-author vcard">
- <?php
- echo get_avatar( $comment, 44 );
- printf( '<cite class="fn">%1$s %2$s</cite>',
- get_comment_author_link(),
- // If current post author is also comment author, make it known visually.
- ( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : '');
- printf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
- esc_url( get_comment_link( $comment->comment_ID ) ),
- get_comment_time( 'c' ),
- /* translators: 1: date, 2: time */
- sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )
- );
- ?>
- </header>
- <!-- .comment-meta -->
- <?php if ( '0' == $comment->comment_approved ) : ?>
- <p class="comment-awaiting-moderation">
- <?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?>
- </p>
- <?php endif; ?>
- <section class="comment-content comment">
- <?php comment_text(); ?>
- <?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class="edit-link">', '</p>' ); ?>
- </section>
- <!-- .comment-content -->
- <div class="reply">
- <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>↓</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
- </div>
- <!-- .reply -->
- </article>
- <!-- #comment-## -->
- <?php
- break;
- endswitch; // end comment_type check
- }
- function optionsframework_custom_scripts() { ?>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- jQuery('#example_showhidden').click(function() {
- jQuery('#section-example_text_hidden').fadeToggle(400);
- });
- if (jQuery('#example_showhidden:checked').val() !== undefined) {
- jQuery('#section-example_text_hidden').show();
- }
- });
- </script>
- <?php
- }
- function simple_rabbit_scripts_styles() {
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
- wp_enqueue_script( 'comment-reply' );
- }
- add_action( 'wp_enqueue_scripts', 'simple_rabbit_scripts_styles' );
- add_theme_support( 'automatic-feed-links' );
- add_action( 'wp_enqueue_scripts', function() {
- wp_register_style( 'mainstyle', get_stylesheet_uri());
- wp_enqueue_style( 'mainstyle', get_stylesheet_uri());
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement