wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
update_recently_edited › WordPress Function
Desde1.5.0
Obsoleton/a
› update_recently_edited ( $file )
| Parâmetros: |
|
| Definido em: |
|
| Codex: |
Updates the "recently-edited" file for the plugin or theme file editor.
Funções relacionadas: update_comment_meta, update_comment_cache, wp_update_entity_fields, update_archived, update_home_siteurl
Fonte
function update_recently_edited( $file ) {
$oldfiles = (array) get_option( 'recently_edited' );
if ( $oldfiles ) {
$oldfiles = array_reverse( $oldfiles );
$oldfiles[] = $file;
$oldfiles = array_reverse( $oldfiles );
$oldfiles = array_unique( $oldfiles );
if ( 5 < count( $oldfiles ) ) {
array_pop( $oldfiles );
}
} else {
$oldfiles[] = $file;
}
update_option( 'recently_edited', $oldfiles );
}