@@ -100,6 +100,10 @@ discard block |
||
| 100 | 100 | ), menu_page_url( 'sharing', false ) ); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | + /** |
|
| 104 | + * @param string $service_name |
|
| 105 | + * @param string $for |
|
| 106 | + */ |
|
| 103 | 107 | static function refresh_url( $service_name, $for ) { |
| 104 | 108 | return add_query_arg( array( |
| 105 | 109 | 'action' => 'request', |
@@ -111,6 +115,10 @@ discard block |
||
| 111 | 115 | ), admin_url( 'options-general.php?page=sharing' ) ); |
| 112 | 116 | } |
| 113 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $service_name |
|
| 120 | + * @param string $id |
|
| 121 | + */ |
|
| 114 | 122 | static function disconnect_url( $service_name, $id ) { |
| 115 | 123 | return add_query_arg( array( |
| 116 | 124 | 'action' => 'delete', |
@@ -324,6 +324,9 @@ discard block |
||
| 324 | 324 | </div><?php |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | + /** |
|
| 328 | + * @param string $service_name |
|
| 329 | + */ |
|
| 327 | 330 | public static function options_page_other( $service_name ) { |
| 328 | 331 | // Nonce check |
| 329 | 332 | check_admin_referer( "options_page_{$service_name}_" . $_REQUEST['connection'] ); |
@@ -704,7 +707,7 @@ discard block |
||
| 704 | 707 | * |
| 705 | 708 | * @param array $connections_data |
| 706 | 709 | * |
| 707 | - * @return array { |
|
| 710 | + * @return string { |
|
| 708 | 711 | * Array of content for generating connection form. |
| 709 | 712 | * |
| 710 | 713 | * @type string HTML content of form |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * |
| 11 | 11 | * @param string $type Slug of the block. Will be prefixed with jetpack/. |
| 12 | 12 | * @param array $args Arguments that are passed into the register_block_type. |
| 13 | - * @param array $avalibility Arguments that tells us what kind of avalibility the block has |
|
| 13 | + * @param array $availability Arguments that tells us what kind of avalibility the block has |
|
| 14 | 14 | * |
| 15 | 15 | * @see register_block_type |
| 16 | 16 | * |
@@ -76,10 +76,16 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | + /** |
|
| 80 | + * @param string $preset |
|
| 81 | + */ |
|
| 79 | 82 | public static function preset_exists( $preset ) { |
| 80 | 83 | return file_exists( JETPACK__PLUGIN_DIR . '/_inc/blocks/' . $preset . '.json' ); |
| 81 | 84 | } |
| 82 | 85 | |
| 86 | + /** |
|
| 87 | + * @param string $preset |
|
| 88 | + */ |
|
| 83 | 89 | public static function get_preset( $preset ) { |
| 84 | 90 | return json_decode( file_get_contents( JETPACK__PLUGIN_DIR . '/_inc/blocks/' . $preset . '.json' ) ); |
| 85 | 91 | } |