WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 22 months ago

#28972 closed enhancement (duplicate)

enhance make_clickable so that it allows for anchor attributes to be passed via an extra array argument.

Reported by: dwainm Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: Formatting Keywords:
Focuses: template Cc:

Description

When using make_clickable it is useful to pass in the extra anchor attributes to be included in the function call.

One can call the function like this if you need to include anchor tag attributes

$attributes = array(
    'target' => '_blank',
    'class' => 'external', 
);

make_clickable(  $text  , $attributes  ) ;

Change History (2)

#1 @dwainm
6 years ago

  • Keywords needs-patch added

#2 @pento
22 months ago

  • Keywords needs-patch removed
  • Resolution set to duplicate
  • Status changed from new to closed

Closing this as a duplicate of #32787, which has more discussion.

Note: See TracTickets for help on using tickets.