modules/videopress-v2/class.jetpack-videopress.php 1 location
|
@@ 97-105 (lines=9) @@
|
94 |
|
/** |
95 |
|
* Returns true if the provided user is the Jetpack connection owner. |
96 |
|
*/ |
97 |
|
public function is_connection_owner( $user_id = false ) { |
98 |
|
if ( ! $user_id ) { |
99 |
|
$user_id = get_current_user_id(); |
100 |
|
} |
101 |
|
|
102 |
|
$user_token = Jetpack_Data::get_access_token( JETPACK_MASTER_USER ); |
103 |
|
|
104 |
|
return $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) && $user_id === $user_token->external_user_id; |
105 |
|
} |
106 |
|
|
107 |
|
/** |
108 |
|
* Register VideoPress admin scripts. |
modules/videopress/videopress.php 1 location
|
@@ 399-405 (lines=7) @@
|
396 |
|
/** |
397 |
|
* Returns true if the provided user is the Jetpack connection owner. |
398 |
|
*/ |
399 |
|
function is_connection_owner( $user_id = false ) { |
400 |
|
if ( ! $user_id ) |
401 |
|
$user_id = get_current_user_id(); |
402 |
|
|
403 |
|
$user_token = Jetpack_Data::get_access_token( JETPACK_MASTER_USER ); |
404 |
|
return $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) && $user_id === $user_token->external_user_id; |
405 |
|
} |
406 |
|
|
407 |
|
/** |
408 |
|
* Our custom AJAX callback for the query-attachments action |