PHP Класс Jetpack_Portfolio, 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