Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

The module_load_all function loads all of the enabled modules. this is its code:

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

Just before the drupal_load('module', $module); statement check for the specific url you are looking for and the admin-menu module, if the condition holds skip the drupal_laod statement. I mean

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      if(current_path != "SPECIFIC URL" || $module!="SPECIFIC MODULE")
         drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

The How do I prevent a module from being loaded?How do I prevent a module from being loaded? may also be helpful

Please note that this will require you to hack the core (modify a core source code) and is not recommended unless you have no other option.

The module_load_all function loads all of the enabled modules. this is its code:

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

Just before the drupal_load('module', $module); statement check for the specific url you are looking for and the admin-menu module, if the condition holds skip the drupal_laod statement. I mean

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      if(current_path != "SPECIFIC URL" || $module!="SPECIFIC MODULE")
         drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

The How do I prevent a module from being loaded? may also be helpful

Please note that this will require you to hack the core (modify a core source code) and is not recommended unless you have no other option.

The module_load_all function loads all of the enabled modules. this is its code:

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

Just before the drupal_load('module', $module); statement check for the specific url you are looking for and the admin-menu module, if the condition holds skip the drupal_laod statement. I mean

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      if(current_path != "SPECIFIC URL" || $module!="SPECIFIC MODULE")
         drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

The How do I prevent a module from being loaded? may also be helpful

Please note that this will require you to hack the core (modify a core source code) and is not recommended unless you have no other option.

Add a note so amatures would no this is not a best preactice.
Source Link

The module_load_all function loads all of the enabled modules. this is its code:

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

Just before the drupal_load('module', $module); statement check for the specific url you are looking for and the admin-menu module, if the condition holds skip the drupal_laod statement. I mean

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      if(current_path != "SPECIFIC URL" || $module!="SPECIFIC MODULE")
         drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

The How do I prevent a module from being loaded? may also be helpful

Please note that this will require you to hack the core (modify a core source code) and is not recommended unless you have no other option.

The module_load_all function loads all of the enabled modules. this is its code:

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

Just before the drupal_load('module', $module); statement check for the specific url you are looking for and the admin-menu module, if the condition holds skip the drupal_laod statement. I mean

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      if(current_path != "SPECIFIC URL" || $module!="SPECIFIC MODULE")
         drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

The How do I prevent a module from being loaded? may also be helpful

The module_load_all function loads all of the enabled modules. this is its code:

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

Just before the drupal_load('module', $module); statement check for the specific url you are looking for and the admin-menu module, if the condition holds skip the drupal_laod statement. I mean

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      if(current_path != "SPECIFIC URL" || $module!="SPECIFIC MODULE")
         drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

The How do I prevent a module from being loaded? may also be helpful

Please note that this will require you to hack the core (modify a core source code) and is not recommended unless you have no other option.

Source Link
M a m a D
  • 3.8k
  • 2
  • 32
  • 62

The module_load_all function loads all of the enabled modules. this is its code:

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

Just before the drupal_load('module', $module); statement check for the specific url you are looking for and the admin-menu module, if the condition holds skip the drupal_laod statement. I mean

function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      if(current_path != "SPECIFIC URL" || $module!="SPECIFIC MODULE")
         drupal_load('module', $module);
   }
   // $has_run will be TRUE if $bootstrap is FALSE.
  $has_run = !$bootstrap;
 }
  return $has_run;
}

The How do I prevent a module from being loaded? may also be helpful