'
', 'after' => '
', 'allow_duplicates' => true, 'taxonomy' => 'category' ); $args = wp_parse_args($args, $defaults); $args['name'] = $name; $args['callback'] = $callback; $arras_tapestries[$id] = (object) $args; } /** * Function to remove posts views from the system. * @since 1.4.3 */ function arras_remove_tapestry($id) { global $arras_tapestries; unset($arras_tapestries[$id]); } /** * Removes all posts display types from the system. * @since 1.4.3 */ function arras_remove_all_tapestries() { global $arras_tapestries; $arras_tapestries = array(); } /** * Gets tapestry callback function * @since 1.4.4 */ function arras_get_tapestry_callback($type, $query, $taxonomy = 'category') { global $arras_tapestries; if ( count($arras_tapestries) == 0 ) return false; if ( $arras_tapestries[$type] ) { $tapestry = $arras_tapestries[$type]; } else { $arr = array_values($arras_tapestries); $tapestry = $arr[0]; } echo $tapestry->before; while ($query->have_posts()) { $query->the_post(); call_user_func_array( $tapestry->callback, array($dep = '', $taxonomy) ); if ($tapestry->allow_duplicates) arras_blacklist_duplicates(); } echo $tapestry->after; } /** * Traditional tapestry callback function. * @since 1.4.3 */ if (!function_exists('arras_tapestry_traditional')) { function arras_tapestry_traditional($dep = '', $taxonomy) { ?>
>
Read the rest of this entry »

', 'arras') ); ?>
'
', 'after' => '
' ) ); } /** * Per Line tapestry callback function. * @since 1.4.3 */ if (!function_exists('arras_tapestry_line')) { function arras_tapestry_line($dep = '', $taxonomy) { ?>
  • > name; else echo $terms[0]->name; } ?>

  • '' ) ); } /** * Node Based tapestry callback function. * @since 1.4.3 */ if (!function_exists('arras_tapestry_default')) { function arras_tapestry_default($dep = '', $taxonomy) { $tapestry_settings = get_option('arras_tapestry_default'); if (!is_array($tapestry_settings) ) { $tapestry_settings = arras_defaults_tapestry_default(); } ?>
  • >
  • '' ) ); add_action('arras_add_default_thumbnails', 'arras_add_tapestry_default_thumbs'); add_action('arras_admin_settings-layout', 'arras_admin_tapestry_default'); add_action('arras_admin_save', 'arras_save_tapestry_default'); add_action('arras_options_defaults', 'arras_defaults_tapestry_default'); add_action('arras_custom_styles', 'arras_style_tapestry_default'); } function arras_add_tapestry_default_thumbs() { $layout = arras_get_option('layout'); if ( strpos($layout, '1c') !== false ) { $size = array(215, 120); } else if ( strpos($layout, '3c') !== false ) { $size = array(230, 130); } else { $size = array(195, 110); } arras_add_image_size( 'node-based-thumb', __('Tapestry: Node-Based', 'arras'), $size[0], $size[1] ); } function arras_admin_tapestry_default() { $tapestry_settings = get_option('arras_tapestry_default'); if (!is_array($tapestry_settings) ) { $tapestry_settings = arras_defaults_tapestry_default(); } ?>

    'arras-tapestry-default-height', 'id' => 'arras-tapestry-default-height', 'size' => '5', 'value' => $tapestry_settings['height'], 'maxlength' => 3 )) ?>
    (int)$_POST['arras-tapestry-default-height'], 'excerpt' => isset($_POST['arras-tapestry-default-excerpt']) ); update_option('arras_tapestry_default', $_tapestry_default_settings); } function arras_defaults_tapestry_default() { $_tapestry_default_settings = array( 'height' => 225, 'excerpt' => true ); add_option('arras_tapestry_default', $_tapestry_default_settings, '', 'yes'); return $_tapestry_default_settings; } function arras_style_tapestry_default() { $tapestry_settings = get_option('arras_tapestry_default'); $height = (!isset($tapestry_settings['height']) ) ? 225 : $tapestry_settings['height']; $node_based_size = arras_get_image_size('node-based-thumb'); $node_based_w = $node_based_size['w']; $node_based_h = $node_based_size['h']; ?> .posts-default li { width: px; height: px; } .posts-default img, .posts-default .entry-thumbnails-link { width: px; height: px; } .posts-default .entry-meta { width: px; } .posts-default .entry-thumbnails { width: px; height: px; }
  • >

  • '' ) ); function arras_add_tapestry_quick_thumbs() { arras_add_image_size( 'quick-preview-thumb', __('Tapestry: Quick Preview', 'arras'), 115, 115 ); } add_action('arras_add_default_thumbnails', 'arras_add_tapestry_quick_thumbs'); function arras_style_tapestry_quick() { $quick_preview_size = arras_get_image_size('quick-preview-thumb'); $quick_preview_w = $quick_preview_size['w']; $quick_preview_h = $quick_preview_size['h']; ?> .posts-quick .entry-thumbnails img { width: px; height: px; } .posts-quick .entry-meta { width: px; } '; $postheader .= ''; $postheader .= arras_get_thumbnail($tapestry . '-thumb'); if ($show_meta) { $postheader .= '' . get_comments_number() . ''; $postheader .= '' . get_the_time( get_option('date_format') ) . ''; } $postheader .= ''; $postheader .= ''; $postheader .= '

    ' . get_the_title() . '

    '; return $postheader; } /* End of file tapestries.php */ /* Location: ./library/tapestries.php */