Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




maybe_serialize [ WordPress Function ]

maybe_serialize ( $data )
Parameters:
  • (mixed) $data Data that might be serialized.
Returns:
  • (mixed) A scalar data
Defined at:



Serialize data, if needed.

Source


<?php
function maybe_serialize$data ) {
    if ( 
is_array$data ) || is_object$data ) )
        return 
serialize$data );

    
// Double serialization is required for backward compatibility.
    // See http://core.trac.wordpress.org/ticket/12930
    
if ( is_serialized$data ) )
        return 
serialize$data );

    return 
$data;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics