wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
maybe_serialize › WordPress Function
Od2.0.5
Przestarzałyn/a
› maybe_serialize ( $data )
Parametry: |
|
Powrót: |
|
Zdefiniowane na: |
|
Codex: |
Serializes data, if needed.
Powiązane Funkcje: maybe_unserialize, is_serialized, serialize_block, image_resize, serialize_blocks
Źródło
function maybe_serialize( $data ) { if ( is_array( $data ) || is_object( $data ) ) { return serialize( $data ); } /* * Double serialization is required for backward compatibility. * See https://core.trac.wordpress.org/ticket/12930 * Also the world will end. See WP 3.6.1. */ if ( is_serialized( $data, false ) ) { return serialize( $data ); } return $data; }