@@ -40,11 +40,17 @@ discard block |
||
40 | 40 | return $translations; |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @param string $prefix |
|
45 | + */ |
|
43 | 46 | function extract_from_file( $file_name, $prefix ) { |
44 | 47 | $code = file_get_contents( $file_name ); |
45 | 48 | return $this->extract_from_code( $code, $prefix . $file_name ); |
46 | 49 | } |
47 | 50 | |
51 | + /** |
|
52 | + * @param string $path |
|
53 | + */ |
|
48 | 54 | function does_file_name_match( $path, $excludes, $includes ) { |
49 | 55 | if ( $includes ) { |
50 | 56 | $matched_any_include = false; |
@@ -128,6 +134,10 @@ discard block |
||
128 | 134 | return $entry; |
129 | 135 | } |
130 | 136 | |
137 | + /** |
|
138 | + * @param string $code |
|
139 | + * @param string $file_name |
|
140 | + */ |
|
131 | 141 | function extract_from_code( $code, $file_name ) { |
132 | 142 | $translations = new Translations; |
133 | 143 | $function_calls = $this->find_function_calls( array_keys( $this->rules ), $code ); |
@@ -51,6 +51,9 @@ discard block |
||
51 | 51 | return ''; |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param string $dir |
|
56 | + */ |
|
54 | 57 | function list_php_files($dir) { |
55 | 58 | $files = array(); |
56 | 59 | $items = scandir( $dir ); |
@@ -67,16 +70,25 @@ discard block |
||
67 | 70 | } |
68 | 71 | |
69 | 72 | |
73 | + /** |
|
74 | + * @param string $global_array_name |
|
75 | + */ |
|
70 | 76 | function make_string_aggregator($global_array_name, $filename) { |
71 | 77 | $a = $global_array_name; |
72 | 78 | return create_function('$string, $comment_id, $line_number', 'global $'.$a.'; $'.$a.'[] = array($string, $comment_id, '.var_export($filename, true).', $line_number);'); |
73 | 79 | } |
74 | 80 | |
81 | + /** |
|
82 | + * @param string $global_mo_name |
|
83 | + */ |
|
75 | 84 | function make_mo_replacer($global_mo_name) { |
76 | 85 | $m = $global_mo_name; |
77 | 86 | return create_function('$token, $string', 'global $'.$m.'; return var_export($'.$m.'->translate($string), true);'); |
78 | 87 | } |
79 | 88 | |
89 | + /** |
|
90 | + * @param string $register_action |
|
91 | + */ |
|
80 | 92 | function walk_tokens(&$tokens, $string_action, $other_action, $register_action=null) { |
81 | 93 | |
82 | 94 | $current_comment_id = ''; |
@@ -49,6 +49,9 @@ |
||
49 | 49 | return $pot; |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param string[] $headers |
|
54 | + */ |
|
52 | 55 | function append( $ext_filename, $pot_filename, $headers = null ) { |
53 | 56 | if ( $headers ) |
54 | 57 | $this->headers = (array) $headers; |
@@ -82,7 +82,7 @@ |
||
82 | 82 | * @global wpdb $wpdb WordPress database abstraction object. |
83 | 83 | * |
84 | 84 | * @param int $link_id ID of the link to delete |
85 | - * @return true Always true. |
|
85 | + * @return boolean Always true. |
|
86 | 86 | */ |
87 | 87 | function wp_delete_link( $link_id ) { |
88 | 88 | global $wpdb; |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | |
485 | 485 | /** |
486 | 486 | * |
487 | - * @return array |
|
487 | + * @return string[] |
|
488 | 488 | */ |
489 | 489 | protected function get_table_classes() { |
490 | 490 | return array( 'widefat', 'fixed', 'striped', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' ); |
@@ -1162,7 +1162,7 @@ discard block |
||
1162 | 1162 | * @since 4.3.0 |
1163 | 1163 | * @access protected |
1164 | 1164 | * |
1165 | - * @param object $post Post being acted upon. |
|
1165 | + * @param WP_Post $post Post being acted upon. |
|
1166 | 1166 | * @param string $column_name Current column name. |
1167 | 1167 | * @param string $primary Primary column name. |
1168 | 1168 | * @return string Row actions output for posts. |
@@ -20,10 +20,6 @@ discard block |
||
20 | 20 | * |
21 | 21 | * @param string $cap Capability name. |
22 | 22 | * @param int $user_id User ID. |
23 | - * @param int $object_id Optional. ID of the specific object to check against if `$cap` is a "meta" cap. |
|
24 | - * "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used |
|
25 | - * by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts', |
|
26 | - * 'edit_others_posts', etc. The parameter is accessed via func_get_args(). |
|
27 | 23 | * @return array Actual capabilities for meta capability. |
28 | 24 | */ |
29 | 25 | function map_meta_cap( $cap, $user_id ) { |
@@ -416,11 +412,6 @@ discard block |
||
416 | 412 | * @see map_meta_cap() |
417 | 413 | * |
418 | 414 | * @param string $capability Capability name. |
419 | - * @param int $object_id Optional. ID of the specific object to check against if `$capability` is a "meta" cap. |
|
420 | - * "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used |
|
421 | - * by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts', |
|
422 | - * 'edit_others_posts', etc. Accessed via func_get_args() and passed to WP_User::has_cap(), |
|
423 | - * then map_meta_cap(). |
|
424 | 415 | * @return bool Whether the current user has the given capability. If `$capability` is a meta cap and `$object_id` is |
425 | 416 | * passed, whether the current user has the given meta capability for the given object. |
426 | 417 | */ |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | * @since 2.7.0 |
523 | 523 | * |
524 | 524 | * @param string $strResponse The full response string |
525 | - * @return array Array with 'headers' and 'body' keys. |
|
525 | + * @return string Array with 'headers' and 'body' keys. |
|
526 | 526 | */ |
527 | 527 | public static function processResponse($strResponse) { |
528 | 528 | $res = explode("\r\n\r\n", $strResponse, 2); |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | * |
543 | 543 | * @param string|array $headers |
544 | 544 | * @param string $url The URL that was requested |
545 | - * @return array Processed string headers. If duplicate headers are encountered, |
|
545 | + * @return string Processed string headers. If duplicate headers are encountered, |
|
546 | 546 | * Then a numbered array is returned as the value of that header-key. |
547 | 547 | */ |
548 | 548 | public static function processHeaders( $headers, $url = '' ) { |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | /** |
552 | 552 | * reduce a string by removing leading and trailing comments and whitespace |
553 | 553 | * |
554 | - * @param $str string string value to strip of comments and whitespace |
|
554 | + * @param string $str string string value to strip of comments and whitespace |
|
555 | 555 | * |
556 | 556 | * @return string string value stripped of comments and whitespace |
557 | 557 | * @access private |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | * @param string |
899 | 899 | * @param integer start |
900 | 900 | * @param integer length |
901 | - * @return integer length |
|
901 | + * @return string length |
|
902 | 902 | */ |
903 | 903 | function substr8( $string, $start, $length=false ) |
904 | 904 | { |
@@ -1004,7 +1004,7 @@ |
||
1004 | 1004 | * @global wpdb $wpdb WordPress database abstraction object. |
1005 | 1005 | * |
1006 | 1006 | * @param string $string |
1007 | - * @param array $cols |
|
1007 | + * @param string[] $cols |
|
1008 | 1008 | * @return string |
1009 | 1009 | */ |
1010 | 1010 | protected function get_search_sql( $string, $cols ) { |