Skip to content

Fix option formatting hook variable interpolation - option_${option_name} #37

@cjg89

Description

@cjg89

Describe the bug

add_filter( 'option_{$option_name}', array( 'UCF_Post_List_Config', 'format_configurable_option' ), 10, 2 );

Our option formatting filters will not work as intended because the option_${option_name} hook is wrapped in single quotes; it must be wrapped in double quotes for variable interpolation to work.

Steps to Reproduce

You'd have to debug this locally to confirm.

Expected Behavior

Ideally, our option formatting filters should actually work.

Possible Fix

Replace single quotes around this hook name with double quotes.

Your environment:

n/a

Additional context

n/a

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions