wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
update_recently_edited › WordPress Function
Od1.5.0
Przestarzałyn/a
› update_recently_edited ( $file )
Parametry: |
|
Zdefiniowane na: |
|
Codex: |
Updates the "recently-edited" file for the plugin or theme file editor.
Powiązane Funkcje: update_comment_meta, update_comment_cache, update_archived, wp_update_attachment_metadata, update_menu_item_cache
Źródło
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 ); }