Skip to content

Fix legacy use of get_terms() #111

@GaryJones

Description

@GaryJones

Prior to WP 4.5 (no longer supported by this plugin), get_terms() function had a signature of get_terms( $taxonomy, $args ). Since then, it is now get_terms( $args ). The second parameter is deprecated, and the taxonomy is found under the $args['taxonomy]` field.

$zones = get_terms( $this->zone_taxonomy, $args );
uses the legacy format of the function call, and generates a warning in WordPressCS. This should be updated to use the modern signature. Tests should ideally be written to ensure that the zone_taxonomy class property is merged into the $args for the get_zones() function in which the get_terms() call is found.

Metadata

Metadata

Assignees

Labels

type: maintenanceRoutine maintenance and code quality improvements

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions