Add missing brackets to custom field shortcodes [MAILPOET-1013]
This commit is contained in:
@ -118,7 +118,7 @@ class ShortcodesHelper {
|
|||||||
return array_map(function ($custom_field) {
|
return array_map(function ($custom_field) {
|
||||||
return array(
|
return array(
|
||||||
'text' => $custom_field->name,
|
'text' => $custom_field->name,
|
||||||
'shortcode' => 'subscriber:cf_' . $custom_field->id
|
'shortcode' => '[subscriber:cf_' . $custom_field->id . ']'
|
||||||
);
|
);
|
||||||
}, $custom_fields);
|
}, $custom_fields);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class ShortcodesHelperTest extends MailPoetTest {
|
|||||||
$custom_subscriber_shortcode = end($shortcodes['Subscriber']);
|
$custom_subscriber_shortcode = end($shortcodes['Subscriber']);
|
||||||
expect($custom_subscriber_shortcode['text'])->equals($custom_field->name);
|
expect($custom_subscriber_shortcode['text'])->equals($custom_field->name);
|
||||||
expect($custom_subscriber_shortcode['shortcode'])
|
expect($custom_subscriber_shortcode['shortcode'])
|
||||||
->equals('subscriber:cf_' . $custom_field->id);
|
->equals('[subscriber:cf_' . $custom_field->id . ']');
|
||||||
}
|
}
|
||||||
|
|
||||||
function _after() {
|
function _after() {
|
||||||
|
Reference in New Issue
Block a user