Search and Hit Enter

New functions and filters in ClassicPress 1.0.0

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 4)
  • Added: classicpress_dev_version_info() function that returns information about the ClassicPress source version in use, if any (details 2)
  • 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 2)
  • Added: classicpress_user_agent() function that provides a common code path for the User-Agent header value of outgoing HTTP requests (details 1)
  • 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 1)
  • 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 2)

Modified functions

  • Modified: extract_from_markers() and insert_with_markers() functions – extra parameters added to support regular expressions (details 1)
  • 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 1)

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 1)
  • 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 2)

Removed classes

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

New hooks

  • Added: The classicpress_asset_version filter provides a way to modify any script and stylesheet version number / cache buster (details 2)
  • Added: The allow_nightly_auto_core_updates filter controls whether to allow automatic updates for nightly builds (details 2)
  • 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 2)
  • 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 1)
  • Modified: The core_version_check_query_args filter (docs) received extra arguments extra_statsfailure_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 2)
  • 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 2)
  • 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 2)

Removed hooks