Switch language

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




get_file_description [ WordPress Function ]

get_file_description ( $file )
Parameters:
  • (string) $file Filesystem path or filename
Uses:
Returns:
  • (string) Description of file from $wp_file_descriptions or basename of $file if description doesn't exist
Defined at:



Get the description for standard WordPress theme files and other various standard WordPress files

Source


<?php
function get_file_description$file ) {
    global 
$wp_file_descriptions;

    if ( isset( 
$wp_file_descriptions[basename$file )] ) ) {
        return 
$wp_file_descriptions[basename$file )];
    }
    elseif ( 
file_exists$file ) && is_file$file ) ) {
        
$template_data implode''file$file ) );
        if ( 
preg_match'|Template Name:(.*)$|mi'$template_data$name ))
            return 
sprintf__'%s Page Template' ), _cleanup_header_comment($name[1]) );
    }

    return 
trimbasename$file ) );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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