diff --git a/.idea/desk-mess-mirrored.iml b/.idea/desk-mess-mirrored.iml
index d424695..f84e954 100644
--- a/.idea/desk-mess-mirrored.iml
+++ b/.idea/desk-mess-mirrored.iml
@@ -1,10 +1,11 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/webResources.xml b/.idea/webResources.xml
index 5f1f94a..8527dba 100644
--- a/.idea/webResources.xml
+++ b/.idea/webResources.xml
@@ -1,15 +1,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 695ad0d..63cf221 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,10 +1,14 @@
-
+
+
+
+
+
@@ -52,12 +56,12 @@
-
-
-
-
+
+
+
+
@@ -94,6 +98,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -128,16 +142,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -151,7 +155,7 @@
-
+
@@ -188,7 +192,21 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -246,6 +264,7 @@
+
C:\Users\ecaissie\AppData\Roaming\Subversion
false
@@ -295,7 +314,11 @@
1339164246364
1339164246364
-
+
+ 1339510511357
+ 1339510511357
+
+
@@ -322,23 +345,23 @@
-
+
-
-
+
-
-
-
+
+
+
+
+
-
@@ -383,7 +406,7 @@
-
+
@@ -396,7 +419,6 @@
-
@@ -421,16 +443,12 @@
+
-
-
-
-
-
@@ -451,39 +469,45 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
-
+
-
+
+
+
+
+
@@ -491,21 +515,30 @@
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/changelog.txt b/changelog.txt
index 7079780..444fa53 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,14 +1,16 @@
=== Desk Mess Mirrored ===
== Version 2.0.3 ==
-Changelog: June 12, 2012
+Changelog: July 5, 2012
= Code =
* Added conditional check for custom post types
* Added `dmm_scripts_and_styles` to enqueue additional scripts and styles such as menu animation
+* Refactor `dmm_modified_post` to add link to modified author posts if they exist
* Refactor `dmm_wp_title` to more correctly use filter while maintaining backward-compatibility
* Updated `custom-background` parameters to use default image and color
= CSS =
* Added 'extra.css' for menu animation (`add_action` call to enqueue this file has been commented out)
+* Add jetpack class to HTML body tag if plugin is active
* Adjusted #content left margin
* Adjusted menu link padding
* Corrected issue with comments meta showing list bullet
@@ -17,11 +19,11 @@ Changelog: June 12, 2012
* Replaced deprecated `add_custom_background`
= Internet Browsers Reviewed =
-* Apple Safari v5.1.2 -x
-* Firefox v10.0.1 -x
-* Google Chrome v17.0 -x
-* Internet Explorer v9.0 -x
-* Opera v11.61 -x
+* Apple Safari v5.1.7
+* Firefox v13.0.1
+* Google Chrome v20.0
+* Internet Explorer v9.0
+* Opera v12.0
/** ------------------------------------------------------------------------- */
diff --git a/functions.php b/functions.php
index 5f14515..345cad1 100644
--- a/functions.php
+++ b/functions.php
@@ -14,10 +14,12 @@
* @author Edward Caissie
* @copyright Copyright (c) 2009-2012, Edward Caissie
*
- * Last revised May 24, 2012
* @version 2.0.3
+ * @date July 5, 2012
* Address functions deprecated at WordPress 3.4-beta1
- * @todo Remove backward compatibility code as appropriate
+ * Miscellaneous code structure updates
+ *
+ * @todo Remove backward compatibility code as appropriate ... scheduled for WordPress 3.5
*/
/**
@@ -38,9 +40,9 @@
*/
if ( ! function_exists( 'dmm_enqueue_comment_reply' ) ) {
function dmm_enqueue_comment_reply() {
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
- wp_enqueue_script( 'comment-reply' );
- }
+ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
+ wp_enqueue_script( 'comment-reply' );
+ }
}
}
add_action( 'wp_enqueue_scripts', 'dmm_enqueue_comment_reply' );
@@ -86,22 +88,22 @@ function dmm_scripts_and_styles() {
* @todo Remove once all (client) Child-Themes have been updated / advised of change
*/
function dmm_wp_title() {
- global $page, $paged;
- // Default title
- $dmm_title_text = wp_title( '|', false, 'right' ) . get_bloginfo( 'name' );
-
- // Add the blog description (tagline) for the home/front page.
- $site_tagline = get_bloginfo( 'description', 'display' );
- if ( $site_tagline && ( is_home() || is_front_page() ) )
- $dmm_title_text .= " | $site_tagline";
-
- // Add a page number if necessary:
- if ( $paged >= 2 || $page >= 2 )
- $dmm_title_text .= ' | ' . sprintf( __( 'Page %s', 'desk-mess-mirrored' ), max( $paged, $page ) );
-
- // Use `apply_filters` on `wp_title` and echo
- $dmm_wp_title = apply_filters( 'wp_title', $dmm_title_text );
- echo $dmm_wp_title;
+ global $page, $paged;
+ // Default title
+ $dmm_title_text = wp_title( '|', false, 'right' ) . get_bloginfo( 'name' );
+
+ // Add the blog description (tagline) for the home/front page.
+ $site_tagline = get_bloginfo( 'description', 'display' );
+ if ( $site_tagline && ( is_home() || is_front_page() ) )
+ $dmm_title_text .= " | $site_tagline";
+
+ // Add a page number if necessary:
+ if ( $paged >= 2 || $page >= 2 )
+ $dmm_title_text .= ' | ' . sprintf( __( 'Page %s', 'desk-mess-mirrored' ), max( $paged, $page ) );
+
+ // Use `apply_filters` on `wp_title` and echo
+ $dmm_wp_title = apply_filters( 'wp_title', $dmm_title_text );
+ echo $dmm_wp_title;
}
} else {
/**
@@ -180,11 +182,11 @@ function dmm_wp_title( $old_title, $sep, $sep_location ) {
* @return string
*/
function dmm_widget_title( $title ) {
- if ( '' == $title ) {
- return ' ';
- } else {
- return $title;
- }
+ if ( '' == $title ) {
+ return ' ';
+ } else {
+ return $title;
+ }
}
add_filter( 'widget_title', 'dmm_widget_title', 10, 1 );
// DMM Widget Title
@@ -211,64 +213,64 @@ function dmm_widget_title( $title ) {
*/
if ( ! function_exists( 'dmm_dynamic_copyright' ) ) {
function dmm_dynamic_copyright( $args = '' ) {
- $initialize_values = array( 'start' => '', 'copy_years' => '', 'url' => '', 'end' => '' );
- $args = wp_parse_args( $args, $initialize_values );
-
- /* Initialize the output variable to empty */
- $output = '';
-
- /**
- * Start common copyright notice
- * @example Copyright
- */
- empty( $args['start'] ) ? $output .= sprintf( __( 'Copyright', 'desk-mess-mirrored' ) ) : $output .= $args['start'];
-
- /**
- * Calculate Copyright Years; and, prefix with Copyright Symbol
- * @example © 2009-2011
- */
- if ( empty( $args['copy_years'] ) ) {
- /** Get all posts */
- $all_posts = get_posts( 'post_status=publish&order=ASC' );
- /** Get first post */
- $first_post = $all_posts[0];
- /** Get date of first post */
- $first_date = $first_post->post_date_gmt;
-
- /** First post year versus current year */
- $first_year = substr( $first_date, 0, 4 );
- if ( $first_year == '' ) {
- $first_year = date( 'Y' );
- }
+ $initialize_values = array( 'start' => '', 'copy_years' => '', 'url' => '', 'end' => '' );
+ $args = wp_parse_args( $args, $initialize_values );
- /** Add to output string */
- if ( $first_year == date( 'Y' ) ) {
- /** Only use current year if no posts in previous years */
- $output .= ' © ' . date( 'Y' );
- } else {
- $output .= ' © ' . $first_year . "-" . date( 'Y' );
- }
+ /* Initialize the output variable to empty */
+ $output = '';
+
+ /**
+ * Start common copyright notice
+ * @example Copyright
+ */
+ empty( $args['start'] ) ? $output .= sprintf( __( 'Copyright', 'desk-mess-mirrored' ) ) : $output .= $args['start'];
+
+ /**
+ * Calculate Copyright Years; and, prefix with Copyright Symbol
+ * @example © 2009-2011
+ */
+ if ( empty( $args['copy_years'] ) ) {
+ /** Get all posts */
+ $all_posts = get_posts( 'post_status=publish&order=ASC' );
+ /** Get first post */
+ $first_post = $all_posts[0];
+ /** Get date of first post */
+ $first_date = $first_post->post_date_gmt;
+
+ /** First post year versus current year */
+ $first_year = substr( $first_date, 0, 4 );
+ if ( $first_year == '' ) {
+ $first_year = date( 'Y' );
+ }
+
+ /** Add to output string */
+ if ( $first_year == date( 'Y' ) ) {
+ /** Only use current year if no posts in previous years */
+ $output .= ' © ' . date( 'Y' );
} else {
- $output .= ' © ' . $args['copy_years'];
+ $output .= ' © ' . $first_year . "-" . date( 'Y' );
}
+ } else {
+ $output .= ' © ' . $args['copy_years'];
+ }
- /**
- * Create URL to link back to home of website using the site name for the anchor text
- * @example Your Blog Name
- */
- empty( $args['url'] ) ? $output .= ' ' . get_bloginfo( 'name', 'display' ) .' ' : $output .= ' ' . $args['url'];
+ /**
+ * Create URL to link back to home of website using the site name for the anchor text
+ * @example Your Blog Name
+ */
+ empty( $args['url'] ) ? $output .= ' ' . get_bloginfo( 'name', 'display' ) .' ' : $output .= ' ' . $args['url'];
- /**
- * End common copyright notice
- * @example All rights reserved.
- */
- empty( $args['end'] ) ? $output .= ' ' . sprintf( __( 'All rights reserved.', 'desk-mess-mirrored' ) ) : $output .= ' ' . $args['end'];
+ /**
+ * End common copyright notice
+ * @example All rights reserved.
+ */
+ empty( $args['end'] ) ? $output .= ' ' . sprintf( __( 'All rights reserved.', 'desk-mess-mirrored' ) ) : $output .= ' ' . $args['end'];
- /** Display the copyright notice */
- $output = sprintf( __( ' %1$s ', 'desk-mess-mirrored' ), $output );
- $output = apply_filters( 'dmm_dynamic_copyright', $output, $args );
+ /** Display the copyright notice */
+ $output = sprintf( __( ' %1$s ', 'desk-mess-mirrored' ), $output );
+ $output = apply_filters( 'dmm_dynamic_copyright', $output, $args );
- echo $output;
+ echo $output;
}
}
// End DMM Dynamic Copyright
@@ -285,7 +287,7 @@ function dmm_dynamic_copyright( $args = '' ) {
* Last revised April 6, 2012
* @version 2.0.3
* Replaced deprecated `get_theme_data` at WordPress version 3.4-beta1
- * @todo At the appropriate time remove the backward compatibility conditional ...
+ * @todo At the appropriate time remove the backward compatibility conditional ... scheduled for WordPress 3.5
*/
if ( ! function_exists( 'dmm_theme_version' ) ) {
function dmm_theme_version () {
@@ -331,11 +333,11 @@ function dmm_theme_version () {
* Tell WordPress to run desk_mess_mirrored_setup() when the 'after_setup_theme'
* hook is run.
*
- * @package Desk_Mess_Mirrored
- * @since 1.5
+ * @package Desk_Mess_Mirrored
+ * @since 1.5
*
- * Last revised December 2, 2011
- * @version 2.0
+ * @version 2.0.3
+ * @date July, 5, 2012
* See additional documentation within function for specific changes
*/
if ( ! function_exists( 'desk_mess_mirrored_setup' ) ) {
@@ -350,14 +352,16 @@ function desk_mess_mirrored_setup(){
/**
* This theme allows users to set a custom background
- * @todo Remove backward compatibility code
+ * NB: Child-Themes will need to over-load this functionality to use a
+ * different default background image.
+ * @todo Remove backward compatibility code ... scheduled for WordPress 3.5
*/
if ( version_compare( $wp_version, "3.4-alpha", "<" ) ) {
add_custom_background();
} else {
add_theme_support( 'custom-background' , array(
'default-color' => '848484',
- 'default-image' => get_stylesheet_directory_uri() . '/images/marble-bg.png'
+ 'default-image' => get_template_directory_uri() . '/images/marble-bg.png'
) );
}
@@ -375,13 +379,13 @@ function desk_mess_mirrored_setup(){
*/
if ( !function_exists( 'dmm_aside_glyph' ) ) {
function dmm_aside_glyph() {
- $dmm_no_title = get_the_title();
- $aside_glyph = '';
- empty( $dmm_no_title )
- ? $aside_glyph .= '' . __( '*', 'desk-mess-mirrored' ) /** default: asterisk */ . ' '
- : $aside_glyph .= __( '*', 'desk-mess-mirrored' ); /** default: asterisk */
- $aside_glyph .= ' ';
- echo apply_filters( 'dmm_aside_glyph', $aside_glyph );
+ $dmm_no_title = get_the_title();
+ $aside_glyph = '';
+ empty( $dmm_no_title )
+ ? $aside_glyph .= '' . __( '*', 'desk-mess-mirrored' ) /** default: asterisk */ . ' '
+ : $aside_glyph .= __( '*', 'desk-mess-mirrored' ); /** default: asterisk */
+ $aside_glyph .= ' ';
+ echo apply_filters( 'dmm_aside_glyph', $aside_glyph );
}
}
@@ -396,13 +400,13 @@ function dmm_aside_glyph() {
*/
if ( !function_exists( 'dmm_quote_glyph' ) ) {
function dmm_quote_glyph() {
- $dmm_no_title = get_the_title();
- $quote_glyph = '';
- empty( $dmm_no_title )
- ? $quote_glyph .= '' . __( '"', 'desk-mess-mirrored' ) /** default: double-quote */ . ' '
- : $quote_glyph .= __( '"', 'desk-mess-mirrored' ); /** default: double-quote */
- $quote_glyph .= ' ';
- echo apply_filters( 'dmm_quote_glyph', $quote_glyph );
+ $dmm_no_title = get_the_title();
+ $quote_glyph = '';
+ empty( $dmm_no_title )
+ ? $quote_glyph .= '' . __( '"', 'desk-mess-mirrored' ) /** default: double-quote */ . ' '
+ : $quote_glyph .= __( '"', 'desk-mess-mirrored' ); /** default: double-quote */
+ $quote_glyph .= ' ';
+ echo apply_filters( 'dmm_quote_glyph', $quote_glyph );
}
}
@@ -417,13 +421,13 @@ function dmm_quote_glyph() {
*/
if ( !function_exists( 'dmm_status_glyph' ) ) {
function dmm_status_glyph() {
- $dmm_no_title = get_the_title();
- $status_glyph = '';
- empty( $dmm_no_title )
- ? $status_glyph .= '' . __( '@', 'desk-mess-mirrored' ) /** default: at symbol */ . ' '
- : $status_glyph .= __( '@', 'desk-mess-mirrored' ); /** default: at symbol */
- $status_glyph .= ' ';
- echo apply_filters( 'dmm_status_glyph', $status_glyph );
+ $dmm_no_title = get_the_title();
+ $status_glyph = '';
+ empty( $dmm_no_title )
+ ? $status_glyph .= '' . __( '@', 'desk-mess-mirrored' ) /** default: at symbol */ . ' '
+ : $status_glyph .= __( '@', 'desk-mess-mirrored' ); /** default: at symbol */
+ $status_glyph .= ' ';
+ echo apply_filters( 'dmm_status_glyph', $status_glyph );
}
}
// End Add post-formats support
@@ -440,20 +444,20 @@ function dmm_status_glyph() {
*/
if ( ! function_exists( 'dmm_nav_menu' ) ) {
function dmm_nav_menu() {
- if ( function_exists( 'wp_nav_menu' ) ) {
- wp_nav_menu( array(
- 'menu_class' => 'nav-menu',
- 'theme_location' => 'top-menu',
- 'fallback_cb' => 'dmm_list_pages'
- ) );
- } else {
- dmm_list_pages();
- }
+ if ( function_exists( 'wp_nav_menu' ) ) {
+ wp_nav_menu( array(
+ 'menu_class' => 'nav-menu',
+ 'theme_location' => 'top-menu',
+ 'fallback_cb' => 'dmm_list_pages'
+ ) );
+ } else {
+ dmm_list_pages();
+ }
}
}
if ( ! function_exists( 'dmm_list_pages' ) ) {
function dmm_list_pages() { ?>
-
+
*/
if ( ! function_exists( 'dmm_use_posted' ) ) {
function dmm_use_posted() {
- $dmm_no_title = get_the_title();
- empty( $dmm_no_title )
- ? $dmm_no_title = '' . __( 'Posted', 'desk-mess-mirrored' ) . ' '
- : $dmm_no_title = __( 'Posted', 'desk-mess-mirrored' );
- $dmm_no_title = apply_filters( 'dmm_use_posted', $dmm_no_title );
- return $dmm_no_title;
+ $dmm_no_title = get_the_title();
+ empty( $dmm_no_title )
+ ? $dmm_no_title = '' . __( 'Posted', 'desk-mess-mirrored' ) . ' '
+ : $dmm_no_title = __( 'Posted', 'desk-mess-mirrored' );
+ $dmm_no_title = apply_filters( 'dmm_use_posted', $dmm_no_title );
+ return $dmm_no_title;
}
}
// End: DMM Use Posted
@@ -518,20 +522,43 @@ function dmm_use_posted() {
*
* @internal used in 'desk-mess-mirrored-status'
*
- * Last modified December 6, 2011
- * @version 2.0
- * Renamed `BNS Modified Post` to `DMM Modified Post`
- * @todo Test if `modified author` is the same as the post author
- * @todo If modified author exists link to their archive; else return Bio || nothing?
- * @todo If using author bio from above, slide out/down to show; see BNS Bio plugin (WIP)
+ * @version 2.0.3
+ * @date July 5, 2012
+ * If modified author exists link to their archive.
* @todo Add parameters and use `apply_filters` on output
* @todo Implement in other template files, such as, single and page?
*/
if ( ! function_exists( 'dmm_modified_post' ) ) {
function dmm_modified_post(){
+ global $post;
+
+ /** @var $last_user - establish the last user */
+ $last_user = '';
+ if ( $last_id = get_post_meta( $post->ID, '_edit_last', true ) ) {
+ $last_user = get_userdata( $last_id );
+ }
+
+ /**
+ * @var $line_height - set value for use with `get_avatar`
+ * @todo Review if this can be set programmatically
+ */
+ $line_height = 16;
+
+ /** @var string $mod_author_phrase - create the "mod_author_phrase" */
+ $mod_author_phrase = ' ';
+ /** Check last_user ID exists in database. */
+ if ( ! empty( $last_user ) ) {
+ $mod_author_phrase .= __( 'Last modified by %1$s %2$s on %3$s at %4$s.', 'desk-mess-mirrored' );
+ $mod_author_avatar = get_avatar( $last_user->user_email, $line_height );
+
if ( get_the_date() <> get_the_modified_date() ) {
- printf( __( 'Last modified by %1$s on %2$s. ', 'desk-mess-mirrored' ), get_the_modified_author(), get_the_modified_date() );
+ printf( '' . $mod_author_phrase . ' ',
+ $mod_author_avatar,
+ '' . $last_user->display_name . ' ',
+ get_the_modified_date( get_option( 'date_format' ) ),
+ get_the_modified_time( get_option( 'time_format' ) ) );
}
+ }
}
}
// End BNS Modified Post
@@ -558,6 +585,10 @@ function dmm_modified_post(){
* @internal Conditional check for BNS Body Classes plugin is made before function is called
*
* @return array - $classes, an array of classes to be added to `body_class`
+ *
+ * @version 2.0.3
+ * @date July 5, 2012
+ * Add jetpack class to HTML body tag if plugin is active
*/
if ( ! function_exists( 'bns_body_classes' ) ) {
add_filter( 'body_class', 'dmm_add_body_classes' );
@@ -571,12 +602,15 @@ function dmm_add_body_classes( $classes ) {
$classes[] = 'theme-' . sanitize_html_class( get_option( 'template' ) );
$classes = apply_filters( 'dmm_add_body_classes', $classes );
+ /**
+ * Since the Jetpack plugin can cause numerous issues with display, add
+ * an explicit class to the body tag for reference and style needs.
+ */
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active( 'jetpack/jetpack.php' ) ) {
$classes[]='jetpack';
}
-
return $classes;
}
}
\ No newline at end of file
diff --git a/header.php b/header.php
index 6c6fac3..ab4a1a4 100644
--- a/header.php
+++ b/header.php
@@ -23,7 +23,7 @@
?>
- get('Version') < '2.1' ) ? dmm_wp_title() : wp_title( '|', true, 'right' ); ?>
+ get( 'Version' ) < '2.1' ) ? dmm_wp_title() : wp_title( '|', true, 'right' ); ?>
diff --git a/index.php b/index.php
index 9b95538..6c50ec7 100644
--- a/index.php
+++ b/index.php
@@ -52,13 +52,10 @@
* @todo Add more i18n support, for example: create and include a current '.pot' file
* @todo Review menu issues with bbPress?! see BNS comment: http://buynowshop.com/themes/desk-mess-mirrored/comment-page-3/#comment-12440
* @todo Review About box in the 'author.php' template
- * @todo Review and update browser version compatibility
- * @todo Add enqueued stylesheet to animate menu items (commented out by default to preserve Child-Theme compatibilities)
*
* @version 2.0.3
- * @date May 24, 2012
- * Refactor `dmm_wp_title` to more correctly use filter while maintaining backward-compatibility
- * Added 'wip' folder for works-in-progress and demonstration code
+ * @date July 5, 2012
+ * see changelog.txt for details of theme updates / modifications
*/
?>
@@ -82,4 +79,4 @@
-
\ No newline at end of file
+Please read the included changelog.txt, readme.txt, and support.txt files for details of the latest changes and important notices. Please note WordPress 3.4 is required for some functionality; also note the latest version of the Multi Child-Theme is available for download at http://buynowshop.com/themes/desk-mess-mirrored/multi too!
-Version: 2.0.3-beta
+Version: 2.0.3-RC1
Author: Edward Caissie
Author URI: http://edwardcaissie.com/
-Version Required: 3.4-beta1
+Version Required: 3.4
Version Tested Up To: 3.4
Tags: brown, orange, silver, tan, light, two-columns, right-sidebar, fixed-width, threaded-comments, sticky-post, custom-menu, custom-background
License: GNU General Public License v2