awesomemotive / all-in-one-seo-pack

All in One SEO plugin for WordPress SEO
https://aioseo.com
339 stars 155 forks source link

Change define constants Name and Version with file data #3007

Closed EkoJR closed 4 years ago

EkoJR commented 5 years ago

Issue #2926

Proposed changes

Refactors how constants AIOSEOP_VERSION & AIOSEOP_PLUGIN_NAME are defined by using a WP function get_file_data() to retrieve plugin details from the file header.

This would eliminate having to edit the version number in more than one area, and isolates changes to the file header.

Types of changes

What types of changes does your code introduce?

Checklist

Testing instructions

Areas to check version number (& plugin name).

Further comments

AIOSEOP_PLUGIN_NAME was included since data was already available and eliminates having to conditionally define the constant.

arnaudbroes commented 4 years ago

This is good and can be code reviewed.

I've done a code review as well and it looks good. One comment for @EkoJR is that this should be moved to the Core class https://github.com/semperfiwebdesign/all-in-one-seo-pack/pull/3045 introduces as soon as this is merged.