Skip to content

Commit afdf4fd

Browse files
author
Grant Kinney
committed
Initial commit
0 parents  commit afdf4fd

File tree

173 files changed

+17865
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+17865
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "wordpress"]
2+
path = wordpress
3+
url = https://github.com/WordPress/WordPress.git

sample.local/.DS_Store

6 KB
Binary file not shown.

sample.local/db-config.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
// ** MySQL settings - You can get this info from your web host ** //
3+
/** The name of the database for WordPress */
4+
define('DB_NAME', 'database_name_here');
5+
6+
/** MySQL database username */
7+
define('DB_USER', 'username_here');
8+
9+
/** MySQL database password */
10+
define('DB_PASSWORD', 'password_here');
11+
12+
/**
13+
* WordPress Database Table prefix.
14+
*
15+
* You can have multiple installations in one database if you give each a unique
16+
* prefix. Only numbers, letters, and underscores please!
17+
*/
18+
$table_prefix = 'wp_';

sample.local/index.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
/**
3+
* Front to the WordPress application. This file doesn't do anything, but loads
4+
* wp-blog-header.php which does and tells WordPress to load the theme.
5+
*
6+
* @package WordPress
7+
*/
8+
9+
/**
10+
* Tells WordPress to load the WordPress theme and output it.
11+
*
12+
* @var bool
13+
*/
14+
define('WP_USE_THEMES', true);
15+
16+
/** Loads the WordPress Environment and Template */
17+
require('./wordpress/wp-blog-header.php');

