Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
migrate header background image, if default
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwach committed Nov 7, 2012
1 parent 5c4b57f commit b28c6a1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions commentpress-core/class_commentpress_db.php
Expand Up @@ -4091,6 +4091,22 @@ function _options_migrate() {

// migrate Theme Mods
$theme_mods = get_option( 'theme_mods_commentpress' );

// get header background image...
if ( isset( $theme_mods['header_image'] ) ) {

// is it a Commentpress one?
if ( strstr( $theme_mods['header_image'], 'style/images/header/caves.jpg' ) !== false ) {

// point it at the equivalent new version
$theme_mods['header_image'] = COMMENTPRESS_PLUGIN_URL.
'themes/commentpress-theme'.
'/assets/images/header/caves-green.jpg';

}

}

update_option( 'theme_mods_commentpress-theme', $theme_mods );

// override widgets
Expand Down
2 changes: 1 addition & 1 deletion commentpress-core/class_commentpress_parser.php
Expand Up @@ -1418,7 +1418,7 @@ function _has_comment_block_quicktag( $content ) {


// look for < !--commentblock--> comment
if ( strstr( $content, '<!--commentblock-->' ) ) {
if ( strstr( $content, '<!--commentblock-->' ) !== false ) {

// yep
$return = true;
Expand Down

0 comments on commit b28c6a1

Please sign in to comment.