Projet

Général

Profil

Révision 136a805a

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/plugins/content_types/custom/custom.inc
16 16
$plugin = array(
17 17
  'title' => t('Custom content'),
18 18
  'no title override' => TRUE,
19
  'defaults' => array('admin_title' => '', 'title' => '', 'body' => '', 'format' => filter_default_format(), 'substitute' => TRUE),
19
  'defaults' => array('admin_title' => '', 'title' => '', 'title_heading' => 'h2', 'body' => '', 'format' => filter_default_format(), 'substitute' => TRUE),
20 20
  'js' => array('misc/autocomplete.js', 'misc/textarea.js', 'misc/collapse.js'),
21 21
  // Make sure the edit form is only used for some subtypes.
22 22
  'edit form' => '',
......
135 135
        $settings = array(
136 136
          'admin_title' => t('Missing/deleted content'),
137 137
          'title' => '',
138
          'title_heading' => '',
138 139
          'body' => '',
139 140
          'format' => filter_default_format(),
140 141
          'substitute' => TRUE,
......
180 181
  $block          = new stdClass();
181 182
  $block->subtype = ++$delta;
182 183
  $block->title   = filter_xss_admin($settings['title']);
184
  $block->title_heading = isset($settings['title_heading']) ? $settings['title_heading'] : 'h2';
185

  
183 186

  
184 187
  // Add keyword substitutions if we were configured to do so.
185 188
  $content = $settings['body'];
......
277 280
    '#description' => t('This title will be used administratively to identify this pane. If blank, the regular title will be used.'),
278 281
  );
279 282

  
283
  // Copy over the title override settings for a title heading.
284
  $form['aligner_start'] = array(
285
    '#markup' => '<div class="option-text-aligner clearfix">',
286
  );
287

  
280 288
  $form['title'] = array(
281 289
    '#type' => 'textfield',
282 290
    '#default_value' => $settings['title'],
283 291
    '#title' => t('Title'),
292
    '#id' => 'override-title-textfield',
293
  );
294

  
295
  $form['title_heading'] = array(
296
    '#type' => 'select',
297
    '#default_value' => isset($settings['title_heading']) ? $settings['title_heading'] : 'h2',
298
    '#options' => array(
299
      'h1' => t('h1'),
300
      'h2' => t('h2'),
301
      'h3' => t('h3'),
302
      'h4' => t('h4'),
303
      'h5' => t('h5'),
304
      'h6' => t('h6'),
305
      'div' => t('div'),
306
      'span' => t('span'),
307
    ),
308
    '#id' => 'override-title-heading',
309
  );
310

  
311
  $form['aligner_stop'] = array(
312
    '#markup' => '</div>',
284 313
  );
285 314

  
286 315
  $form['body'] = array(

Formats disponibles : Unified diff