Ticket #7947 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 3 years ago

Wrong "icon_dir" action

Reported by: jmini Owned by: anonymous
Priority: normal Milestone: 2.7
Component: General Version:
Severity: trivial Keywords: icon_dir, icon_dir_uri
Cc:

Description

When I checked for "icon_dir" action I figure out there are 2 action :

  • icon_dir : absolut path to the icon set directory
  • icon_dir_uri : uri to the icon set directory

(see a good example at lines 2612 and 2613 in  wp-includes/post.php)

In file  wp-includes/media.php on line 507 the wrong of this 2 actions is called. It should be icon_dir_uri instead of icon_dir in order to keep it logical:

$icon_dir = apply_filters( 'icon_dir_uri', includes_url('images/crystal') );

Otherwise if you want to hook icon_dir, you have to check if you are dealing with a path or a uri.

Change History

comment:1   ryan3 years ago

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

(In [9280]) icon_dir_uri filter instead of icon_dir. Props jmini. fixes #7947

  • Milestone changed from 2.8 to 2.7
Note: See TracTickets for help on using tickets.