1,
"logo_uploader" => "",
"logo_border_radio" => "noborder",
"intro_background" => "",
"intro_image_uploader" => "",
"intro_text_editor" => "",
"default_thumbnail_uploader" => "",
"intro_slabtext_checkbox" => 1,
"custom_css_editor" => "",
"link_color" => "",
"facebook_comment_checkbox" => 0,
"facebook_app_id" => "",
"fontface_radio" => ""
);
if($seed["fontface_radio"] == "") {
if(!is_array($fontface_files) || (count($fontface_files) == 0))
$fontface_files = get_fontface_files();
reset($fontface_files);
$seed["fontface_radio"] = key($fontface_files);
}
function has_logo() {
global $seed;
return intval($seed['logo_checkbox']);
}
function logo() {
global $seed;
echo $seed['logo_uploader'];
}
function get_logo() {
global $seed;
return $seed['logo_uploader'];
}
function has_logo_border() {
global $seed;
return !strcmp($seed['logo_border_radio'], 'bordered');
}
function intro_background() {
global $seed;
echo $seed['intro_background'];
}
function get_intro_background() {
global $seed;
return $seed['intro_background'];
}
function intro_image() {
global $seed;
echo $seed['intro_image_uploader'];
}
function get_intro_image() {
global $seed;
return $seed['intro_image_uploader'];
}
function get_intro_text() {
global $seed;
$return = $seed['intro_text_editor'];
if(trim($return) != '') {
$return = str_replace(" ", " ", $return);
$return = str_replace("\r", "", $return);
while(false !== strpos($return, " ")) {
$return = str_replace(" ", " ", $return);
}
$return = str_replace("\n ", "\n", $return);
$return = str_replace(" \n", "\n", $return);
while(strpos($return, "\n\n")) {
$return = str_replace("\n\n", "\n", $return);
}
} else {
$return = 'INTRO AREA, INTRODUCE YOURSELF HERE.
YOU CAN CHANGE TEXT, BACKGROUND COLOR AND BACKGROUND IMAGE
CLICK TO EDIT THIS TEXT.';
}
return $return;
}
function intro_text() {
echo nl2br(trim(get_intro_text()));
}
function intro_text_with_slabtext() {
global $seed;
$return = $seed['intro_text_editor'];
if(trim($return) != '') {
$return = str_replace(" ", " ", $return);
$return = str_replace("\r", "", $return);
while(false !== strpos($return, " ")) {
$return = str_replace(" ", " ", $return);
}
$return = str_replace("\n ", "\n", $return);
$return = str_replace(" \n", "\n", $return);
while(strpos($return, "\n\n")) {
$return = str_replace("\n\n", "\n", $return);
}
$return_with_slabtext = '';
foreach(explode("\n", trim($return)) as $_line) {
$return_with_slabtext .= ''.$_line.'';
}
} else {
$return_with_slabtext = 'INTRO AREA, INTRODUCE YOURSELF HERE. YOU CAN CHANGE TEXT, BACKGROUND COLOR AND BACKGROUND IMAGE
CLICK TO EDIT THIS TEXT.';
}
echo $return_with_slabtext;
}
function default_thumbnail() {
global $seed;
echo $seed['default_thumbnail_uploader'];
}
function get_default_thumbnail() {
global $seed;
return $seed['default_thumbnail_uploader'];
}
function use_intro_slabtext() {
global $seed;
return intval($seed['intro_slabtext_checkbox']);
}
function custom_css() {
global $seed;
echo $seed['custom_css_editor'];
}
function get_custom_css() {
global $seed;
return $seed['custom_css_editor'];
}
function link_color() {
global $seed;
echo $seed['link_color'];
}
function get_link_color() {
global $seed;
return $seed['link_color'];
}
function use_facebook_comment() {
global $seed;
return intval($seed['facebook_comment_checkbox']);
}
function facebook_app_id() {
global $seed;
echo $seed['facebook_app_id'];
}
function get_facebook_app_id() {
global $seed;
return $seed['facebook_app_id'];
}
function footer_text() {
global $seed;
echo $seed['footer_text_editor'];
}
function get_footer_text() {
global $seed;
return $seed['footer_text_editor'];
}
function fontface() {
global $seed;
echo $seed['fontface_radio'];
}
function get_fontface() {
global $seed;
return $seed['fontface_radio'];
}
function get_seed_logo_border_style() {
$return = '';
if(has_logo() && has_logo_border())
$return = 'bordered';
else
$return = 'noborder';
return $return;
}
function seed_logo_border_style() {
echo get_seed_logo_border_style();
}
function get_seed_logo() {
$logo = '';
if(has_logo()) {
$img = trim(get_logo());
$root_path = rtrim(realpath(dirname(__FILE__)."/../../../../"), "/\\");
if(strpos($img, home_url() ) !== false) {
$img = $root_path."/".ltrim(str_replace(home_url() , '', $img), '/');
}
if($img != '') {
if(has_logo_border()) {
$image = vt_resize('', $img, 150, 150, true);
$image['url'] = rtrim(home_url(), "/")."/".ltrim(str_replace($root_path, '', $image['url']), "/");
$logo = '';
} else {
$image = vt_resize('', $img, 150, 1000, false);
$image['url'] = rtrim(home_url(), "/")."/".ltrim(str_replace($root_path, '', $image['url']), "/");
$logo = '
';
}
}
else {
$logo = '
Edit this logo';
}
}
return $logo;
}
function seed_logo() {
echo get_seed_logo();
}
function seed_head() {
global $seed;
global $post;
$head = '';
$type = is_singular() ? "article" : "website";
$title = wp_title('«', false, 'right');
$url = "http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
$image = "";
if(is_front_page()) {
$image = get_logo();
} else if(is_singular()) {
$post_thumbnail_id = get_post_thumbnail_id( $post->ID);
$image_properties = wp_get_attachment_image_src($post_thumbnail_id, "full");
$image = $image_properties[0];
}
if(trim($image) == "")
$image = get_stylesheet_directory_uri()."/img/seed-core/img/default-logo.png";
$path = substr($image, 0, strrpos($image, "/"));
$filename = substr($image, strrpos($image, "/") + 1);
$image = $path."/".urlencode($filename);
$site_name = get_bloginfo('name');
$descriptions = strip_tags(htmlspecialchars(get_bloginfo('description')));
if(is_singular()) {
$post_data = get_post( $post->ID );
the_post();
$excerpt = htmlspecialchars(get_the_excerpt());
rewind_posts();
$descriptions = strip_tags(htmlspecialchars($excerpt));
}
$app_id = get_facebook_app_id();
$head .= ''."\r\n";
$head .= ''."\r\n";
$head .= ''."\r\n";
$head .= ''."\r\n";
$head .= ''."\r\n";
if($app_id != '') {
$head .= ' '."\r\n";
}
$head .= ''."\r\n";
$head .= "\r\n";
$head .= '\r\n";
if($head != '')
?>