Skip to content

Align alphlisting_styles callback with three-arg filter #31

@Lin87

Description

@Lin87

The return_styles callback now only accepts $styles, but the hook above still registers it with accepted_args = 3 and Query::get_customized_column_styles continues to call apply_filters('alphalisting_styles', '', $this, $this->instance_id) with three arguments. Under PHP 8 this produces a TypeError (“3 passed and exactly 1 expected”) whenever column styles are rendered, crashing the shortcode/block. The same arity mismatch exists in ColumnWidth::return_styles and Columns::return_styles as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions