PHP 클래스 Jetpack_Portfolio, jetpack

파일 보기 프로젝트 열기: automattic/jetpack

공개 프로퍼티들

프로퍼티 타입 설명
$version

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

Setup user option for enabling CPT If user has CPT enabled, show in admin
public __construct ( )

activation_post_type_support() 정적인 공개 메소드

On plugin/theme activation, check if current theme supports CPT
static public activation_post_type_support ( )

add_to_sitemap() 공개 메소드

Add CPT to Dotcom sitemap
public add_to_sitemap ( $post_types )

allow_portfolio_rest_api_type() 공개 메소드

Add to REST API post type whitelist
public allow_portfolio_rest_api_type ( $post_types )

customize_register() 공개 메소드

Adds portfolio section to the Customizer.
public customize_register ( $wp_customize )

deactivation_post_type_support() 공개 메소드

On theme switch, check if CPT item exists and disable if not

edit_admin_columns() 공개 메소드

Change ‘Title’ column label Add Featured Image column
public edit_admin_columns ( $columns )

enqueue_admin_styles() 공개 메소드

Adjust image column width
public enqueue_admin_styles ( $hook )

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_project_author() 정적인 공개 메소드

Displays the author of the current portfolio project.
static public get_project_author ( ) : html
리턴 html

get_project_class() 정적인 공개 메소드

Individual project class
static public get_project_class ( $portfolio_index_number, $columns ) : string
리턴 string

get_project_tags() 정적인 공개 메소드

Displays the project tags that a project belongs to.
static public get_project_tags ( $post_id ) : html
리턴 html

get_project_type() 정적인 공개 메소드

Displays the project type that a project belongs to.
static public get_project_type ( $post_id ) : html
리턴 html

image_column() 공개 메소드

Add featured image to column
public image_column ( $column, $post_id )

init() 정적인 공개 메소드

static public init ( )

portfolio_query() 정적인 공개 메소드

Query to retrieve entries from the Portfolio post_type.
static public portfolio_query ( $atts ) : object
리턴 object

portfolio_shortcode() 정적인 공개 메소드

Prints Portfolio data styled to look good on *any* theme.
static public portfolio_shortcode ( $atts ) : portfolio_shortcode_html
리턴 portfolio_shortcode_html

portfolio_shortcode_html() 정적인 공개 메소드

The Portfolio shortcode loop.
static public portfolio_shortcode_html ( $atts ) : html
리턴 html

query_reading_setting() 공개 메소드

Follow CPT reading setting on CPT archive and taxonomy pages
public query_reading_setting ( $query )

register_post_types() 공개 메소드

Register Post Type
public register_post_types ( )

setting_html() 공개 메소드

HTML code to display a checkbox true/false option for the Portfolio CPT setting.
public setting_html ( ) : html
리턴 html

settings_api_init() 공개 메소드

Add a checkbox field in 'Settings' > 'Writing' for enabling CPT functionality.
public settings_api_init ( ) : null
리턴 null

site_supports_custom_post_type() 공개 메소드

Should this Custom Post Type be made available?

updated_messages() 공개 메소드

Update messages for the Portfolio admin.
public updated_messages ( $messages )

프로퍼티 상세

$version 공개적으로 프로퍼티

public $version