@@ 421-428 (lines=8) @@ | ||
418 | ); |
|
419 | } |
|
420 | ||
421 | protected static function sanitize_item_ids( $item ) { |
|
422 | // lets not delete any options that don't start with jpsq_sync- |
|
423 | if ( ! is_string( $item ) || substr( $item, 0, 5 ) !== 'jpsq_' ) { |
|
424 | return null; |
|
425 | } |
|
426 | //Limit to A-Z,a-z,0-9,_,-,. |
|
427 | return preg_replace( '/[^A-Za-z0-9-_.]/', '', $item ); |
|
428 | } |
|
429 | } |
|
430 | ||
431 | class Jetpack_JSON_API_Sync_Unlock_Endpoint extends Jetpack_JSON_API_Sync_Endpoint { |
@@ 771-778 (lines=8) @@ | ||
768 | * |
|
769 | * @return string|string[]|null |
|
770 | */ |
|
771 | protected static function sanitize_item_ids( $item ) { |
|
772 | // lets not delete any options that don't start with jpsq_sync- . |
|
773 | if ( ! is_string( $item ) || substr( $item, 0, 5 ) !== 'jpsq_' ) { |
|
774 | return null; |
|
775 | } |
|
776 | // Limit to A-Z,a-z,0-9,_,-,. . |
|
777 | return preg_replace( '/[^A-Za-z0-9-_.]/', '', $item ); |
|
778 | } |
|
779 | ||
780 | } |
|
781 |