Skip to content

The Release Candidate for the WordPress Parse.ly plugin 3.0 is now available. It can be downloaded here.

This RC version is already available for users to test in the VIP platform. To enable this version, the following code is required:

add_filter(
	'wpvip_parsely_version',
	function() {
		return '3.0';
	} 
);

add_filter( 'wpvip_parsely_load_mu', '__return_true' );

The final version will be released in the coming weeks and will be made available to VIP sites at the same time. However, 3.0 will not be the default version on the VIP platform until Q1 2022 (the 2.6 branch will remain the default until then).

What is being added or changed?

From the plugin’s changelog:

Important information about this release

wp-parsely 3.0.0 is a major release of the Parse.ly WordPress plugin. The major version bump is because we are introducing a number of breaking changes that have allowed us to modernize the codebase and make future features easier to implement.

The biggest breaking change is the new minimum requirements for running the plugin. You now need PHP 7.1 or newer and WordPress 5.0 or newer. If you are running one of those old versions, you shouldn’t get the update option on your WordPress admin.

If you are using the plugin without any code-level customizations (for instance, calling the plugin’s functions or methods or hooking in the plugin’s WordPress hooks), this update should be seamless and everything should keep operating normally. The plugin’s way of working is still fundamentally the same. If you are using those customizations, we recommend you going through the detailed changelog to see if they affect you. In most of the cases, only trivial changes will be required to make your code work.

Added

  • Namespaces to files. #430 #475 #477
  • Now all functions and classes are under the Parsely namespace, or a child namespace of that e.g. Parsely\Parsely or Parsely\UI\Recommended_Widget. If your code is calling a wp-parsely function (directly, or as a hook callback) without the namespace, then you’ll need to update that call.
  • Strict typing (strict_types=1) to all files in the codebase #420.
  • Passing a value to a function in wp-parsely with an incorrect type will now raise an error.
  • Type declarations have been added to function returns #429 and arguments #455.
  • wp_parsely_should_insert_metadata filter. #440
  • The filter controls whether the Parse.ly metadata should be inserted in the page’s HTML. By default, the meta tags are rendered (the filter returns true).
  • wp_parsely_enable_cfasync_tag filter. #473.
  • The Cloudflare cfasync attributes are now not rendered by default, but they can be enabled by returning true to this filter.
  • WordPress plugin uninstall script. #444
  • When the plugin is uninstalled, the options will be removed from the database. Deactivating the plugin will not cause the options to be deleted.
  • npm run dev:start and npm run dev:stop commands to run the plugin locally for development purposes. #493
  • E2E test for recommended widget. #434
  • JavaScript code-scanning #453

Changed

  • Minimum PHP and WP versions required to run the plugin are now 7.1 (from 5.6) and 5.0 from (4.0), respectively. #416
  • The development Node JS version has been bumped from 14 to 16.
  • Extract logic from class-parsely.php file:
  • Extract admin warning to Parsely\UI\Admin_Warning. #468
  • Extract tracker logic to Parsely\Scripts #478
  • Extract settings page to Parsely\UI\Settings_Page. #467
  • Rename Parsely_Recommended_Widget class to Parsely\UI\Recommended_Widget.
  • Rename methods in Parsely\Scripts class #481:
  • register_js() to register_scripts().
  • load_js_api() to enqueue_js_api().
  • load_js_tracker() to enqueue_js_tracker().
  • Move Parse.ly settings file to views/parsely-settings.php. #459
  • Open on Parse.ly links are displayed by default. #433
  • To disable the feature, the wp_parsely_enable_row_action_links filter must return false.
  • Parsely::get_current_url() default value for argument string $parsely_type changed from nonpost to non-post. #447
  • This change has been done to better align with Parse.ly’s backend.
  • Enqueue scripts with theme independent hook. #458
  • The JavaScript scripts are now enqueued at the wp_enqueue_scripts hook instead of wp_footer.
  • Replace multi-select fields with checkboxes on the settings page. #482
  • Existing selections will be retained.
  • Made class members private #486:
  • Parsely\Integrations\Facebook_Instant_Articles: REGISTRY_IDENTIFIER, REGISTRY_DISPLAY_NAME, get_embed_code().
  • Parsely\UI\Recommended_Widget: get_api_url().
  • Tests: Specify coverage: none where it is not needed. #419
  • Bump @wordpress/e2e-test-utils from 5.4.3 to 5.4.8. #492
  • Bump @wordpress/scripts from 18.0.1 to 19.1.0. #480
  • Bump @wordpress/eslint-plugin from 9.2.0 to 9.3.0. #490

Fixed

  • Fix missing translation support for Yes and No labels in the settings page. #463
  • Avoid making duplicate calls to Parse.ly API on the Recommended Widget’s front-end. #460
  • Fix JS string translation in settings page. #462
  • Consistent return types on update_metadata_endpoint. #446
  • The function used to return different return types, now it always returns void.
  • Consistent return type on insert_parsely_page. #443
  • The function used to return string|null|array, now it returns void.
  • Tests: Stop using deprecated setMethods() method. #427
  • e2e tests: fix watch command. #476
  • Fix non-working README code example. #439

Removed

  • Previously deprecated filter after_set_parsely_page. #436
  • Use wp_parsely_metadata instead.
  • Previously deprecated filter parsely_filter_insert_javascript. #437
  • Use wp_parsely_load_js_tracker instead.
  • post_has_viewable_type function. #417
  • Use is_post_viewable instead. The post_has_viewable_type function was only added to support older versions of WordPress.
  • Custom Parse.ly load text domain. #457
  • Since the plugin now supports versions of WordPress that load custom text domains automatically, the plugins doesn’t have to explicitly load the text domain itself.
  • Empty functions for admin settings. #456
  • The callbacks were never utilised.
  • Redundant code coverage annotations. #469
  • Old init Python script. #441
  • “Add admin warning for minimum requirements in 3.0” notice. #424
  • This was only added in the previous version of the plugin.
  • Upgrade README notice. #470