wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
_wp_get_post_revision_version is private and should not be used in themes or plugins directly.
_wp_get_post_revision_version › WordPress Function
Od3.6.0
Przestarzałyn/a
› _wp_get_post_revision_version ( $revision )
| Dostęp: |
|
| Parametry: |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Gets the post revision version.
Źródło
function _wp_get_post_revision_version( $revision ) {
if ( is_object( $revision ) ) {
$revision = get_object_vars( $revision );
} elseif ( ! is_array( $revision ) ) {
return false;
}
if ( preg_match( '/^\d+-(?:autosave|revision)-v(\d+)$/', $revision['post_name'], $matches ) ) {
return (int) $matches[1];
}
return 0;
}