There are typos in the files bootstrap.api.php and common.inc and hook bootstrap_iconize_text does not work.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markhalliwell’s picture

Status: Active » Needs work

Doh! Thanks! I was really tired when I did these.

  1. +++ b/bootstrap.api.php
    @@ -43,7 +43,7 @@ function hook_boostrap_colorize_text_alter(&$texts) {
    @@ -57,7 +57,6 @@ function hook_bootstrap_iconize_text(&$texts) {
    
    @@ -57,7 +57,6 @@ function hook_bootstrap_iconize_text(&$texts) {
       // Change the icon that matches "Upload" (originally "upload"):
       $texts['contains'][t('Upload')] = 'ok';
     }
    -
     /**
      * @} End of "addtogroup hooks".
      */
    

    Don't remove this line.

  2. +++ b/theme/common.inc
    @@ -591,12 +591,13 @@ function _bootstrap_iconize_text($string, $default = '') {
    -        t('Upload')     => 'upload',
    +        t('Upload')     => 'upload'
    

    , is required on all array lines in PHP. This isn't JS.

  3. +++ b/theme/common.inc
    @@ -591,12 +591,13 @@ function _bootstrap_iconize_text($string, $default = '') {
    +    ¶
    

    Whitespace

moonberry’s picture

markhalliwell’s picture

Status: Needs work » Fixed

Thanks @moonberry!

Committed 26b23c4 to 7.x-3.x:

Issue #2218635 by moonberry: Typo in hook names colorize and iconize texts.

markhalliwell’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Assigned: Unassigned » ryan.armstrong
Status: Fixed » Needs review

The last submitted patch, 0497-Fixed-hooks-names.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 2: 0497-Fixed-hook-names-typos.patch, failed testing.

  • Commit 26b23c4 on 7.x-3.x, 8.x-3.x authored by moonberry, committed by Mark Carver:
    Issue #2218635 by moonberry: Typo in hook names colorize and iconize...

  • Mark Carver committed 26b23c4 on 8.x-3.x.x authored by moonberry
    Issue #2218635 by moonberry: Typo in hook names colorize and iconize...
markhalliwell’s picture

Version: 8.x-3.x-dev » 7.x-3.x-dev
Assigned: ryan.armstrong » Unassigned
Status: Needs work » Closed (fixed)

I'm just moving this back to 7.x. If there needs to be any re-evaluation for 8.x, create a new issue.

QuietSpecialist’s picture

Just updated to 7.3x and the iconize text function isn't working for me.

I'm using the following code in mysite template.php file:

function mysite_bootstrap_iconize_text_alter(&$texts) {
    $texts['matches'][t('My Button')] = 'heart';
}

QuietSpecialist’s picture

Sorry, this works as designed. I was trying to target an <a> rather than <button> tag.