# Changelog

## [Unreleased]
- Add https://secure.gravatar.com to CSP whitelist

## [3.4.4] - 2022-01-12
### [Fixed]
- WP Theme issue that stopped redirects working in WordPress Admin.

## [3.4.3] - 2022-01-10
### [Fixed]
- Changed post type check in Homepage controller from 'posts' to 'post'
- Fixed Exception 'wrong parameters' error when ApiTest fails.

## [3.4.2] - 2022-01-04
### [Fixed]
- NoSuchEntityException caught when viewing invalid author URL.
- Auto theme installation no longer creates a copy of the theme package in the WordPress themes dir (local mode).
- Auto theme installation doesn't delete the old theme if it contains a local.php file. This should stop any old custom
  code from being deleted.
- App\Theme::isInstalled now checks current theme and not just the remote theme hash. This stops the theme being
  enabled and then later disabled and still being reported as being enabled.
- Invalid user URLs now go to noRoute action rather than an error message.
### [Changed]
- WordPress theme now flushes rewrites when updating the theme hash.

## [3.4.1] - 2022-01-04
### [Added]
- MetaDataProvider for Post. This was a virtual class but is now an actual class. This allows for ACF to add plugins.

## [3.3.0] - 2022-01-04
### [Added]
- Added option to POST using REST API.
### [Changed]
- Improved RequestManager error handling

## [3.2.2] - 2022-01-03
### [Changed]
- Error messages for URLs when using Root.
### [Fixed]
- Fixed Option::set when option exists but has a null value.
- Allow br and a tags in comment content.

## [3.2.1] - 2022-01-02
### [Fixed]
- Resizable images when using Multisite in local mode. The correct path for the image is now used.

## [3.2.0] - 2022-01-02
### [Added]
- Added hello WP API method to help with debugging.
- Added wp_redirect protection to WP theme.
- Caching for theme hash generation (file collection).
- Added fishpig:wordpress:set-option console command.
### [Changed]
- Moved logs from var/log/wordpress.log to var/log/wp/error.log. Also added http.log to same location.
- Updated search widget template.
### [Fixed]
- Automatic WP theme update registration when in local mode.

## [3.1.1] - 2021-12-30
### [Changed]
- Removed wrapping HTML tag from wp_footer call in WordPress theme.

## [3.1.0] - 2021-12-30
### [Changed]
- Changed HTTP status exceptions if status !== 200 or 404
- Added UrlModifiers to RequestManager classes

## [3.0.34] - 2021-12-25
### [Fixed]
- Compilation error: "Class FishPig\WordPress\App\HTTP\Throwable does not exist"

## [3.0.33] - 2021-12-24
### [Added]
- Checks for HTTP auth and displays a message indicating HTTP auth failure. In a future version you will be able to 
  specify HTTP auth details in the Admin. For now, just ensure Magento and WP use the same HTTP auth details and
  these will be shared with the WP API automatically.

## [3.0.32] - 2021-12-23
### [Changed]
- Changed \Magento\Framework\Filesystem\DriverInterface to \Magento\Framework\Filesystem and get individual directories
  from there.
  
## [3.0.30] - 2021-12-22
### [Changed]
- Code formatting clean up.

## [3.0.29] - 2021-12-21
### [Fixed]
- ResourceConnection checks getConnection() before calling isConnection.

## [3.0.28] - 2021-12-21
### [Fixed]
- Issue in includes/previews.php in the WP theme when preview_id wasn't passed in the URL

## [3.0.27] - 2021-12-21
### [Fixed]
- Module can now be disabled properly on a per store basis.

## [3.0.26] - 2021-12-21
### [Added]
- Better exception messages when the API connection fails.

## [3.0.23] - 2021-12-20
### [Added]
- Added API check to integration tests.

## [3.0.22] - 2021-12-20
### [Fixed]
- Fixed 'Undefined variable: redirectUrl in Plugin/Magento/Store/Block/SwitcherPlugin.php' notice.

## [3.0.21] - 2021-12-20
### [Added]
- API request logger now include current URL for each log. This will help with debugging.

## [3.0.19] - 2021-12-20
### [Changed]
- PluginManager data source no longer includes isEnabled. This has been moved to the PluginManager model.

## [3.0.18] - 2021-12-18
### [Fixed]
- Remote address missing when accessing via the CLI caused a type error.
## [3.0.16] - 2021-12-18
### [Fixed]
- Case issues with some class names.
### [Changed]
- Return type of OptionRepository::get from false to null when option doesn't exist.
### [Added]
- IP address to request log to help with debugging.

## [3.0.15] - 2021-12-17
### [Changed]
- Changed post password system to cookie based system rather than session to match WP. This also now works with the FPC.

## [3.0.14] - 2021-12-17
### [Changed]
- Cleaned up code.
### [Added]
- Ability to auto switch taxonomy when displaying categories on post view. This will select a different taxonomy if
  its a post type that doesn't support the category taxonomy.
### [Fixed]
- Compiler error for PostPassword.

## [3.0.12] - 2021-12-17
### [Changed]
- Improved CSS for post grids. Removed negative margins.

## [3.0.11] - 2021-12-17
### [Fixed]
- Fixed HTTP HEAD request bug when using CloudFlare. This broke the UrlValidation model in PSW.
- The usermeta was adding the blog_id as a table prefix, which is invalid for this table.
- Post password implementation was broke due to cookies no longer being shared so this has been updated for new the system.

## [3.0.10] - 2021-12-16
### [Added]
- Added cli_commands.php to the composer.json autoload section. This is the mechanism for loading the legacy autoloader
  when using Composer to install the modules.

## [3.0.9] - 2021-12-16
### [Fixed]
- Code improvements for the new v3 branch.

## [3.0.8] - 2021-12-16
### [Fixed]
- Automatic theme installation/upgrade is now fixed in local integration mode. An exception is only raised if permissions
  do not allow for the automatic update to take place.

## [3.0.7] - 2021-12-16
### [Fixed]
- Updated references to legacy classes to the new implementations.
- Fixed resizing images when in local mode. Images cannot be resized in External integration mode as the images live
  on the external server so cannot be resized by Magento. To resize images in external mode, create new image sizes in
  in WordPress and these will be available in Magento automatically.

## [3.0.3] - 2021-12-15
### [Fixed]
- PHP URL class error in HeadAdditional block
  
## [3.0.1] - 2021-12-15
### [Changed]
- References to FishPig\WordPress\Model\Logger have been changed to FishPig\WordPress\App\Logger

## [3.0.0] - 2021-12-15
This is a new major version of this module and all add-on modules. The module now uses semantic versioning and each module has a public change log.
You can see the old change log here: https://github.com/bentideswell/magento2-wordpress-integration/blob/dbce94d8089fc4f8d5c88225010394ec4c5f7dd5/changelog.txt


### [Added]
- Ability to connect/integrate WordPress hosted on a separate server. Can still integrate local installations. This can be selected in the module config.

### [Removed]
- No longer able to resize images dynamically
- No longer able to run WP code in Magento using 
