Skip to content

Mismatch between documentation and implementation of $kirby->apply() parameters #2507

@sebastiantiede

Description

@sebastiantiede

Issue with Reference
The parameters in the documentation do not match the actual implementation.

Reference page:
https://getkirby.com/docs/reference/objects/cms/app/apply

Source code:
https://github.com/getkirby/kirby/blob/5.1.3/src/Cms/App.php#L232

Because of the additional $args parameter, it (as far as I understand) is currently not possible to freely manipulate variables.
For example, I would like to give users of my plugin the ability to customize complex text content individually, which does not work with the function signature as currently implemented.

Actual
Documentation:

string $name,
string|null $modify = null

Implementation:

string $name,
array $args,
string|null $modify = null

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions