We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there, How can i extend fontaweome field? i want to be there more icon like flaticon, icomoon icon. i am trying like this
function vp_get_fontawesome_icons() { // scrape list of icons from fontawesome css if( false === ( $icons = get_transient( 'vp_fontawesome_icons' ) ) ) { $pattern = '/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/'; $subject = file_get_contents(VP_DIR . '/public/css/vendor/font-awesome.min.css'); preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER); $icons = array(); //fontawesome foreach($matches as $match) { $icons[] = array('value' => 'fa '.$match[1], 'label' => $match[1]); } $pattern2 = '/\.(flaticon-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/'; $subject2 = file_get_contents(get_template_directory_uri(). '/css/flaticon.css'); preg_match_all($pattern2, $subject2, $matches2, PREG_SET_ORDER); $icons = array(); //flaticon foreach($matches2 as $match2) { $icons[] = array('value' => 'fa '.$match2[1], 'label' => $match2[1]); } set_transient( 'vp_fontawesome_icons', $icons, 60 * 60 * 24 ); } return $icons; }
but it's only returning fontawesome icons.
Please help.
Regards, Ashikur.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there,
How can i extend fontaweome field? i want to be there more icon like flaticon, icomoon icon. i am trying like this
but it's only returning fontawesome icons.
Please help.
Regards,
Ashikur.
The text was updated successfully, but these errors were encountered: