Properties

$module

$module

$option_name

$option_name

$version

$version

Methods

init()

init()

Singleton

__construct()

__construct()

jetpack_modules_loaded()

jetpack_modules_loaded()

After all modules have been loaded.

wp_ajax_videopress_get_upload_token()

wp_ajax_videopress_get_upload_token()

get_options()

get_options()

Get VideoPress options

update_options()

update_options( $options)

Update VideoPress options

Parameters

$options

jetpack_module_activated()

jetpack_module_activated()

Runs when the VideoPress module is activated.

jetpack_module_deactivated()

jetpack_module_deactivated()

Runs when the VideoPress module is deactivated.

query()

query( $method,  $args) : \the

Remote Query

Performs a remote XML-RPC query using Jetpack's IXR Client. And also appends some useful stuff about this setup to the query.

Parameters

$method
$args

Returns

\the —

Jetpack_IXR_Client object after querying.

jetpack_configuration_load()

jetpack_configuration_load()

Runs before the VideoPress Configuration screen loads, useful to update options and yield errors.

jetpack_configuration_screen()

jetpack_configuration_screen()

Renders the VideoPress Configuration screen in Jetpack.

admin_menu()

admin_menu()

admin_menu_library()

admin_menu_library()

can()

can( $cap,  $user_id)

A can of coke

Similar to current_user_can, but internal to VideoPress. Returns true if the given VideoPress capability is allowed by the given user.

Parameters

$cap
$user_id

is_connection_owner()

is_connection_owner( $user_id)

Returns true if the provided user is the Jetpack connection owner.

Parameters

$user_id

wp_ajax_query_attachments()

wp_ajax_query_attachments()

Our custom AJAX callback for the query-attachments action used in the media modal. By-passed if not for VideoPress.

sanitize_wp_query_args()

sanitize_wp_query_args( $args)

Sanitize user-provided WP_Query arguments

These might be sent to the VideoPress server, for a remote WP_Query call so let's make sure they're sanitized and safe to send.

Parameters

$args

wp_ajax_save_attachment()

wp_ajax_save_attachment()

Custom AJAX callback for the save-attachment action. If the request was not for a VideoPress object, core's fallback action will kick in.

wp_ajax_delete_post()

wp_ajax_delete_post()

Custom AJAX callback for the delete-post action, only for VideoPress objects.

enqueue_admin_scripts()

enqueue_admin_scripts()

Register VideoPress admin scripts.

get_available_ratings()

get_available_ratings()

Get an array of available ratings. Keys are options, values are labels.

print_media_templates()

print_media_templates()

Additional VideoPress media templates.

videopress_shortcode_options()

videopress_shortcode_options( $options)

Filters the VideoPress shortcode options, makes sure that the settings set in Jetpack's VideoPress module are applied.

Parameters

$options