Make WordPress Core

Opened 10 years ago

Closed 5 years 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's profile 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
10 years ago

  • Keywords needs-patch added

#2 @pento
5 years 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.