| @@ -62,8 +62,13 @@ | ||
| 62 | 62 | * |
| 63 | 63 | * @return array The altered robots string. |
| 64 | 64 | */ |
| 65 | 65 | public function set_robots_no_index( $robots ) { |
| 66 | + if ( ! \is_array( $robots ) ) { | |
| 67 | + \_deprecated_argument( __METHOD__, '14.1', '$robots has to be a key-value paired array.' ); | |
| 68 | + return $robots; | |
| 69 | + } | |
| 70 | + | |
| 66 | 71 | $robots['index'] = 'noindex'; |
| 67 | 72 | |
| 68 | 73 | return $robots; |
| 69 | 74 | } |