Skip to content
Snippets Groups Projects
Commit 32f503ff authored by Ryan Jacobs's avatar Ryan Jacobs Committed by Ryan Jacobs
Browse files

Issue #2702563 by rjacobs, CRZDEV, aegirone: Aviod call_user_func() errors for...

Issue #2702563 by rjacobs, CRZDEV, aegirone: Aviod call_user_func() errors for implementations still using deprecated load functions.
parent 5e7ea584
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,9 @@ function libraries_library_info_build() {
*
* @ingroup libraries
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_get_path($name, $base_path = FALSE) {
$libraries = &drupal_static(__FUNCTION__);
......@@ -77,7 +79,9 @@ function libraries_get_path($name, $base_path = FALSE) {
*
* @ingroup libraries
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_get_libraries() {
$searchdir = array();
......@@ -135,7 +139,9 @@ function libraries_get_libraries() {
* 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.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_scan_info_files() {
$profile = drupal_get_path('profile', drupal_get_profile());
......@@ -176,7 +182,9 @@ function libraries_scan_info_files() {
* @param $library
* An array of library information, passed by reference.
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_invoke($group, &$library) {
foreach ($library['callbacks'][$group] as $callback) {
......@@ -197,7 +205,9 @@ function libraries_invoke($group, &$library) {
* @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.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_traverse_library(&$library, $callback) {
// Always apply the callback to the top-level library.
......@@ -253,7 +263,9 @@ function libraries_traverse_library(&$library, $callback) {
* @see libraries_info()
* @see libraries_invoke()
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_prepare_files(&$library, $version = NULL, $variant = NULL) {
// Both the 'files' property and the 'integration files' property contain file
......@@ -303,7 +315,9 @@ 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.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_detect_dependencies(&$library, $version = NULL, $variant = NULL) {
if (isset($library['dependencies'])) {
......@@ -354,7 +368,9 @@ 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.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function &libraries_info($name = NULL) {
// This static cache is re-used by libraries_detect() to save memory.
......@@ -442,7 +458,9 @@ function &libraries_info($name = NULL) {
* @name
* The machine name of the passed-in library.
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_info_defaults(&$library, $name) {
$library += array(
......@@ -498,7 +516,9 @@ function libraries_info_defaults(&$library, $name) {
*
* @see libraries_info()
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_detect($name) {
// Re-use the statically cached value of libraries_info() to save memory.
......@@ -630,7 +650,9 @@ function libraries_detect($name) {
* 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.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_load($name, $variant = NULL) {
$loaded = &drupal_static(__FUNCTION__, array());
......@@ -691,7 +713,9 @@ function libraries_load($name, $variant = NULL) {
* @return
* The number of loaded files.
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_load_files($library) {
......@@ -707,6 +731,10 @@ function libraries_load_files($library) {
// handling.
// @see drupal_process_attached()
foreach (array('js', 'css') as $type) {
// Given the removal of core functions like _drupal_add_js and
// _drupal_add_css the logic below cannot safely be run anymore.
// @see https://www.drupal.org/node/2702563
break;
if (!empty($library['files'][$type])) {
foreach ($library['files'][$type] as $data => $options) {
// If the value is not an array, it's a filename and passed as first
......@@ -788,7 +816,9 @@ function libraries_load_files($library) {
*
* @see libraries_get_path()
*
* @deprecated Will be removed before a stable Drupal 8 release.
* @deprecated Will be removed before a stable Drupal 8 release. Please use the
* new library load and managment concepts described at:
* https://www.drupal.org/node/2170763
*/
function libraries_get_version($library, $options) {
// Provide defaults.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment