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/ctools/includes/content.inc
244 244
 *   The content as rendered by the plugin. This content should be an array
245 245
 *   with the following possible keys:
246 246
 *   - title: The safe to render title of the content.
247
 *   - title_heading: The title heading.
247 248
 *   - content: The safe to render HTML content.
248 249
 *   - links: An array of links associated with the content suitable for
249 250
 *     theme('links').
......
299 300
      $keywords['%title'] = empty($content->title) ? '' : $content->title;
300 301
      $content->original_title = $keywords['%title'];
301 302
      $content->title = $conf['override_title_text'];
303
      $content->title_heading = isset($conf['override_title_heading']) ? $conf['override_title_heading'] : 'h2';
302 304
    }
303 305

  
304 306
    if (!empty($content->title)) {
......
504 506
      '#size' => 35,
505 507
      '#id' => 'override-title-textfield',
506 508
      '#dependency' => array('override-title-checkbox' => array(1)),
507
      '#dependency_type' => 'disable',
509
      '#dependency_type' => 'hidden',
508 510
    );
511
    $form['override_title_heading'] = array(
512
      '#type' => 'select',
513
      '#default_value' => isset($conf['override_title_heading']) ? $conf['override_title_heading'] : 'h2',
514
      '#options' => array(
515
        'h1' => t('h1'),
516
        'h2' => t('h2'),
517
        'h3' => t('h3'),
518
        'h4' => t('h4'),
519
        'h5' => t('h5'),
520
        'h6' => t('h6'),
521
        'div' => t('div'),
522
        'span' => t('span'),
523
      ),
524
      '#id' => 'override-title-heading',
525
      '#dependency' => array('override-title-checkbox' => array(1)),
526
      '#dependency_type' => 'hidden',
527
    );
528

  
509 529
    $form['aligner_stop'] = array(
510 530
      '#markup' => '</div>',
511 531
    );
......
536 556
  if (isset($form_state['values']['override_title'])) {
537 557
    $form_state['conf']['override_title'] = $form_state['values']['override_title'];
538 558
    $form_state['conf']['override_title_text'] = $form_state['values']['override_title_text'];
559
    $form_state['conf']['override_title_heading'] = $form_state['values']['override_title_heading'];
539 560
  }
540 561
}
541 562

  

Formats disponibles : Unified diff