template.custom-functions.inc 972 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Implements hook_form_alter().
  4. */
  5. function perfarttimeline_form_alter(&$form, &$form_state, $form_id) {
  6. // dsm($form_id, 'form_id');
  7. if($form_id == 'search_block_form'){
  8. // dsm($form, 'form');
  9. $form['actions']['submit'] = array(
  10. '#type' => 'image_button',
  11. '#src' => drupal_get_path('theme', 'perfarttimeline') . '/images/search.png',
  12. '#value' => t('Search'),
  13. );
  14. }
  15. }
  16. function perfarttimeline_html_head_alter(&$head_elements) {
  17. unset($head_elements['system_meta_generator']);
  18. foreach ($head_elements as $key => $element) {
  19. if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'canonical') {
  20. unset($head_elements[$key]);
  21. }
  22. if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'shortlink') {
  23. unset($head_elements[$key]);
  24. }
  25. if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'alternate') {
  26. unset($head_elements[$key]);
  27. }
  28. }
  29. }