@@ -202,6 +202,9 @@ |
||
| 202 | 202 | return $this->has_created_post; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | + /** |
|
| 206 | + * @param boolean $handle |
|
| 207 | + */ |
|
| 205 | 208 | public function handle( $handle ) { |
| 206 | 209 | $this->handle = $handle; |
| 207 | 210 | |
@@ -119,6 +119,9 @@ |
||
| 119 | 119 | return $data; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | + /** |
|
| 123 | + * @param integer $source_post_thumbnail_id |
|
| 124 | + */ |
|
| 122 | 125 | protected function get_attachment_meta( $source_post_thumbnail_id ) { |
| 123 | 126 | $keys = [ '_wp_attached_file', '_wp_attachment_metadata', '_wp_attachment_image_alt' ]; |
| 124 | 127 | |
@@ -92,6 +92,9 @@ discard block |
||
| 92 | 92 | return $data; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | + /** |
|
| 96 | + * @param string $dest_lang |
|
| 97 | + */ |
|
| 95 | 98 | protected function create_local_term( \WP_Term $term, MslsOptionsTax $msls_term, $dest_lang ) { |
| 96 | 99 | $meta = get_term_meta( $term->term_id ); |
| 97 | 100 | $dest_term_id = wp_create_term( $term->name, $term->taxonomy ); |
@@ -131,6 +134,9 @@ discard block |
||
| 131 | 134 | return array_diff_key( $meta, array_combine( $blacklist, $blacklist ) ); |
| 132 | 135 | } |
| 133 | 136 | |
| 137 | + /** |
|
| 138 | + * @param integer $object_id |
|
| 139 | + */ |
|
| 134 | 140 | protected function update_object_terms( $object_id, $dest_term_id, $taxonomy ) { |
| 135 | 141 | if ( ! in_array( $taxonomy, $this->reset_taxonomies, true ) ) { |
| 136 | 142 | wp_set_object_terms( $object_id, [], $taxonomy ); |
@@ -8,6 +8,9 @@ discard block |
||
| 8 | 8 | require_once $_tests_dir . '/includes/functions.php'; |
| 9 | 9 | require_once __DIR__ . '/../vendor/autoload.php'; |
| 10 | 10 | |
| 11 | +/** |
|
| 12 | + * @param string $path |
|
| 13 | + */ |
|
| 11 | 14 | function msls_test_data( $path = null ) { |
| 12 | 15 | $data_root = __DIR__ . '/_data/'; |
| 13 | 16 | |
@@ -48,7 +51,7 @@ discard block |
||
| 48 | 51 | * |
| 49 | 52 | * @param array $available_languages |
| 50 | 53 | * |
| 51 | - * @return array |
|
| 54 | + * @return string[] |
|
| 52 | 55 | */ |
| 53 | 56 | public function filter_available_languages( array $available_languages = array() ) { |
| 54 | 57 | $available_languages[] = 'de_DE'; |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | * @param MslsJson $json |
| 57 | 57 | * @param array $args |
| 58 | 58 | * |
| 59 | - * @return mixed |
|
| 59 | + * @return MslsJson |
|
| 60 | 60 | */ |
| 61 | 61 | public static function get_suggested_fields( $json, $args ) { |
| 62 | 62 | /** |