PHP 클래스 Jetpack_VideoPress, jetpack

파일 보기 프로젝트 열기: automattic/jetpack 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$module string
$version integer

공개 메소드들

메소드 설명
add_video_upload_mimes ( array $existing_mimes = [] ) : array Makes sure that all video mimes are added in, as multi site installs can remove them.
can ( $cap, $user_id = false ) A can of coke
change_add_new_menu_location ( ) Changes the add new menu location, so that VideoPress will be enabled when a user clicks that button.
enqueue_admin_scripts ( ) Register VideoPress admin scripts.
enqueue_admin_styles ( ) Register and enqueue VideoPress admin styles.
filter_video_mimes ( string $value ) : integer Filter designed to get rid of non video mime types.
init ( ) Singleton
is_connection_owner ( $user_id = false ) Returns true if the provided user is the Jetpack connection owner.
jetpack_module_deactivated ( ) Runs when the VideoPress module is deactivated.
on_init ( ) Fires on init
print_in_footer_open_media_add_new ( ) : boolean A work-around / hack to make it possible to go to the media library with the add new box open.
update_attachment_url_for_videopress ( string $url, integer $post_id ) : mixed An override for the attachment url, which returns back the WPCOM videopress original url, if it is set to the the objects metadata. this allows us to show the original uploaded file on the WPCOM architecture, instead of the locally uplodaded file, which doeasn't exist.
videopress_pluploder_config ( $config ) Modify the default plupload config to turn on videopress specific filters.

보호된 메소드들

메소드 설명
should_override_media_uploader ( ) : boolean Helper function to determine if the media uploader should be overridden.

비공개 메소드들

메소드 설명
__construct ( ) Jetpack_VideoPress constructor.

메소드 상세

add_video_upload_mimes() 공개 메소드

Makes sure that all video mimes are added in, as multi site installs can remove them.
public add_video_upload_mimes ( array $existing_mimes = [] ) : array
$existing_mimes array
리턴 array

can() 공개 메소드

Similar to current_user_can, but internal to VideoPress. Returns true if the given VideoPress capability is allowed by the given user.
public can ( $cap, $user_id = false )

change_add_new_menu_location() 공개 메소드

Changes the add new menu location, so that VideoPress will be enabled when a user clicks that button.

enqueue_admin_scripts() 공개 메소드

Register VideoPress admin scripts.

enqueue_admin_styles() 공개 메소드

Register and enqueue VideoPress admin styles.

filter_video_mimes() 공개 메소드

Filter designed to get rid of non video mime types.
public filter_video_mimes ( string $value ) : integer
$value string
리턴 integer

init() 공개 정적인 메소드

Singleton
public static init ( )

is_connection_owner() 공개 메소드

Returns true if the provided user is the Jetpack connection owner.
public is_connection_owner ( $user_id = false )

jetpack_module_deactivated() 공개 메소드

Runs when the VideoPress module is deactivated.

on_init() 공개 메소드

Fires on init
public on_init ( )

should_override_media_uploader() 보호된 메소드

The rules are simple, only try to load the script when on the edit post or new post pages.

update_attachment_url_for_videopress() 공개 메소드

An override for the attachment url, which returns back the WPCOM videopress original url, if it is set to the the objects metadata. this allows us to show the original uploaded file on the WPCOM architecture, instead of the locally uplodaded file, which doeasn't exist.
public update_attachment_url_for_videopress ( string $url, integer $post_id ) : mixed
$url string
$post_id integer
리턴 mixed

videopress_pluploder_config() 공개 메소드

Modify the default plupload config to turn on videopress specific filters.
public videopress_pluploder_config ( $config )

프로퍼티 상세

$module 공개적으로 프로퍼티

public string $module
리턴 string

$version 공개적으로 프로퍼티

public int $version
리턴 integer