'.get_bloginfo('name').'.' .' Powered by WordPress.'; require_once(get_template_directory() . '/custom_functions.php'); require_once(get_template_directory() . '/includes/functions/comments.php'); load_theme_textdomain( $themename, get_template_directory() . '/languages' ); require_once(get_template_directory() . '/includes/additional_functions.php'); require_once(get_template_directory() . '/includes/shortcodes.php'); if ( ! defined( 'ALLMED_COLOR_LINK' ) ) define( 'ALLMED_COLOR_LINK', '#eab910' ); if ( ! defined( 'ALLMED_COLOR_H' ) ) define( 'ALLMED_COLOR_H', '#eab910' ); if ( ! defined( 'ALLMED_COLOR_TEXT' ) ) define( 'ALLMED_COLOR_TEXT', '#000000' ); if ( ! defined( 'ALLMED_EXCERPT_BACKGROUND' ) ) define( 'ALLMED_EXCERPT_BACKGROUND', '#ebebee' ); if ( ! defined( 'ALLMED_EXCERPT_BORDER' ) ) define( 'ALLMED_EXCERPT_BORDER', '#506774' ); if ( ! defined( 'ALLMED_WIDGET_BACKGROUND' ) ) define( 'ALLMED_WIDGET_BACKGROUND', '#ebebee' ); if ( ! defined( 'ALLMED_WIDGET_TITLE_BACKGROUND' ) ) define( 'ALLMED_WIDGET_TITLE_BACKGROUND', '#506774' ); if ( ! defined( 'ALLMED_FOOTER_BACKGROUND' ) ) define( 'ALLMED_FOOTER_BACKGROUND', '#506774' ); if ( ! defined( 'ALLMED_FOOTER_COLOR' ) ) define( 'ALLMED_FOOTER_COLOR', '#FFFFFF' ); if ( ! defined( 'ALLMED_WRAPPER_BACKGROUND' ) ) define( 'ALLMED_WRAPPER_BACKGROUND', '#FFFFFF' ); if ( ! defined( 'ALLMED_SINGLE_BACKGROUND' ) ) define( 'ALLMED_SINGLE_BACKGROUND', '#ebebee' ); if ( ! defined( 'ALLMED_SUBMIT_BACKGROUND' ) ) define( 'ALLMED_SUBMIT_BACKGROUND', '#ebebee' ); if ( ! defined( 'ALLMED_LINE_COLOR' ) ) define( 'ALLMED_LINE_COLOR', '#ebebee' ); if ( ! defined( 'ALLMED_MENU_BACKGROUND' ) ) define( 'ALLMED_MENU_BACKGROUND', '#ebebee' ); if ( ! defined( 'ALLMED_WIDGET_H' ) ) define( 'ALLMED_WIDGET_H', '#ffffff' ); if ( ! defined( 'ALLMED_ENTRY_LINK' ) ) define( 'ALLMED_ENTRY_LINK', '#eab910' ); if ( ! defined( 'ALLMED_ENTRY_TEXT' ) ) define( 'ALLMED_ENTRY_TEXT', '#000000' ); add_theme_support( 'post-formats', array( 'image', 'audio', 'video' ) ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size(270, 180, true); add_theme_support( 'custom-background' ); add_theme_support( 'automatic-feed-links' ); } add_action( 'after_setup_theme', 'allm_setup_theme' ); function allmed_widget_init() { register_sidebar(array( 'name' => 'Sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => 'Footer', 'before_widget' => ' ', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'allmed_widget_init' ); function allmed_get_option($Aoption_name, $default = null) { return stripslashes(get_option($Aoption_name, $default)); }; function allm_register_main_menus() { register_nav_menus( array( 'primary-menu' => __( 'Primary Menu', 'allmed' ) ) ); } if (function_exists('register_nav_menus')) add_action( 'init', 'allm_register_main_menus' ); function allm_get_the_author_posts_link(){ global $authordata, $themename; $link = sprintf( '', get_author_posts_url( $authordata->ID, $authordata->user_nicename ), esc_attr( sprintf( __( 'Posts by %s', $themename ), get_the_author() ) ), get_the_author() ); return apply_filters( 'the_author_posts_link', $link ); } function allm_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( __( 'Page %s', 'allmed' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'allm_wp_title', 10, 2 ); function allm_short_title($char) { global $post; $title = get_the_title($post->ID); $title = substr($title,0,$char); echo $title; } function allm_postinfo_meta( $postinfo, $date_format, $comment_zero, $comment_one, $comment_more ){ global $themename; $postinfo_meta = ''; if ( in_array( 'author', $postinfo ) ){ $postinfo_meta .= ' ' . esc_html__('By',$themename) . ' ' . allm_get_the_author_posts_link(); } if ( in_array( 'date', $postinfo ) ) $postinfo_meta .= ' ' . esc_html__('Date:',$themename) . ' ' . get_the_time( $date_format ); if ( in_array( 'categories', $postinfo ) ) $postinfo_meta .= ' ' . esc_html__('in',$themename) . ' ' . get_the_category_list(', '); if ( in_array( 'comments', $postinfo ) ) $postinfo_meta .= ' | ' . allm_get_comments_popup_link( $comment_zero, $comment_one, $comment_more ); echo $postinfo_meta; } function allm_get_comments_popup_link( $zero = false, $one = false, $more = false ){ global $themename; $id = get_the_ID(); $number = get_comments_number( $id ); if ( 0 == $number && !comments_open() && !pings_open() ) return; if ( $number > 1 ) $output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% Comments', $themename) : $more); elseif ( $number == 0 ) $output = ( false === $zero ) ? __('No Comments',$themename) : $zero; else // must be one $output = ( false === $one ) ? __('1 Comment', $themename) : $one; return '' . '' . apply_filters('comments_number', $output, $number) . '' . ''; } add_action('wp_head', 'allmed_head'); function allmed_head() { if (!is_admin()) { global $allmed_favicon_url; ?>
$value ) { if( isset( $allmed_options[$key] ) ) { $output[$key] = strip_tags( stripslashes( $allmed_options[ $key ] ) ); } } return apply_filters( 'allmed_options_validate', $output, $allmed_options ); } function allmed_general_options_input() { register_setting('allmed_general_options_page','allmed_general_options_page','allmed_options_validate'); } add_action( 'admin_init', 'allmed_general_options_input' ); function allmed_options_admin_menu() { $allmed_theme_page = add_theme_page(__("Allmed Options", 'allmed'), __("Allmed Options", 'allmed'), 'edit_theme_options', 'allmed_general_options_page', 'allmed_general_options_page'); if(!$allmed_theme_page) return; add_action('admin_print_styles-' . $allmed_theme_page, 'allmed_ilc_farbtastic_script'); }; add_action('admin_menu', 'allmed_options_admin_menu'); function allmed_ilc_farbtastic_script( $hook_suffix ) { wp_enqueue_style( 'farbtastic' ); wp_enqueue_script( 'farbtastic' ); }; function allmed_general_options_page() { global $_POST, $allmed_favicon_url, $allm_footer_text; if ( isset($_POST['update_options']) && $_POST['update_options'] == 'true' ) { allm_options_update(); };?>


Upload your favicon using WordPress Media Library and insert its URL here', 'allmed'), home_url().'/wp-admin/media-new.php'); ?>

  • - ID, '_et_allmed_audio_mp3_url', true ); $allm_audiolink_ogg = get_post_meta( $post->ID, '_et_allmed_audio_ogg_url', true ); $themepath = get_template_directory_uri(); ++$allm_jplayer_instances_on_page; ?>
    " class="jp-jplayer">
    " class="jp-audio">
    " > '' && get_option('allmed_integrate_singletop_enable') == 'on') echo(get_option('allmed_integration_single_top')); ?>

    '; ?>';?>

    ID, '_et_allmed_video_url', true); $video = $wp_embed->shortcode( '', $video ); $video = preg_replace('//','',$video); $video = preg_replace("/width=\"[0-9]*\"/", "width={$video_width}", $video); $video = preg_replace("/height=\"[0-9]*\"/", "height={$video_height}", $video); echo $video; ?>
    '

    '.esc_attr__('Pages','allmed').': ', 'after' => '

    ', 'next_or_number' => 'number')); ?>
    ←Older post')) ?>     →')) ?>
    '; if ( $bgcolor <> '' ) $style .= 'body { background-color: #' . esc_attr($bgcolor) . '; }'; if ( $bgtexture_url <> '' ) $style .= 'body { background-image: url(' . esc_attr($bgtexture_url) . '); }'; if ( $bgimage_url <> '' ) $style .= 'body { background-image: url(' . esc_attr($bgimage_url) . '); background-position: top center; background-repeat: no-repeat; }'; $style .= ''; if ( $bgcolor <> '' || $bgtexture_url <> '' || $bgimage_url <> '' ) echo $style; } /** * Take all images from post */ function allm_catch_all_images() { global $post, $posts; ob_start(); ob_end_clean(); $output = preg_match_all('//i', $post->post_content, $matches); foreach ($matches[1] as $value) { ?>
  • $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order')); if ( ! is_array($attachments) ) continue; $count = count($attachments); $first_attachment = array_shift($attachments); $temp_img = wp_get_attachment_image_src($first_attachment->ID,'full'); $first_img = $temp_img[0]; if(empty($first_img)){ //Defines a default image $first_img = bloginfo('template_directory')."/img/default.jpg"; } return $first_img; } if ( !is_admin() ) { function register_my_js() { } add_action('init', 'register_my_js'); } ?>