메소드 |
설명 |
|
__construct ( ) |
Conditionally hook into WordPress. |
|
activation_post_type_support ( ) |
On plugin/theme activation, check if current theme supports CPT |
|
add_to_sitemap ( $post_types ) |
Add CPT to Dotcom sitemap |
|
allow_portfolio_rest_api_type ( $post_types ) |
Add to REST API post type whitelist |
|
customize_register ( $wp_customize ) |
Adds portfolio section to the Customizer. |
|
deactivation_post_type_support ( ) |
On theme switch, check if CPT item exists and disable if not |
|
edit_admin_columns ( $columns ) |
Change ‘Title’ column label
Add Featured Image column |
|
enqueue_admin_styles ( $hook ) |
Adjust image column width |
|
flush_rules_on_enable ( ) |
*
Flush permalinks when CPT option is turned on/off |
|
flush_rules_on_first_project ( ) |
*
Count published projects and flush permalinks when first projects is published |
|
flush_rules_on_switch ( ) |
*
Flush permalinks when CPT supported theme is activated |
|
get_portfolio_thumbnail_link ( $post_id ) : html |
Display the featured image if it's available |
|
get_project_author ( ) : html |
Displays the author of the current portfolio project. |
|
get_project_class ( $portfolio_index_number, $columns ) : string |
Individual project class |
|
get_project_tags ( $post_id ) : html |
Displays the project tags that a project belongs to. |
|
get_project_type ( $post_id ) : html |
Displays the project type that a project belongs to. |
|
image_column ( $column, $post_id ) |
Add featured image to column |
|
init ( ) |
|
|
portfolio_query ( $atts ) : object |
Query to retrieve entries from the Portfolio post_type. |
|
portfolio_shortcode ( $atts ) : portfolio_shortcode_html |
Our [portfolio] shortcode. |
|
portfolio_shortcode_html ( $atts ) : html |
The Portfolio shortcode loop. |
|
query_reading_setting ( $query ) |
Follow CPT reading setting on CPT archive and taxonomy pages |
|
register_post_types ( ) |
Register Post Type |
|
setting_html ( ) : html |
HTML code to display a checkbox true/false option
for the Portfolio CPT setting. |
|
settings_api_init ( ) : null |
Add a checkbox field in 'Settings' > 'Writing'
for enabling CPT functionality. |
|
site_supports_custom_post_type ( ) |
Should this Custom Post Type be made available? |
|
updated_messages ( $messages ) |
Update messages for the Portfolio admin. |
|