You are here

function upgrade_status_moved_into_core in Upgrade Status 7

Same name and namespace in other branches
  1. 5 upgrade_status.admin.inc \upgrade_status_moved_into_core()
  2. 6 upgrade_status.module \upgrade_status_moved_into_core()

Return status and notice about modules moved into Core.

Assign custom upgrade information for certain modules.

Parameters

$projects: Array of projects from upgrade_status_calculate_project_data(). This parameter is passed by reference, and metadata for the project can added to the $projects[$project] array for use later. Three additional keys are supported:

  • in_core_since: The major version since which the module is in core.
  • in_core_complete: Boolean flag indicating whether the complete functionality of the project is in core. Set this to FALSE when the core replacement does not include the full functionality of the project.
  • in_core_note: Note to display to the user. This should be succinct and describe:

    • What core module or API replaces the project, if the module was not moved directly into core with the same name.
    • What functionality of the project is not included in core, if the 'in_core_complete' flag is false.

$project: Project name to check.

Return value

TRUE if module has been moved into core.

1 call to upgrade_status_moved_into_core()
upgrade_status_calculate_project_update_status in ./upgrade_status.compare.inc
Calculates the current update status of a specific project.

File

./upgrade_status.module, line 265
Checks to see if your installed modules are available for the next major release of Drupal.

Code

function upgrade_status_moved_into_core(&$projects, $project) {

  // Only include in core statuses for the configured major version and below.
  // Set the oldest version's data first, so that the latest version of core may
  // update the previous version's information.
  // @todo What about modules moved into core and then back out?
  $core_version = variable_get('upgrade_status_core_version', UPGRADE_STATUS_CORE_VERSION);
  switch ($core_version) {
    case '7.x':
      $core = _upgrade_status_d7_core($projects, $project);
      break;
    case '8.x':
      $d7_core = _upgrade_status_d7_core($projects, $project);
      $d8_core = _upgrade_status_d8_core($projects, $project);
      $core = $d7_core || $d8_core;
      break;
  }
  return $core;
}