'_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 '