@@ -332,6 +332,9 @@ |
||
| 332 | 332 | <?php |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | + /** |
|
| 336 | + * @param string $option |
|
| 337 | + */ |
|
| 335 | 338 | function admin_likes_get_option( $option ) { |
| 336 | 339 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
| 337 | 340 | $option_setting = get_blog_option( get_current_blog_id(), $option, 'on' ); |
@@ -504,6 +504,9 @@ |
||
| 504 | 504 | ) ); |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | + /** |
|
| 508 | + * @param string $content |
|
| 509 | + */ |
|
| 507 | 510 | protected function comment_hash( $content ) { |
| 508 | 511 | return 'c-' . substr( md5( $content ), 0, 8 ); |
| 509 | 512 | } |
@@ -97,6 +97,9 @@ |
||
| 97 | 97 | return $xml->getResponse(); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | + /** |
|
| 101 | + * @param boolean $value |
|
| 102 | + */ |
|
| 100 | 103 | public function update_option_receive_jetpack_monitor_notification( $value ) { |
| 101 | 104 | Jetpack::load_xml_rpc_client(); |
| 102 | 105 | $xml = new Jetpack_IXR_Client( array( |
@@ -48,6 +48,9 @@ |
||
| 48 | 48 | add_action( 'init', array( &$this, 'action_init' ) ); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + /** |
|
| 52 | + * @param string $file |
|
| 53 | + */ |
|
| 51 | 54 | function wpcom_static_url($file) { |
| 52 | 55 | $i = hexdec( substr( md5( $file ), -1 ) ) % 2; |
| 53 | 56 | $url = 'http://s' . $i . '.wp.com' . $file; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | /** |
| 27 | 27 | * Verifies that a user answered the math problem correctly while logging in. |
| 28 | 28 | * |
| 29 | - * @return bool Returns true if the math is correct |
|
| 29 | + * @return boolean|null Returns true if the math is correct |
|
| 30 | 30 | * @throws Error if insuffient $_POST variables are present. |
| 31 | 31 | * @throws Error message if the math is wrong |
| 32 | 32 | */ |
@@ -266,6 +266,9 @@ discard block |
||
| 266 | 266 | return trim( preg_replace( '#<p>\s*</p>#i', '', $new_string ) ); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | + /** |
|
| 270 | + * @return integer |
|
| 271 | + */ |
|
| 269 | 272 | function remove_innermost_last_child( $node, &$node_removed_from ) { |
| 270 | 273 | $node_removed_from = $node; |
| 271 | 274 | |
@@ -308,6 +311,9 @@ discard block |
||
| 308 | 311 | return str_replace( $search, $replace, $string ); |
| 309 | 312 | } |
| 310 | 313 | |
| 314 | + /** |
|
| 315 | + * @param string $message |
|
| 316 | + */ |
|
| 311 | 317 | public static function sanitize_message( $message ) { |
| 312 | 318 | $message = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $message ); |
| 313 | 319 | $message = wp_kses( $message, array() ); |
@@ -1220,6 +1220,8 @@ |
||
| 1220 | 1220 | * Enqueues assets needed to do async loading of related posts. |
| 1221 | 1221 | * |
| 1222 | 1222 | * @uses wp_enqueue_script, wp_enqueue_style, plugins_url |
| 1223 | + * @param boolean $script |
|
| 1224 | + * @param boolean $style |
|
| 1223 | 1225 | * @return null |
| 1224 | 1226 | */ |
| 1225 | 1227 | protected function _enqueue_assets( $script, $style ) { |
@@ -427,6 +427,9 @@ |
||
| 427 | 427 | public $service = ''; |
| 428 | 428 | public $total = 0; |
| 429 | 429 | |
| 430 | + /** |
|
| 431 | + * @param integer $total |
|
| 432 | + */ |
|
| 430 | 433 | public function __construct( $id, $total ) { |
| 431 | 434 | $services = new Sharing_Service(); |
| 432 | 435 | $this->id = esc_html( $id ); |
@@ -40,6 +40,9 @@ discard block |
||
| 40 | 40 | return $this->id; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @return string |
|
| 45 | + */ |
|
| 43 | 46 | public function get_share_url( $post_id ) { |
| 44 | 47 | /** |
| 45 | 48 | * Filter the sharing permalink. |
@@ -77,6 +80,9 @@ discard block |
||
| 77 | 80 | return false; |
| 78 | 81 | } |
| 79 | 82 | |
| 83 | + /** |
|
| 84 | + * @param string $url |
|
| 85 | + */ |
|
| 80 | 86 | public function get_link( $url, $text, $title, $query = '', $id = false ) { |
| 81 | 87 | $args = func_get_args(); |
| 82 | 88 | $klasses = array( 'share-'.$this->get_class(), 'sd-button' ); |
@@ -311,6 +317,9 @@ discard block |
||
| 311 | 317 | do_action( 'sharing_bump_stats', array( 'service' => $this, 'post' => $post ) ); |
| 312 | 318 | } |
| 313 | 319 | |
| 320 | + /** |
|
| 321 | + * @param string $name |
|
| 322 | + */ |
|
| 314 | 323 | public function js_dialog( $name, $params = array() ) { |
| 315 | 324 | if ( true !== $this->open_link_in_new ) |
| 316 | 325 | return; |
@@ -1393,6 +1402,9 @@ discard block |
||
| 1393 | 1402 | return __( 'Pinterest', 'jetpack' ); |
| 1394 | 1403 | } |
| 1395 | 1404 | |
| 1405 | + /** |
|
| 1406 | + * @return string |
|
| 1407 | + */ |
|
| 1396 | 1408 | public function get_image( $post ) { |
| 1397 | 1409 | if ( class_exists( 'Jetpack_PostImages' ) ) { |
| 1398 | 1410 | $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) ); |