0 ) { sort( $themes ); foreach( $themes as $theme ) { $namefile = basename( $theme ); if ( $namefile == "index.php" ) continue; $return[ $namefile ] = $theme; } } return $return; } endif; /** * Get url of themes (eg. for preview or for image url in themes) * * First search in 'wp-content/themes/{active-theme}/alo-easymail-themes' folder; * if not exists search in 'wp-content/plugins/alo-easymail/alo-easymail-themes' */ if ( ! function_exists('alo_easymail_get_themes_url') ) : function alo_easymail_get_themes_url () { if ( @file_exists( WP_CONTENT_DIR.'/alo-easymail-themes/' ) ) { $url = content_url( '/alo-easymail-themes/' ); } else if ( @file_exists ( trailingslashit( get_stylesheet_directory() ) .'alo-easymail-themes/' ) ) { $url = trailingslashit( get_stylesheet_directory_uri() ) .'alo-easymail-themes/'; } else { $url = ALO_EM_PLUGIN_URL."/alo-easymail-themes/"; } return ( ! is_ssl() ) ? str_replace('https://', 'http://', $url) : $url; } endif; /* EOF */