Hey Jason,
Unfortunately I don’t have any docs prepared for you, but I will share some tips here that hopefully will get you pointed in the right direction.
the ACFFA_get_icons filter should return a multidimensional array. Here is a log of the entire array for the FontAwesome 4.7 icon set: https://gist.github.com/mattkeys/ef79a67649882ef100d83e343e395225.
Basically there are 3 main keys for this array:
- list: This is a simple array of all icons which is used in the backend area of the site when generating the select list dropdowns for users to pick their icons. The format for an item in this array is:
{classname} => {unicode} {iconname}
- details: This array contains expanded information about each icon. The key for each item is still the classname, but then the value is another array with keys for element, class, hex, and unicode.
- prefix: This is the class prefix used by the version of FontAwesome you are using. In 4.x this is ‘fa-‘
An example is probably a much simpler way to absorb this all. Lets say that you wanted to only include 3 social media icons (Facebook, Twitter, and Instagram). You could add the following function to your functions.php:
function get_social_icons( $icons ) {
$icons = array(
'list' => array(
null => '',
'fa-facebook' => ' facebook',
'fa-twitter' => ' twitter',
'fa-instagram' => ' instagram'
),
'details' => array(
'fa-facebook' => array(
'element' => '<i class="fa fa-facebook" aria-hidden="true"></i>',
'class' => 'fa-facebook',
'hex' => '\f09a',
'unicode' => '',
),
'fa-twitter' => array(
'element' => '<i class="fa fa-twitter" aria-hidden="true"></i>',
'class' => 'fa-twitter',
'hex' => '\f099',
'unicode' => '',
),
'fa-instagram' => array(
'element' => '<i class="fa fa-instagram" aria-hidden="true"></i>',
'class' => 'fa-instagram',
'hex' => '\f16d',
'unicode' => '',
),
),
'prefix' => 'fa-'
);
return $icons;
}
add_filter( 'ACFFA_get_icons', 'get_social_icons', 10, 1 );
Note: In the process of writing and testing this code for you, I found a bug where the ACFFA_get_icons filter wasn’t used in one place internally, so that values were not respected in the backend. I just pushed version 2.1.2 which fixes this bug, so make sure that you update your code before trying out the code sample above.
I hope this helps, let me know if you have questions.
Thanks,
Matt Keys