'_arixwp_custom_background_cb' , 'admin-head-callback' => '', 'admin-preview-callback' => '', ) ); } else { add_custom_background( '_arixwp_custom_background_cb' ); } // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // Add Editor Style add_editor_style(); // Add a way for the custom header to be styled in the admin panel that controls // custom headers. See arixwp_admin_header_style(), below. if( is_wp_version( '3.4' ) ) { add_theme_support( 'custom-header', array( 'wp-head-callback' => 'arixwp_admin_header_style' ) ); } else { add_custom_image_header( 'arixwp_admin_header_style', 'arixwp_admin_header_style' ); } } add_action( 'after_setup_theme', 'arixwp_setup' ); // Set the default post thumbnail size. if ( is_admin() && isset($_GET['activated'] ) && $pagenow == 'themes.php' ){ global $wpdb; $wpdb->query( 'UPDATE ' . $wpdb->options . ' SET option_value = ' . ARIXWP_POPTROX_W . ' WHERE option_name = "thumbnail_size_w" ' ); $wpdb->query( 'UPDATE ' . $wpdb->options . ' SET option_value = ' . ARIXWP_POPTROX_H . ' WHERE option_name = "thumbnail_size_h" ' ); } // Copy the style into the header function arixwp_admin_header_style() { if ( get_header_image() != get_template_directory_uri() . ARIXWP_HDR_DFLT ) { ?> $num, 'offset' => $offset, 'orderby' => 'post_date', 'order' => 'DESC', ); $recent_posts = get_posts( $args ); $numposts = count($recent_posts); foreach( $recent_posts as $post ) { setup_postdata($post); switch ($location) { // Post display options case 'homeSingle': break; case 'sidebar': // Limit the title to 25 characters to not cause ugly line breaks. if (strlen($post->post_title) > 25) { $title = substr( get_the_title( $before = '', $after = '', FALSE ), 0, 25 ) . '...'; } else { $title = get_the_title(); } echo '
  • '; if ( has_post_thumbnail( $post->ID ) ) { $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts( $args ); if ($attachments) { foreach ( $attachments as $attachment ) { $featured_id = get_post_thumbnail_id( $post->ID ); if ( $attachment->ID == $featured_id ) { if ( is_multisite() ) { global $blog_id; $string = '/files'; $replace = '/wp-content/blogs.dir/' . $blog_id . '/files'; $thumbnailsrc = str_replace( $string, $replace, $attachment->guid ); } else { $thumbnailsrc = $attachment->guid; } } } } $realthumb = get_template_directory_uri() . '/libs/resizurr.php?m=shcw&a=' . ARIXWP_POPTROX_ANCHOR . '&w=83&h=83&q=' . ARIXWP_POPTROX_QUALITY . '&src=' . $thumbnailsrc; echo ''; echo ''; echo ''; } $excerpt = limit_chars( get_the_excerpt(), 120 ); echo '

    ' . $excerpt . '…

    '; echo '
  • '; break; } } } ?>