Projet

Général

Profil

Révision e4c061ad

Ajouté par Assos Assos il y a plus de 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php
407 407
   * their CSS added in the right order: inner content before outer content.
408 408
   */
409 409
  function add_meta() {
410
    global $theme;
411

  
410 412
    if (!empty($this->plugins['layout']['css'])) {
413
      // Do not use the path_to_theme() function, because it returns the
414
      // $GLOBALS['theme_path'] value, which may be overriden in the theme()
415
      // function when the theme hook defines the key 'theme path'.
416
      $theme_path = isset($theme) ? drupal_get_path('theme', $theme) : '';
417

  
411 418
      $css = $this->plugins['layout']['css'];
412 419
      if (!is_array($css)) {
413 420
        $css = array($css);
414 421
      }
415
      foreach($css as $file) {
416
        if (file_exists(path_to_theme() . '/' . $file)) {
417
          $this->add_css(path_to_theme() . '/' . $file);
422

  
423
      // Load each of the CSS files defined in this layout.
424
      foreach ($css as $file) {
425
        if (!empty($theme_path) && file_exists($theme_path . '/' . $file)) {
426
          $this->add_css($theme_path . '/' . $file);
418 427
        }
419 428
        else {
420 429
          $this->add_css($this->plugins['layout']['path'] . '/' . $file);
......
427 436
      if (!is_array($admin_css)) {
428 437
        $admin_css = array($admin_css);
429 438
      }
430
      foreach($admin_css as $file) {
439
      foreach ($admin_css as $file) {
431 440
        $this->add_css($this->plugins['layout']['path'] . '/' . $file);
432 441
      }
433 442
    }

Formats disponibles : Unified diff