From 82f730aacd846fc5af9e6101803fcdcfd77c194b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 15 Oct 2012 13:36:32 -0400 Subject: [PATCH 1/7] Let sites regenerate rewrite rules after install. see #44. --- install.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install.php b/install.php index 9a1fb0aa..4ef3462e 100644 --- a/install.php +++ b/install.php @@ -71,8 +71,6 @@ function jquery_install_site( $site, $user ) { $default_options = jquery_default_site_options(); $default_options['admin_email'] = $user->user_email; - var_dump( $domain, $path, $site ); - if ( 1 !== $details['blog_id'] ) { $blog_id = insert_blog( JQUERY_STAGING_PREFIX . $domain, $path, 1 ); if ( $blog_id != $details['blog_id'] ) @@ -89,6 +87,6 @@ function jquery_install_site( $site, $user ) { foreach ( $options as $option => $value ) update_option( $option, $value ); - flush_rewrite_rules(); + delete_option( 'rewrite_rules' ); restore_current_blog(); } From eeea283241b257ecd7672a2c77bebb1162098631 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 15 Oct 2012 13:36:54 -0400 Subject: [PATCH 2/7] Don't run the ms site check during install. --- sunrise.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sunrise.php b/sunrise.php index b684bbac..1fe1079e 100644 --- a/sunrise.php +++ b/sunrise.php @@ -12,6 +12,8 @@ $current_blog->blog_id = $current_blog->site_id = $current_blog->public = 1; $current_blog->archived = $current_blog->deleted = $current_blog->spam = 0; + add_filter( 'ms_site_check', '__return_true' ); + if ( ! defined( 'WP_INSTALLING' ) ) { // Okay, see if we can find the main site in the DB. // If not, time for a new network install. From eefcbb00030448d1395d3f333fd9d1dfdd045cd1 Mon Sep 17 00:00:00 2001 From: Ron Rudy Date: Mon, 15 Oct 2012 16:30:32 -0300 Subject: [PATCH 3/7] Update README.md Updated to ensure overrides are enabled for entry --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 5227dfa2..d76fbe5e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ This is a set of plugins, themes, and configuration files for jQuery's website i ServerName dev.jquery.com ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com DocumentRoot "/srv/www/jquery" + + Options All + AllowOverride All + Order allow,deny + Allow from all + ``` From aa2e690a03b311bf78627b5e7e1a3316fdbc774c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 15 Oct 2012 16:01:32 -0400 Subject: [PATCH 4/7] Allow a post custom field of body_class (separated by spaces) to inject classes into the body element. --- mu-plugins/jquery-filters.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mu-plugins/jquery-filters.php b/mu-plugins/jquery-filters.php index 80ddb693..a295f52e 100644 --- a/mu-plugins/jquery-filters.php +++ b/mu-plugins/jquery-filters.php @@ -59,3 +59,12 @@ function jquery_unfiltered_html_for_term_descriptions() { // Bypass multisite checks. add_filter( 'ms_site_check', '__return_true' ); + +// Add body classes found in postmeta. +add_filter( 'body_class', function( $classes ) { + if ( ! is_singular() ) + return $classes; + if ( ! $post_classes = get_post_meta( get_queried_object_id(), 'body_class', true ) ) + return $classes; + return array_merge( $classes, explode( ' ', $post_classes ) ); +}); From 0d81286181feffdab07ecfbb1601e53f5aa65143 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 15 Oct 2012 16:59:51 -0400 Subject: [PATCH 5/7] Add page-slug-$slug body classes. --- mu-plugins/jquery-filters.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mu-plugins/jquery-filters.php b/mu-plugins/jquery-filters.php index a295f52e..724d27c4 100644 --- a/mu-plugins/jquery-filters.php +++ b/mu-plugins/jquery-filters.php @@ -64,7 +64,9 @@ function jquery_unfiltered_html_for_term_descriptions() { add_filter( 'body_class', function( $classes ) { if ( ! is_singular() ) return $classes; - if ( ! $post_classes = get_post_meta( get_queried_object_id(), 'body_class', true ) ) - return $classes; - return array_merge( $classes, explode( ' ', $post_classes ) ); + if ( is_page() ) + $classes[] = 'page-slug-' . sanitize_html_class( strtolower( get_queried_object()->post_name ) ); + if ( $post_classes = get_post_meta( get_queried_object_id(), 'body_class', true ) ) + $classes = array_merge( $classes, explode( ' ', $post_classes ) ); + return $classes; }); From a08bbae5dcba66e4d1e3216a2d7721823d97279e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 15 Oct 2012 17:40:12 -0400 Subject: [PATCH 6/7] Add shim for querying by menu_order for <= version 3.4. --- mu-plugins/wordpress-shims.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mu-plugins/wordpress-shims.php diff --git a/mu-plugins/wordpress-shims.php b/mu-plugins/wordpress-shims.php new file mode 100644 index 00000000..52492566 --- /dev/null +++ b/mu-plugins/wordpress-shims.php @@ -0,0 +1,15 @@ +get( 'menu_order' ) ) ) + $where .= " AND $wpdb->posts.menu_order = " . $menu_order; + return $where; + }, 10, 2 ); +endif; \ No newline at end of file From cf0748237108acc3c659bd532bcf9f4b0b38a606 Mon Sep 17 00:00:00 2001 From: Eddie Monge Date: Tue, 16 Oct 2012 13:26:21 -0400 Subject: [PATCH 7/7] Fixes #94: Update the sidebar styling to differentiate the active style --- themes/jquery/css/base.css | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/themes/jquery/css/base.css b/themes/jquery/css/base.css index 8cb1c789..7843ccbd 100644 --- a/themes/jquery/css/base.css +++ b/themes/jquery/css/base.css @@ -2182,7 +2182,7 @@ nav .searchform .icon-search { #container #body #sidebar { width: 20.5%; position: relative; - background: #eeeeee; + background: #f4f4f4; height: 100%; padding: 0 1.5% 0; /* margin-bottom: -10000px; @@ -2360,7 +2360,6 @@ html.jquery-learning { background: #000 url(../i/learning_bg.jpg) no-repeat cent #sidebar aside > ul li { list-style: none; - border-bottom: 1px solid #c5c5c5; -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.25); box-shadow: 0 1px 0 rgba(255,255,255,0.25); padding: 0; @@ -2394,16 +2393,21 @@ html.jquery-learning { background: #000 url(../i/learning_bg.jpg) no-repeat cent } #sidebar aside > ul li a { + border-bottom: 1px solid #c5c5c5; font-weight: bold; color: #3f3f3f; text-shadow: 0 1px 0 rgba(255,255,255,1); font-size: 13px; text-decoration: none; - width: 100%; display: block; - width: 96%; + width: 95%; padding: 5% 10%; - margin: -1px 0 0 -8%; + margin: 0 0 0 -8%; +} + +#sidebar aside > ul a:hover { + background: #e9e9e9; + font-weight: bold; } #sidebar aside > ul a:active { @@ -2427,17 +2431,20 @@ html.jquery-learning { background: #000 url(../i/learning_bg.jpg) no-repeat cent #container #sidebar .current-cat-parent ul a, #container #sidebar .current-cat ul.children a { padding-left: 25%; - width: 75% + width: 80% } -#sidebar aside > ul li.current-cat li { - border-bottom: 1px solid #c5c5c5; + +#sidebar aside > ul li.current-cat-parent a, +#sidebar aside > ul li.current-cat a { + background: #e6e6e6; + color: #666666; } + #sidebar aside > ul li.current-cat > a { - color: #000; + color: #111; } - /*******************************************************************************/ /* Pagination /*******************************************************************************/