@@ -80,6 +80,9 @@ discard block |
||
| 80 | 80 | wp_enqueue_script( 'a8c_wpcom_masterbar_overrides', $this->wpcom_static_url( '/wp-content/mu-plugins/admin-bar/masterbar-overrides/masterbar.js' ) ); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | + /** |
|
| 84 | + * @param string $file |
|
| 85 | + */ |
|
| 83 | 86 | function wpcom_static_url( $file ) { |
| 84 | 87 | $i = hexdec( substr( md5( $file ), - 1 ) ) % 2; |
| 85 | 88 | $url = 'https://s' . $i . '.wp.com' . $file; |
@@ -255,6 +258,9 @@ discard block |
||
| 255 | 258 | return $primary_anchor . $secondary_anchor; |
| 256 | 259 | } |
| 257 | 260 | |
| 261 | + /** |
|
| 262 | + * @param string $class |
|
| 263 | + */ |
|
| 258 | 264 | public function create_menu_item_anchor( $class, $url, $label, $id ) { |
| 259 | 265 | return '<a href="' . $url . '" class="' . $class . '" id="' . $id . '">' . $label . '</a>'; |
| 260 | 266 | } |
@@ -536,7 +536,6 @@ discard block |
||
| 536 | 536 | * @uses Jetpack::disconnect(); |
| 537 | 537 | * @since 4.3.0 |
| 538 | 538 | * |
| 539 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
| 540 | 539 | * |
| 541 | 540 | * @return string|WP_Error A raw URL if the connection URL could be built; error message otherwise. |
| 542 | 541 | */ |
@@ -556,7 +555,6 @@ discard block |
||
| 556 | 555 | * |
| 557 | 556 | * @since 4.3.0 |
| 558 | 557 | * |
| 559 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
| 560 | 558 | * |
| 561 | 559 | * @return object |
| 562 | 560 | */ |
@@ -1973,7 +1971,7 @@ discard block |
||
| 1973 | 1971 | * |
| 1974 | 1972 | * @param string $route Regular expression for the endpoint with the module slug to return. |
| 1975 | 1973 | * |
| 1976 | - * @return array |
|
| 1974 | + * @return string |
|
| 1977 | 1975 | */ |
| 1978 | 1976 | public static function get_module_requested( $route = '/module/(?P<slug>[a-z\-]+)' ) { |
| 1979 | 1977 | |
@@ -1998,7 +1996,7 @@ discard block |
||
| 1998 | 1996 | * @param string $modules Can be a single module or a list of modules. |
| 1999 | 1997 | * @param null|string $slug Slug of the module in the first parameter. |
| 2000 | 1998 | * |
| 2001 | - * @return array |
|
| 1999 | + * @return string |
|
| 2002 | 2000 | */ |
| 2003 | 2001 | public static function prepare_modules_for_response( $modules = '', $slug = null ) { |
| 2004 | 2002 | global $wp_rewrite; |