New functions and filters in ClassicPress 1.0.0


#1

This post is a reference for functions, filters, and actions that were added, modified, removed, or deprecated in ClassicPress 1.0.0 (as compared to the WordPress 4.9 branch).

New functions

  • Added: classicpress_version() function that returns the ClassicPress version number (details)
    Note: function_exists( 'classicpress_version' ) is the recommended way for a plugin or theme to determine whether it is running under ClassicPress.
  • Added: classicpress_is_dev_install() function that returns whether ClassicPress is running as a source repository / development installation (details)
  • Added: classicpress_dev_version_info() function that returns information about the ClassicPress source version in use, if any (details)
  • Added: classicpress_version_short() function that returns the ClassicPress version number without any prerelease version or other metadata (details)
  • Added: classicpress_asset_version() function that provides a common code path for specifying and modifying script and stylesheet version numbers / cache busters (details)
  • Added: classicpress_user_agent() function that provides a common code path for the User-Agent header value of outgoing HTTP requests (details)
  • Added: cp_dashboard_petitions() and cp_dashboard_petitions_output() functions to display ClassicPress petitions in the dashboard (details)
  • Added: display_plugins_categories_list() function to display a new Categories tab in the plugins installation section (details)
  • Added: Core_Upgrader::get_update_directory_root() function to determine the root directory of an upgrade package (details)
  • Added: cp_get_update_directory_root function to determine the root directory of an upgrade package (details)
  • Added: Core_Upgrader::_auto_update_enabled_for_versions() function to determine whether an automatic update should be performed (details)

Modified functions

  • Modified: extract_from_markers() and insert_with_markers() functions - extra parameters added to support regular expressions (details)
  • Deprecated: wp_http_supports() function - in WordPress, this is used to determine whether the site supports making SSL/HTTPS requests to other sites, but ClassicPress requires all API communication to happen via SSL/HTTPS (details)

Removed functions

  • Removed: wp_localize_community_events(), wp_ajax_get_community_events(), wp_print_community_events_markup(), and wp_print_community_events_templates() functions related to WordPress community events (details)
  • Removed: wp_credits(), _wp_credits_add_profile_link(), _wp_credits_build_object_link() functions related to WordPress credits (details)
  • Removed: wp_try_gutenberg_panel() and wp_ajax_update_try_gutenberg_panel() functions related to the Try Gutenberg dashboard callout (details)

Removed classes

  • Removed: WP_Community_Events class related to WordPress community events (details)

New hooks

  • Added: The classicpress_asset_version filter provides a way to modify any script and stylesheet version number / cache buster (details)
  • Added: The allow_nightly_auto_core_updates filter controls whether to allow automatic updates for nightly builds (details)
  • Added: The allow_patch_auto_core_updates filter controls whether to allow automatic updates between semver patch versions (e.g. 1.0.0 to 1.0.1) (details)
  • Added: The classicpress_core_updated_successfully action is like _core_updated_successfully but it gets passed the new ClassicPress version instead of the WordPress version (details)

Modified hooks

  • Modified: The http_headers_useragent filter (docs) is now applied to all outgoing requests (details)
  • Modified: The core_version_check_query_args filter (docs) received extra arguments extra_stats, failure_data, and translations (details)
  • Modified: The allow_major_auto_core_updates filter (docs) will now use the ClassicPress versioning scheme (semver), and the $current and $offered parameters were added (details)
  • Modified: The allow_minor_auto_core_updates filter (docs) will now use the ClassicPress versioning scheme (semver), and the $current and $offered parameters were added (details)
  • Modified: The allow_dev_auto_core_updates filter (docs) will now use the ClassicPress versioning scheme (semver), and the $current and $offered parameters were added (details)

Removed hooks

  • Removed: The try_gutenberg_panel action (docs) (details)

ClassicPress 1.0.0 "Aurora" Release Notes