• Resolved tkchouaki

    (@tkchouaki)


    Hello,
    i’ve noticed not all the bootstrap icons are available (for example fa-hotel).
    When i checked the file helpers.php i found that you are using regex (line 240) to get the classes, but that regex didn’t match all the classes, especially those like
    .fa-hotel:before,
    .fa-bed:before {
    content: “\f236″;
    }
    So i modified the regex & the code a little bit to solve the problem & here’s the code

    //old pattern
    //$pattern = ‘/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*”(.+)”;\s+}/’;

    //by chouaki tarek
    $pattern = ‘/(\.(?:fa-(?:\w+(?:-)?)+):before(?:,\s*\.(?:fa-(?:\w+(?:-)?)+):before)*)\s*{\s*content:\s*”(.+)”;\s*}/’;
    $sub_pattern = ‘/(fa-.+?):before/’;
    preg_match_all( $pattern, $response[‘body’], $matches, PREG_SET_ORDER );

    $icons = array();

    foreach ( $matches as $match )
    {
    preg_match_all($sub_pattern, $match[1], $sub_matches, PREG_SET_ORDER);
    foreach($sub_matches as $sub_match)
    {
    $icons[ str_replace( ‘fa-‘, ”, $sub_match[1] ) ] = $match[2];
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Code Parrots

    (@codeparrots)

    Hey @tkchouaki,

    Thanks so much for posting a solution here! We will certainly investigate and push out an update as soon as possible. We have two other tweaks we need to get in there – so it should be in the next day or so.

    Thanks so much!

    Plugin Contributor Code Parrots

    (@codeparrots)

    Hi @tkchouaki,

    We’ve gone ahead and pushed out an update (v1.5.1) that should now resolve this, and have given you props in the changelog.

    If for some reason you are still experiencing any issues, feel free to drop a comment here and we can re-investigate.

    Thanks again for reporting the bug.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Missing bootstrap icons’ is closed to new replies.