Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

#4098 closed defect (bug) (fixed)

WP 3.4 deprecated theme functions

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.6 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

WP 3.4 deprecates several items currently in use by BP:

  • Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( 'custom-background', $args ) instead. in /sites/ciab/wp-includes/functions.php on line 2708
  • Notice: add_custom_image_header is deprecated since version 3.4! Use add_theme_support( 'custom-header', $args ) instead. in /sites/ciab/wp-includes/functions.php on line 2708
  • get_themes() deprecated by wp_get_themes() during installation wizard

Attachments (5)

deprecated-theme-info.patch (495 bytes) - added by chrisclayton 13 years ago.
The deprecated theme info message was getting on my nerves :)
deprecated-fixes.patch (1.3 KB) - added by chrisclayton 13 years ago.
deprecated-fixes-clean.patch (1.3 KB) - added by chrisclayton 13 years ago.
3rd time lucky?
4098.diff (3.9 KB) - added by Mamaduka 13 years ago.
4098.2.diff (3.2 KB) - added by Mamaduka 13 years ago.

Download all attachments as: .zip

Change History (19)

#1 @boonebgorges
13 years ago

Notice: current_theme_info is deprecated since version 3.4! Use wp_get_theme() instead. bp-core-functions.php:242

@chrisclayton
13 years ago

The deprecated theme info message was getting on my nerves :)

@chrisclayton
13 years ago

3rd time lucky?

#2 @boonebgorges
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5978]) Adds support for WP 3.4 theme functions. Fixes #4098

#3 @fanquake
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Looks like a typo might have slipped into [5978]
Line 559 "$installad_themes" should probably be "$installed_themes"

Last edited 13 years ago by fanquake (previous) (diff)

#4 @boonebgorges
13 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [5979]) Adds support for WP 3.4 theme functions. Fixes #4098. Props chrisclayton

#5 @boonebgorges
13 years ago

(In [5980]) Fixes typo from r5978. Antiprops boonebgorges. Props fanquake. See #4098

#6 @boonebgorges
13 years ago

(In [5981]) Fixes incorrect variable name from r5979. See #4098

#7 @johnjamesjacoby
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Still not quite done here. Both $ct and $ct->tags can be empty, which will dump a notice.

Should also do a function_exists() check instead of a version check.

#8 @DJPaul
13 years ago

Also related:

[14-May-2012 21:28:27] PHP Warning: Illegal offset type in /Users/paul/Sites/master/wp-content/plugins/buddypress/bp-core/admin/bp-core-update.php on line 558

During install wizard, non-multisite.

@Mamaduka
13 years ago

#9 @Mamaduka
13 years ago

Updated patch with JJJ's suggestion, also improved custom header implementation, constants should be used for backward-compatibility.

As DJPaul said, $installed_themes[$current_theme] will trigger the warning. Also not sure if installed themes array is needed at all.

This would be enough:

if ( !empty( $current_theme['Screenshot'] ) ) {
	$screenshot = trailingslashit( get_stylesheet_directory_uri() ) . $current_theme;
}


#10 @Mamaduka
13 years ago

  • Keywords has-patch added

#11 follow-up: @DJPaul
13 years ago

  • Keywords needs-patch added; has-patch removed

Had a quick look at 4098.diff -- it uses $custom_background_args when its not set (in the not-3.4 if).

@Mamaduka
13 years ago

#12 in reply to: ↑ 11 @Mamaduka
13 years ago

  • Keywords has-patch added; needs-patch removed

Replying to DJPaul:

Had a quick look at 4098.diff -- it uses $custom_background_args when its not set (in the not-3.4 if).

Sorry for that, quick fix in 4098.2.diff.

#13 @boonebgorges
13 years ago

(In [6094]) Use wp_get_theme() instead of current_theme_info() in bp_core_activation_notice()

current_theme_info() is the pre-WP-3.4 function. This reverts part of r6089.

See #4098

#14 @boonebgorges
13 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

I think we have caught all of these, so I'm closing.

Note: See TracTickets for help on using tickets.