sample.local/wp-content/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
// Silence is golden.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
/**
3+
* @package Hello_Dolly
4+
* @version 1.6
5+
*/
6+
/*
7+
Plugin Name: Hello Dolly
8+
Plugin URI: http://wordpress.org/extend/plugins/hello-dolly/
9+
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
10+
Author: Matt Mullenweg
11+
Version: 1.6
12+
Author URI: http://ma.tt/
13+
*/
14+
15+
function hello_dolly_get_lyric() {
16+
/** These are the lyrics to Hello Dolly */
17+
$lyrics = "Hello, Dolly
18+
Well, hello, Dolly
19+
It's so nice to have you back where you belong
20+
You're lookin' swell, Dolly
21+
I can tell, Dolly
22+
You're still glowin', you're still crowin'
23+
You're still goin' strong
24+
We feel the room swayin'
25+
While the band's playin'
26+
One of your old favourite songs from way back when
27+
So, take her wrap, fellas
28+
Find her an empty lap, fellas
29+
Dolly'll never go away again
30+
Hello, Dolly
31+
Well, hello, Dolly
32+
It's so nice to have you back where you belong
33+
You're lookin' swell, Dolly
34+
I can tell, Dolly
35+
You're still glowin', you're still crowin'
36+
You're still goin' strong
37+
We feel the room swayin'
38+
While the band's playin'
39+
One of your old favourite songs from way back when
40+
Golly, gee, fellas
41+
Find her a vacant knee, fellas
42+
Dolly'll never go away
43+
Dolly'll never go away
44+
Dolly'll never go away again";
45+
46+
// Here we split it into lines
47+
$lyrics = explode( "\n", $lyrics );
48+
49+
// And then randomly choose a line
50+
return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
51+
}
52+
53+
// This just echoes the chosen line, we'll position it later
54+
function hello_dolly() {
55+
$chosen = hello_dolly_get_lyric();
56+
echo "<p id='dolly'>$chosen</p>";
57+
}
58+
59+
// Now we set that function up to execute when the admin_notices action is called
60+
add_action( 'admin_notices', 'hello_dolly' );
61+
62+
// We need some CSS to position the paragraph
63+
function dolly_css() {
64+
// This makes sure that the positioning is also good for right-to-left languages
65+
$x = is_rtl() ? 'left' : 'right';
66+
67+
echo "
68+
<style type='text/css'>
69+
#dolly {
70+
float: $x;
71+
padding-$x: 15px;
72+
padding-top: 5px;
73+
margin: 0;
74+
font-size: 11px;
75+
}
76+
</style>
77+
";
78+
}
79+
80+
add_action( 'admin_head', 'dolly_css' );
81+
82+
?>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
// Silence is golden.
3+
?>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
// Silence is golden.
3+
?>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
/**
3+
* The template for displaying 404 pages (Not Found).
4+
*
5+
* @package WordPress
6+
* @subpackage Twenty_Eleven
7+
* @since Twenty Eleven 1.0
8+
*/
9+
10+
get_header(); ?>
11+
12+
<div id="primary">
13+
<div id="content" role="main">
14+
15+
<article id="post-0" class="post error404 not-found">
16+
<header class="entry-header">
17+
<h1 class="entry-title"><?php _e( 'This is somewhat embarrassing, isn&rsquo;t it?', 'twentyeleven' ); ?></h1>
18+
</header>
19+
20+
<div class="entry-content">
21+
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching, or one of the links below, can help.', 'twentyeleven' ); ?></p>
22+
23+
<?php get_search_form(); ?>
24+
25+
<?php the_widget( 'WP_Widget_Recent_Posts', array( 'number' => 10 ), array( 'widget_id' => '404' ) ); ?>
26+
27+
<div class="widget">
28+
<h2 class="widgettitle"><?php _e( 'Most Used Categories', 'twentyeleven' ); ?></h2>
29+
<ul>
30+
<?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
31+
</ul>
32+
</div>
33+
34+
<?php
35+
/* translators: %1$s: smilie */
36+
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>';
37+
the_widget( 'WP_Widget_Archives', array('count' => 0 , 'dropdown' => 1 ), array( 'after_title' => '</h2>'.$archive_content ) );
38+
?>
39+
40+
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
41+
42+
</div><!-- .entry-content -->
43+
</article><!-- #post-0 -->
44+
45+
</div><!-- #content -->
46+
</div><!-- #primary -->
47+
48+
<?php get_footer(); ?>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
/**
3+
* The template for displaying Archive pages.
4+
*
5+
* Used to display archive-type pages if nothing more specific matches a query.
6+
* For example, puts together date-based pages if no date.php file exists.
7+
*
8+
* Learn more: http://codex.wordpress.org/Template_Hierarchy
9+
*
10+
* @package WordPress
11+
* @subpackage Twenty_Eleven
12+
* @since Twenty Eleven 1.0
13+
*/
14+
15+
get_header(); ?>
16+
17+
<section id="primary">
18+
<div id="content" role="main">
19+
20+
<?php if ( have_posts() ) : ?>
21+
22+
<header class="page-header">
23+
<h1 class="page-title">
24+
<?php if ( is_day() ) : ?>
25+
<?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?>
26+
<?php elseif ( is_month() ) : ?>
27+
<?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
28+
<?php elseif ( is_year() ) : ?>
29+
<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
30+
<?php else : ?>
31+
<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
32+
<?php endif; ?>
33+
</h1>
34+
</header>
35+
36+
<?php twentyeleven_content_nav( 'nav-above' ); ?>
37+
38+
<?php /* Start the Loop */ ?>
39+
<?php while ( have_posts() ) : the_post(); ?>
40+
41+
<?php
42+
/* Include the Post-Format-specific template for the content.
43+
* If you want to overload this in a child theme then include a file
44+
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
45+
*/
46+
get_template_part( 'content', get_post_format() );
47+
?>
48+
49+
<?php endwhile; ?>
50+
51+
<?php twentyeleven_content_nav( 'nav-below' ); ?>
52+
53+
<?php else : ?>
54+
55+
<article id="post-0" class="post no-results not-found">
56+
<header class="entry-header">
57+
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
58+
</header><!-- .entry-header -->
59+
60+
<div class="entry-content">
61+
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
62+
<?php get_search_form(); ?>
63+
</div><!-- .entry-content -->
64+
</article><!-- #post-0 -->
65+
66+
<?php endif; ?>
67+
68+
</div><!-- #content -->
69+
</section><!-- #primary -->
70+
71+
<?php get_sidebar(); ?>
72+
<?php get_footer(); ?>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?php
2+
/**
3+
* The template for displaying Author Archive pages.
4+
*
5+
* @package WordPress
6+
* @subpackage Twenty_Eleven
7+
* @since Twenty Eleven 1.0
8+
*/
9+
10+
get_header(); ?>
11+
12+
<section id="primary">
13+
<div id="content" role="main">
14+
15+
<?php if ( have_posts() ) : ?>
16+
17+
<?php
18+
/* Queue the first post, that way we know
19+
* what author we're dealing with (if that is the case).
20+
*
21+
* We reset this later so we can run the loop
22+
* properly with a call to rewind_posts().
23+
*/
24+
the_post();
25+
?>
26+
27+
<header class="page-header">
28+
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
29+
</header>
30+
31+
<?php
32+
/* Since we called the_post() above, we need to
33+
* rewind the loop back to the beginning that way
34+
* we can run the loop properly, in full.
35+
*/
36+
rewind_posts();
37+
?>
38+
39+
<?php twentyeleven_content_nav( 'nav-above' ); ?>
40+
41+
<?php
42+
// If a user has filled out their description, show a bio on their entries.
43+
if ( get_the_author_meta( 'description' ) ) : ?>
44+
<div id="author-info">
45+
<div id="author-avatar">
46+
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?>
47+
</div><!-- #author-avatar -->
48+
<div id="author-description">
49+
<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
50+
<?php the_author_meta( 'description' ); ?>
51+
</div><!-- #author-description -->
52+
</div><!-- #author-info -->
53+
<?php endif; ?>
54+
55+
<?php /* Start the Loop */ ?>
56+
<?php while ( have_posts() ) : the_post(); ?>
57+
58+
<?php
59+
/* Include the Post-Format-specific template for the content.
60+
* If you want to overload this in a child theme then include a file
61+
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
62+
*/
63+
get_template_part( 'content', get_post_format() );
64+
?>
65+
66+
<?php endwhile; ?>
67+
68+
<?php twentyeleven_content_nav( 'nav-below' ); ?>
69+
70+
<?php else : ?>
71+
72+
<article id="post-0" class="post no-results not-found">
73+
<header class="entry-header">
74+
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
75+
</header><!-- .entry-header -->
76+
77+
<div class="entry-content">
78+
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
79+
<?php get_search_form(); ?>
80+
</div><!-- .entry-content -->
81+
</article><!-- #post-0 -->
82+
83+
<?php endif; ?>
84+
85+
</div><!-- #content -->
86+
</section><!-- #primary -->
87+
88+
<?php get_sidebar(); ?>
89+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)