Resolving Jetpack Conflict with AMP
-
Hi, Jetpack would fail after I upgraded, and as it turns out, it was a re-declaration of a function that was made with AMP ( shortcode_new_to_old_params() in /jetpack/modules/shortcodes.php ).
Without having the chance to read the offending code/element in AMP, since the error was in Jetpack, I just added a check in the file via functions_exists() for shortcode_new_to_old_params’ which didn’t exist earlier:
if ( ! function_exists( 'shortcode_new_to_old_params' ) ) { function shortcode_new_to_old_params( $params, $old_format_support = false ) { $str = ''; if ( $old_format_support && isset( $params[0] ) ) { $str = ltrim( $params[0], '=' ); } elseif ( is_array( $params ) ) { foreach ( array_keys( $params ) as $key ) { if ( ! is_numeric( $key ) ) { $str = $key . '=' . $params[ $key ]; } } } return str_replace( array( '&', '&' ), '&', $str ); } }
Just wanted to add that here as reference, hopefully for future updates if this is relevant, but also to make sure from your feedback there there won’t be any known (or apparent) conflicts made by this particular action.
Thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Resolving Jetpack Conflict with AMP’ is closed to new replies.