瑞士军刀选购 built on WP Framework'. $sep .'Powered by WordPress'; echo apply_filters( 'wpframework_credits', (string) $credits ); } /** * framework_media() loads javascripts and styles * * @since 0.2.3 */ function framework_media() { if( is_admin() ) return; wp_enqueue_script( 'hoverIntent' ); wp_enqueue_script( 'supersubs', JS . '/supersubs.js', array( 'jquery' ) ); wp_enqueue_script( 'bgiframe', JS . '/jquery.bgiframe.min.js', array( 'jquery' ) ); wp_enqueue_script( 'superfish', JS . '/superfish.js', array( 'jquery' ) ); wp_enqueue_script( 'screen_js', JS . '/screen.js', array( 'jquery' ) ); } /** * remove_generator_link() Removes generator link * * @since 0.1 * @credits http://www.plaintxt.org * @needsdoc */ function remove_generator_link() { return ''; } /** * post_gallery_filter stops [gallery] styles from being added to the page. making html invalid * * @since 0.2.3 * @needsdoc */ function gallery_style_filter( $gallery ) { return '
{$file} does not seem to exist. Please make sure this file exist in " . get_stylesheet_directory() . "\n";
$error = apply_filters( 'framework_get_error', (string) $error ); // Available filter: framework_get_error
if ( isset( $file ) && file_exists( get_stylesheet_directory() . "/{$file}.php" ) )
locate_template( get_stylesheet_directory() . "/{$file}.php" );
else
echo $error;
}
/**
* include_all() A function to include all files from a directory path
*
* @since 0.2.3
* @credits k2
*/
function include_all( $path, $ignore = false ) {
/* Open the directory */
$dir = @dir( $path ) or die( 'Could not open required directory ' . $path );
/* Get all the files from the directory */
while ( ( $file = $dir->read() ) !== false ) {
/* Check the file is a file, and is a PHP file */
if ( is_file( $path . $file ) and ( !$ignore or !in_array( $file, $ignore ) ) and preg_match( '/\.php$/i', $file ) ) {
require_once( $path . $file );
}
}
$dir->close(); // Close the directory, we're done.
}
/**
* Gets the profile URI for the document being displayed.
* @link http://microformats.org/wiki/profile-uris Profile URIs
*
* @since 0.2.4
* @param integer $echo 0|1
* @return string profile uris seperatd by spaces
**/
function get_profile_uri( $echo = 1 ) {
// hAtom profile
$profile[] = 'http://purl.org/uF/hAtom/0.1/';
// hCard, hCalendar, rel-tag, rel-license, rel-nofollow, VoteLinks, XFN, XOXO profile
$profile[] = 'http://purl.org/uF/2008/03/';
$profile = join( ' ', apply_filters( 'profile_uri', $profile ) ); // Available filter: profile_uri
if ( $echo ) echo $profile;
else return $profile;
}
?>