t('Your comment is awaiting moderation.'); ?>
'e6e6e6', )); Add_Theme_Support('post-thumbnails' ); Set_Post_Thumbnail_Size( 624, 9999 ); //Add_Image_Size('header-image', get_custom_header()->width, get_custom_header()->height, True); Add_Image_Size('header-image', 1040, 300, True); Add_Image_Size('preview-thumb', 200, 200, True); Add_Image_Size('preview-gallery', 300, 250, True); } function Filter_The_Title($title){ If (Empty($title)) return SPrintF($this->t('Post from %s'), Get_The_Date()); Else return $title; } function Filter_Excerpt_Length($lenght){ Return 40; } function Filter_Shortcode_Atts_Gallery($attributes){ $attributes['size'] = 'preview-gallery'; return $attributes; } function Add_Admin_Menu_Style(){ WP_Register_Style('ability_adminmenu_style', get_template_directory_uri().'/css/style-adminmenu.css', false, '1.0'); WP_Enqueue_Style('ability_adminmenu_style'); } function Add_Dashboard_Meta_Box(){ Add_Meta_Box( 'dashboard-support-widget', $this->t('WordPress Support'), Array($this, 'Print_Dashboard_Support_Widget'), 'dashboard', 'normal', 'high' ); } function Print_Dashboard_Support_Widget() { ?>
t('Theme by ').'Ulrike Seddig'.' | %5$s', $this->t('http://ulrikeseddig.de/en/'), $this->t('Ulrike Seddig WordPress Consulting'), $this->t('http://ulrikeseddig.de/en/wordpress-themes/ability/'), $this->t('WordPress Theme Ability'), $this->t('Help') ); return $footer_text; } function Locate_File_Uri ($file){ If (SubStr($file, 0, 1) != '/') $file = '/' . $file; If (File_Exists(get_stylesheet_directory() . $file)) return get_stylesheet_directory_uri() . $file; ElseIf (File_Exists(get_template_directory() . $file)) return get_template_directory_uri() . $file; Else return False; } function Load_TextDomain(){ $locale = Apply_Filters( 'theme_locale', get_locale(), __CLASS__ ); load_textdomain (__CLASS__, DirName(__FILE__).'/language/' . $locale . '.mo'); } function t ($text, $context = ''){ // Translates the string $text with context $context If ($context == '') return __ ($text, __CLASS__); Else return _x ($text, $context, __CLASS__); } function Register_Menus(){ register_nav_menu('primary', $this->t('Primary Menu')); register_nav_menu('footer', $this->t('Footer Menu')); } function Filter_Banner_Image($header_image){ If (is_singular() && has_post_thumbnail()) { $featured_image_id = get_post_thumbnail_id(); $featured_image_url = WP_Get_Attachment_Image_Src($featured_image_id, 'header-image'); return $featured_image_url[0]; } return $header_image; } function Custom_Header_Setup() { $args = array( 'default-text-color' => '444', 'default-image' => '', 'height' => 300, 'width' => 1040, 'max-width' => 1040, 'flex-height' => false, 'flex-width' => false, 'random-default' => false, 'wp-head-callback' => Array($this, 'header_style'), 'admin-head-callback' => Array($this, 'admin_header_style'), 'admin-preview-callback' => Array($this, 'admin_header_image'), ); add_theme_support( 'custom-header', $args ); } function Header_Style() { $text_color = get_header_textcolor(); If ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) return; ?> t('on', 'Open Sans font: on or off')) { $subsets = 'latin,latin-ext'; $subset = $this->t('no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)'); if ( 'cyrillic' == $subset ) $subsets .= ',cyrillic,cyrillic-ext'; elseif ( 'greek' == $subset ) $subsets .= ',greek,greek-ext'; elseif ( 'vietnamese' == $subset ) $subsets .= ',vietnamese'; $protocol = is_ssl() ? 'https' : 'http'; $query_args = array( 'family' => 'Open+Sans:400italic,700italic,400,700', 'subset' => $subsets, ); wp_enqueue_style( 'ability-fonts', add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ), array(), null ); } wp_enqueue_style( 'ability-style', get_stylesheet_uri() ); } function WP_Title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( $this->t('Page %s'), max( $paged, $page ) ); return $title; } function Page_Menu_Args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; } function Widgets_Init() { register_sidebar( array( 'name' => $this->t('Main Sidebar'), 'id' => 'sidebar-1', 'description' => $this->t('Appears on posts and pages except the optional Footer Widget template, which has its own widgets.'), 'before_widget' => '', 'before_title' => 't('Pingback:'); ?> t('(Edit)'), '', '' ); ?>
t('Your comment is awaiting moderation.'); ?>
', '
' ); ?>