Commit 2bb38297 authored by Tobias Zimmermann's avatar Tobias Zimmermann
Browse files

by tstoeckler: Add deprecation notices to all legacy functions and hooks

parent ddf78f31
Loading
Loading
Loading
Loading
+6 −0
Changes for libraries.api.php: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -172,6 +172,8 @@
 *   Additional top-level properties can be registered as needed.
 *
 * @see hook_library()
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function hook_libraries_info() {
  // The following is a full explanation of all properties. See below for more
@@ -411,6 +413,8 @@ function hook_libraries_info() {
 * integration files inside of an array, whose key is the module name.
 *
 * @see hook_libraries_info()
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function hook_libraries_info_alter(&$libraries) {
  $files = array(
@@ -435,6 +439,8 @@ function hook_libraries_info_alter(&$libraries) {
 *
 * @return
 *   An array of paths.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function hook_libraries_info_file_paths() {
  // Taken from the Libraries test module, which needs to specify the path to
+26 −0
Changes for libraries.module: 26 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ function libraries_library_info_build() {
 *   The path to the specified library or FALSE if the library wasn't found.
 *
 * @ingroup libraries
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_get_path($name, $base_path = FALSE) {
  $libraries = &drupal_static(__FUNCTION__);
@@ -72,6 +74,8 @@ function libraries_get_path($name, $base_path = FALSE) {
 *   A list of library directories.
 *
 * @ingroup libraries
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_get_libraries() {
  $searchdir = array();
@@ -128,6 +132,8 @@ function libraries_get_libraries() {
 * @return
 *   An array of info files, keyed by library name. The values are the paths of
 *   the files.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_scan_info_files() {
  $profile = drupal_get_path('profile', drupal_get_profile());
@@ -167,6 +173,8 @@ function libraries_scan_info_files() {
 *   either 'info', 'pre-detect', 'post-detect', or 'load'.
 * @param $library
 *   An array of library information, passed by reference.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_invoke($group, &$library) {
  foreach ($library['callbacks'][$group] as $callback) {
@@ -186,6 +194,8 @@ function libraries_invoke($group, &$library) {
 *   An array of library information, passed by reference.
 * @param $callback
 *   A string containing the callback to apply to all parts of a library.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_traverse_library(&$library, $callback) {
  // Always apply the callback to the top-level library.
@@ -240,6 +250,8 @@ function libraries_traverse_library(&$library, $callback) {
 *
 * @see libraries_info()
 * @see libraries_invoke()
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_prepare_files(&$library, $version = NULL, $variant = NULL) {
  // Both the 'files' property and the 'integration files' property contain file
@@ -288,6 +300,8 @@ function libraries_prepare_files(&$library, $version = NULL, $variant = NULL) {
 *
 * @see libraries_info()
 * @see libraries_invoke()
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_detect_dependencies(&$library, $version = NULL, $variant = NULL) {
  if (isset($library['dependencies'])) {
@@ -337,6 +351,8 @@ function libraries_detect_dependencies(&$library, $version = NULL, $variant = NU
 *
 * @todo Re-introduce support for include file plugin system - either by copying
 *   Wysiwyg's code, or directly switching to CTools.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function &libraries_info($name = NULL) {
  // This static cache is re-used by libraries_detect() to save memory.
@@ -423,6 +439,8 @@ function &libraries_info($name = NULL) {
 *   An array of library information, passed by reference.
 * @name
 *   The machine name of the passed-in library.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_info_defaults(&$library, $name) {
  $library += array(
@@ -477,6 +495,8 @@ function libraries_info_defaults(&$library, $name) {
 *     error message.
 *
 * @see libraries_info()
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_detect($name) {
  // Re-use the statically cached value of libraries_info() to save memory.
@@ -607,6 +627,8 @@ function libraries_detect($name) {
 *   - loaded: Either the amount of library files that have been loaded, or
 *     FALSE if the library could not be loaded.
 *   See hook_libraries_info() for more information.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_load($name, $variant = NULL) {
  $loaded = &drupal_static(__FUNCTION__, array());
@@ -666,6 +688,8 @@ function libraries_load($name, $variant = NULL) {
 *
 * @return
 *   The number of loaded files.
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_load_files($library) {

@@ -761,6 +785,8 @@ function libraries_load_files($library) {
 *   A string containing the version of the library.
 *
 * @see libraries_get_path()
 *
 * @deprecated Will be removed before a stable Drupal 8 release.
 */
function libraries_get_version($library, $options) {
  // Provide defaults.