| @@ -163,9 +163,9 @@ | ||
| 163 | 163 | |
| 164 | 164 | // Sticky posts |
| 165 | 165 | if ( in_array( 'sticky_posts', $this->options['sync'] ) ) { |
| 166 | 166 | $stickies = get_option( 'sticky_posts' ); |
| 167 | - if ( isset( $_REQUEST['sticky'] ) && 'sticky' === $_REQUEST['sticky'] ) { // phpcs:ignore WordPress.Security.NonceVerification | |
| 167 | + if ( isset( $_REQUEST['sticky'] ) && 'sticky' === $_REQUEST['sticky'] ) { | |
| 168 | 168 | $stickies = array_merge( $stickies, array_values( $translations ) ); |
| 169 | 169 | } else { |
| 170 | 170 | $stickies = array_diff( $stickies, array_values( $translations ) ); |
| 171 | 171 | } |
| @@ -188,18 +188,18 @@ | ||
| 188 | 188 | $obj = substr( $func, 5 ); |
| 189 | 189 | |
| 190 | 190 | if ( is_object( $this->$obj ) && method_exists( $this->$obj, 'copy' ) ) { |
| 191 | 191 | if ( WP_DEBUG ) { |
| 192 | - $debug = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions | |
| 192 | + $debug = debug_backtrace(); | |
| 193 | 193 | $i = 1 + empty( $debug[1]['line'] ); // The file and line are in $debug[2] if the function was called using call_user_func |
| 194 | 194 | |
| 195 | - trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions | |
| 195 | + trigger_error( | |
| 196 | 196 | sprintf( |
| 197 | 197 | '%1$s was called incorrectly in %3$s on line %4$s: the call to PLL()->sync->%1$s() has been deprecated in Polylang 2.3, use PLL()->sync->%2$s->copy() instead.' . "\nError handler", |
| 198 | - esc_html( $func ), | |
| 199 | - esc_html( $obj ), | |
| 200 | - esc_html( $debug[ $i ]['file'] ), | |
| 201 | - absint( $debug[ $i ]['line'] ) | |
| 198 | + $func, | |
| 199 | + $obj, | |
| 200 | + $debug[ $i ]['file'], | |
| 201 | + $debug[ $i ]['line'] | |
| 202 | 202 | ) |
| 203 | 203 | ); |
| 204 | 204 | } |
| 205 | 205 | return call_user_func_array( array( $this->$obj, 'copy' ), $args ); |
| @@ -204,16 +204,8 @@ | ||
| 204 | 204 | } |
| 205 | 205 | return call_user_func_array( array( $this->$obj, 'copy' ), $args ); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - $debug = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions | |
| 209 | - trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions | |
| 210 | - sprintf( | |
| 211 | - 'Call to undefined function PLL()->sync->%1$s() in %2$s on line %3$s' . "\nError handler", | |
| 212 | - esc_html( $func ), | |
| 213 | - esc_html( $debug[0]['file'] ), | |
| 214 | - absint( $debug[0]['line'] ) | |
| 215 | - ), | |
| 216 | - E_USER_ERROR | |
| 217 | - ); | |
| 208 | + $debug = debug_backtrace(); | |
| 209 | + trigger_error( sprintf( 'Call to undefined function PLL()->sync->%1$s() in %2$s on line %3$s' . "\nError handler", $func, $debug[0]['file'], $debug[0]['line'] ), E_USER_ERROR ); | |
| 218 | 210 | } |
| 219 | 211 | } |