Open Mte90 opened 10 years ago
any news for that?
register_via_cpt_core( array(
__( 'Q & A item', 'your-text-domain' ), // Singular
__( 'Q & A items', 'your-text-domain' ), // Plural
'q-and-a-items' // Registered name/slug
) );
register_via_cpt_core( array(
__( 'Test CPT', 'your-text-domain' ), // Singular
__( 'Test CPTs', 'your-text-domain' ), // Plural
'tests' // Registered name/slug
) );
register_via_cpt_core( array(
__( 'ABC item', 'your-text-domain' ), // Singular
__( 'ABC items', 'your-text-domain' ), // Plural
'abcs' // Registered name/slug
) );
I didn't add css for that, so it uses default WordPress icons for "At a glance" items. I don't think we need a custom icon here, because it always will be the same for each CPT registered via CPT Core. Regarding the code itself, I had to use static variable to count number of CPT's registration calls, to limit "At a glance" widget modifications. Also, I'm not sure if we should keep this code in library or we need to move it into code snippets as an example. @JayWood what are your thoughts on this?
i've seen this snippet and i think that will be useful if integrated in this library.
http://wpsnipp.com/index.php/functions-php/wordpress-post-types-dashboard-at-glance-widget/