$_wp_additional_image_sizes[$_size]['width'], 'height' => $_wp_additional_image_sizes[$_size]['height'], 'crop' => $_wp_additional_image_sizes[$_size]['crop'], ); } } // Sort them by item width uasort( $sizes, function( $a, $b ) { if ( $a["width"] == $b["width"] ) { return 0; } return ( $a["width"] < $b["width"] ) ? -1 : 1; } ); return $sizes; } // Creates an array of the $id staff member's social icons function a_staff_get_members_socicons () { $social_network_blocks = tpl_get_option( 'a_staff_social_networks' ); $output = array(); // Do it only if any social network is found if ( !empty( $social_network_blocks[0] ) ) { foreach ( $social_network_blocks as $key => $network ) { $sname = sanitize_title( $network["network_name"] ); $field_name = 'a_staff_member_social_' . $sname; $network_url = tpl_get_option( $field_name ); if ( $network_url != '' ) { if ( tpl_get_option( 'a_staff_social_target' ) == 'new' ) { $newtab = 'yes'; } else { $newtab = 'no'; } $icon_args = array( "name" => 'a_staff_social_networks/' . $key . '/network_icon', "size" => esc_attr( tpl_get_option( 'a_staff_social_icon_size' ) ), "url" => esc_url( $network_url ), "newtab" => $newtab, "title" => esc_attr( $network["network_name"] ), "class" => 'fa-fw', ); if ( tpl_get_option( 'a_staff_icon_colors' ) == 'yes' ) { $icon_args["color"] = tpl_get_option( 'a_staff_social_networks/' . $key . '/icon_color' ); } // We use Themple Framework's inner tool to format the icon with the $args above $output[$sname] = tpl_get_value( $icon_args ); } } } return $output; }