if (!defined('ABSPATH')) { exit; } // Exit if accessed directly /** * Returns the main instance of Icons_For_Features to prevent the need to use globals. * * @since 1.0.0 * @return object Icons_For_Features */ function Icons_For_Features() { return Icons_For_Features::instance(); } // End Icons_For_Features() Icons_For_Features(); /** * Main Icons_For_Features Class * * @class Icons_For_Features * @version 1.0.0 * @since 1.0.0 * @package Kudos * @author Matty */ final class Icons_For_Features { /** * Icons_For_Features The single instance of Icons_For_Features. * @var object * @access private
/** * Add custom columns for the "manage" screen of this post type. * * @access public * @param string $column_name * @param int $id * @since 1.0.0 * @return void */ public function register_custom_columns($column_name, $id) { if ('feature' != get_post_type()) { return; } global $post; switch ($column_name) { case 'icon': echo Icons_For_Features()->get_the_icon_html($id); break; default: break; } }