WARNING: error defining Custom Field on Page with Posts.'); if (strlen($info) > 0) echo('More info: '.$info.'
'); } // # RUNTIME SAPI HELPER FUNCTIONS ============================================ function aspen_sapi_options_init() { /* this will initialize the SAPI stuff, must be called from the admin_init cb function . In reality, we really only need to register one setting - 'aspen_main_settings_group', and the settings will be saved in the WP DB as 'aspen_main_settings'. The SAPI uses the name param of any fields to figure out where to store the input value. The validation will have to scan the ENTIRE list of options and lookup the kind of validation each parameter needs. */ register_setting('aspen_settings_group', /* the group name of our settings */ apply_filters('aspen_options','aspen_settings'), /* the get_option name */ 'aspen_validate_cb'); /* a validation call back */ } function aspen_validate_cb($in) { // keep the definition in runtime, load as needed at admin time require_once( dirname( __FILE__ ) . '/lib-admin.php' ); return aspen_validate_all_options($in); } /* ================= nonce helpers ===================== */ function aspen_submitted($submit_name) { // do a nonce check for each form submit button // pairs 1:1 with aspen_nonce_field $nonce_act = $submit_name.'_act'; $nonce_name = $submit_name.'_nonce'; if (isset($_POST[$submit_name])) { if (isset($_POST[$nonce_name]) && wp_verify_nonce($_POST[$nonce_name],$nonce_act)) { return true; } else { die("WARNING: invalid form submit detected ($submit_name). Probably caused by session time-out, or, rarely, a failed security check. Please contact AspenTheme.com if you continue to receive this message."); } } else { return false; } } function aspen_nonce_field($submit_name,$echo = true) { // pairs 1:1 with sumbitted // will be one for each form submit button return wp_nonce_field($submit_name.'_act',$submit_name.'_nonce',$echo); } // # PAGE WITH POSTS ============================================================== function aspen_get_page() { /* get the current posts display number needed for when Page with Posts is front page */ $paged = get_query_var('paged'); if (!isset($paged) || empty($paged)) { $paged = 1; } $page = get_query_var( 'page' ); if ( $page > 1) $paged = $page; return $paged; } function aspen_setup_post_args($args) { /* setup WP_Query arg list */ $cats = aspen_get_page_categories(); if (!empty($cats)) $args['cat'] = $cats; $tags = aspen_get_page_tags(); if (!empty($tags)) $args['tag'] = $tags; $onepost = aspen_get_page_onepost(); if (!empty($onepost)) $args['name'] = $onepost; $orderby = aspen_get_page_orderby(); if (!empty($orderby)) $args['orderby'] = $orderby; $order = aspen_get_page_order(); if (!empty($order)) $args['order'] = $order; $author_name = aspen_get_page_author(); if (!empty($author_name)) { $nosp = str_replace(' ', '', $author_name); $id_list=str_replace(',','',$nosp); if (is_numeric($id_list)) { $args['author'] = $author_name; } else { $args['author_name'] = $author_name; } } $posts_per_page = aspen_get_page_posts_per(); if (!empty($posts_per_page)) $args['posts_per_page'] = $posts_per_page; $post_type = aspen_get_per_page_value('pp_post_type'); if ($post_type) $args['post_type'] = $post_type; if (aspen_is_checked_page_opt('pp_hide_sticky')) $args['ignore_sticky_posts'] = true; return $args; } function aspen_get_page_categories() { $cats = aspen_get_per_page_value('pp_category'); if (empty($cats)) return ''; // now convert slugs to ids return aspen_cat_slugs_to_ids($cats); } function aspen_cat_slugs_to_ids($cats) { if (empty($cats)) return ''; // now convert slugs to numbers $cats = str_replace(' ','',$cats); $clist = explode(',',$cats); // break into a list $cat_list = ''; foreach ($clist as $slug) { $neg = 1; // not negative if ($slug[0] == '-') { $slug = substr($slug,1); // zap the - $neg = -1; } if (strlen($slug) > 0 && is_numeric($slug)) { // allow both slug and id $cat_id = $neg * (int)$slug; if ($cat_list == '') $cat_list = strval($cat_id); else $cat_list .= ','.strval($cat_id); } else { $cur_cat = get_category_by_slug($slug); if ($cur_cat) { $cat_id = $neg * (int)$cur_cat->cat_ID; if ($cat_list == '') $cat_list = strval($cat_id); else $cat_list .= ','.strval($cat_id); } } } if (empty($cat_list)) $cat_list='99999999'; return $cat_list; } function aspen_get_page_tags() { $tags = aspen_get_per_page_value('pp_tag'); if (empty($tags)) return ''; return str_replace(' ','',$tags); } function aspen_get_page_onepost() { $the_post = aspen_get_per_page_value('pp_onepost'); if (empty($the_post)) return ''; return $the_post; } function aspen_get_page_orderby() { $orderby = aspen_get_per_page_value('pp_orderby'); if (empty($orderby)) return ''; if ($orderby == 'author' || $orderby == 'date' || $orderby == 'title' || $orderby == 'rand') return $orderby; aspen_page_posts_error('orderby must be author, date, title, or rand. You used: '. $orderby); return ''; } function aspen_get_page_order() { $order = aspen_get_per_page_value('pp_sort_order'); if (empty($order)) return ''; if ($order == 'ASC' || $order == 'DESC') return $order; aspen_page_posts_error('order value must be ASC or DESC. You used: '. $order); return ''; } function aspen_get_page_posts_per() { $ppp = aspen_get_per_page_value('pp_posts_per_page'); if (empty($ppp)) return ''; // now convert slugs to numbers return $ppp; } function aspen_get_page_author() { $author = aspen_get_per_page_value('pp_author'); if (empty($author)) return ''; return $author; } function aspen_add_q($q, $item, $tag='') { if ($item == '') return $q; if (!empty($q)) return $q . '&' . $tag . $item; else return $tag . $item; } // # FILTERS ============================================================== // ============ validation filters =============== function aspen_filter_textarea( $text ) { // virtually all option text input from Aspen can be code, and thus must not be // content filtered. Treat like code for now.... return aspen_filter_code($text); } function aspen_esc_textarea($text) { echo esc_textarea(stripslashes($text)); } function aspen_filter_code( $text ) { static $aspen_allowedadmintags = array( 'address' => array(), 'a' => array( 'class' => array (), 'href' => array (), 'id' => array (), 'title' => array (), 'rel' => array (), 'rev' => array (), 'name' => array (), 'target' => array()), 'abbr' => array( 'class' => array (), 'title' => array ()), 'acronym' => array( 'title' => array ()), 'article' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'aside' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'b' => array(), 'big' => array(), 'blockquote' => array( 'id' => array (), 'cite' => array (), 'class' => array(), 'lang' => array(), 'xml:lang' => array()), 'br' => array ( 'class' => array ()), 'button' => array( 'disabled' => array (), 'name' => array (), 'type' => array (), 'value' => array ()), 'caption' => array( 'align' => array (), 'class' => array ()), 'cite' => array ( 'class' => array(), 'dir' => array(), 'lang' => array(), 'title' => array ()), 'code' => array ( 'style' => array()), 'col' => array( 'align' => array (), 'char' => array (), 'charoff' => array (), 'span' => array (), 'dir' => array(), 'style' => array (), 'valign' => array (), 'width' => array ()), 'del' => array( 'datetime' => array ()), 'dd' => array(), 'details' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'open' => array (), 'style' => array (), 'xml:lang' => array(), ), 'div' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array()), 'dl' => array(), 'dt' => array(), 'em' => array(), 'fieldset' => array(), 'figure' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'figcaption' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'font' => array( 'color' => array (), 'face' => array (), 'size' => array ()), 'footer' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'form' => array( 'action' => array (), 'accept' => array (), 'accept-charset' => array (), 'enctype' => array (), 'method' => array (), 'name' => array (), 'target' => array ()), 'h1' => array( 'align' => array (), 'class' => array (), 'id' => array (), 'style' => array ()), 'h2' => array ( 'align' => array (), 'class' => array (), 'id' => array (), 'style' => array ()), 'h3' => array ( 'align' => array (), 'class' => array (), 'id' => array (), 'style' => array ()), 'h4' => array ( 'align' => array (), 'class' => array (), 'id' => array (), 'style' => array ()), 'h5' => array ( 'align' => array (), 'class' => array (), 'id' => array (), 'style' => array ()), 'h6' => array ( 'align' => array (), 'class' => array (), 'id' => array (), 'style' => array ()), 'header' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'hgroup' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'hr' => array ( 'align' => array (), 'class' => array (), 'noshade' => array (), 'size' => array (), 'width' => array ()), 'i' => array(), 'img' => array( 'alt' => array (), 'align' => array (), 'border' => array (), 'class' => array (), 'height' => array (), 'hspace' => array (), 'longdesc' => array (), 'vspace' => array (), 'src' => array (), 'style' => array (), 'width' => array ()), 'ins' => array( 'datetime' => array (), 'cite' => array ()), 'kbd' => array(), 'label' => array( 'for' => array ()), 'legend' => array( 'align' => array ()), 'li' => array ( 'align' => array (), 'class' => array ()), 'menu' => array ( 'class' => array (), 'style' => array (), 'type' => array ()), 'nav' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'p' => array( 'class' => array (), 'align' => array (), 'dir' => array(), 'lang' => array(), 'style' => array (), 'xml:lang' => array()), 'pre' => array( 'style' => array(), 'width' => array ()), 'q' => array( 'cite' => array ()), 's' => array(), //'script' => array(), // only admin or multi-site super-admin can add scripts 'span' => array ( 'class' => array (), 'dir' => array (), 'align' => array (), 'lang' => array (), 'style' => array (), 'title' => array (), 'xml:lang' => array()), 'section' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'strike' => array(), 'strong' => array(), 'style' => array(), 'sub' => array(), 'summary' => array( 'align' => array (), 'class' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array(), ), 'sup' => array(), 'table' => array( 'align' => array (), 'bgcolor' => array (), 'border' => array (), 'cellpadding' => array (), 'cellspacing' => array (), 'class' => array (), 'dir' => array(), 'id' => array(), 'rules' => array (), 'style' => array (), 'summary' => array (), 'width' => array ()), 'tbody' => array( 'align' => array (), 'char' => array (), 'charoff' => array (), 'valign' => array ()), 'td' => array( 'abbr' => array (), 'align' => array (), 'axis' => array (), 'bgcolor' => array (), 'char' => array (), 'charoff' => array (), 'class' => array (), 'colspan' => array (), 'dir' => array(), 'headers' => array (), 'height' => array (), 'nowrap' => array (), 'rowspan' => array (), 'scope' => array (), 'style' => array (), 'valign' => array (), 'width' => array ()), 'textarea' => array( 'cols' => array (), 'rows' => array (), 'disabled' => array (), 'name' => array (), 'readonly' => array ()), 'tfoot' => array( 'align' => array (), 'char' => array (), 'class' => array (), 'charoff' => array (), 'valign' => array ()), 'th' => array( 'abbr' => array (), 'align' => array (), 'axis' => array (), 'bgcolor' => array (), 'char' => array (), 'charoff' => array (), 'class' => array (), 'colspan' => array (), 'headers' => array (), 'height' => array (), 'nowrap' => array (), 'rowspan' => array (), 'scope' => array (), 'valign' => array (), 'width' => array ()), 'thead' => array( 'align' => array (), 'char' => array (), 'charoff' => array (), 'class' => array (), 'valign' => array ()), 'title' => array(), 'tr' => array( 'align' => array (), 'bgcolor' => array (), 'char' => array (), 'charoff' => array (), 'class' => array (), 'style' => array (), 'valign' => array ()), 'tt' => array(), 'u' => array(), 'ul' => array ( 'class' => array (), 'style' => array (), 'type' => array ()), 'ol' => array ( 'class' => array (), 'start' => array (), 'style' => array (), 'type' => array ()), 'var' => array ()); // virtually all option input from Aspen can be code, and thus must not be // content filtered. The utf8 check is about the extent of it, although even // that is more restrictive than the standard text widget uses. // Note: this check also works OK for simple checkboxes/radio buttons/selections, // so it is ok to blindly pass those options in here, too. $noslash = trim(stripslashes($text)); if ($noslash == ' ') return ''; if ( current_user_can('unfiltered_html') ) { return wp_check_invalid_utf8( $noslash ); } else if (current_user_can('add_users')) { return wp_kses( $text , $aspen_allowedadmintags); } else { return stripslashes( wp_filter_post_kses( addslashes($text) ) ); // wp_filter_post_kses() expects slashed } } // # MISC ============================================================== function aspen_media_lib_button($fillin = '') { ?>  ← media '; } function aspen_post_count_clear() { global $aspen_cur_post_count; $aspen_cur_post_count = 0; } function aspen_post_count_bump() { global $aspen_cur_post_count; $aspen_cur_post_count++; } function aspen_post_count() { global $aspen_cur_post_count; return $aspen_cur_post_count; } function aspen_post_count_class($hidecount = false) { global $aspen_cur_post_count; global $aspen_sticky; if ($aspen_sticky) // For page with posts - re-ordering sticky posts $postclass = 'sticky '; else $postclass = ' '; if ($aspen_cur_post_count == 0 || $hidecount) return $postclass; return $postclass . 'post-' . (($aspen_cur_post_count % 2) ? 'odd' : 'even') . ' post-order-' . $aspen_cur_post_count; } function aspen_hide_page_title() { if (aspen_is_checked_page_opt('pp_hide_page_title')) { echo ' aspen-hide'; // is included in a class= } } function aspen_allow_multisite() { // return true if it is allowed to use on MultiSite $restrict = (defined('ASPEN_MULTISITE_RESTRICT_OPTIONS')) ? ASPEN_MULTISITE_RESTRICT_OPTIONS : false; return ((!is_multisite() && current_user_can('install_themes')) || (is_multisite() && current_user_can('manage_network_themes')) || !$restrict); } function aspen_help_link($link, $info) { $t_dir = aspen_relative_url(''); $pp_help = '' . 'Click for help'; echo($pp_help); } function aspen_html_br() { echo '
'; } function aspen_compact_post() { return aspen_getopt('compact_post_formats') || aspen_is_checked_page_opt('pp_pwp_compact'); } function aspen_get_first_post_image($content='') { if (has_post_thumbnail()) { $img = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'medium' ); return ''; } if ($content == '') $content = do_shortcode(apply_filters( 'the_content', get_the_content(''))); // pick up wp 3.6 post format meta image if (preg_match('/]+>/i',$content, $images)) { // grab s $src = ''; if (preg_match('/src="([^"]*)"/', $images[0], $srcs)) { $src = $srcs[0]; } else if (preg_match("/src='([^']*)'/", $images[0], $srcs)) { $src = $srcs[0]; } return ''; } else { return ''; } } function aspen_compact_link($check = '') { if ($check == 'check' && !aspen_is_checked_post_opt('pp_post_add_link')) return; $link_img = aspen_relative_url('') . 'images/icons/expand.png'; ?>
'; $containerAfter = ''; $containerCrumb = ''; $containerCrumbEnd = ''; $delimiter = '→'; //' » '; $name = aspen_getopt('info_home_label') ? aspen_getopt('info_home_label') : __('Home','aspen'); //text for the 'Home' link $blogname = aspen_getopt('info_blog_label') ? aspen_getopt('info_blog_label') : __('Blog','aspen'); //text for the 'Blog' link $baseLink = ''; $hierarchy = ''; $currentLocation = ''; $currentBefore = ''; $currentAfter = ''; $currentLocationLink = ''; $crumbPagination = ''; global $post; $bc = ''; // Output the Base Link if (is_front_page() ) { $bc .= $currentBefore . $name . $currentAfter; } else { $home = home_url('/'); $baseLink = '' . $name . ''; $bc .= $baseLink; } // If static Page as Front Page, and on Blog Posts Index if ( is_home() && ( 'page' == get_option( 'show_on_front' ) ) ) { $bc .= $delimiter . $currentBefore . $blogname . $currentAfter; } // Aspen mod: check 'page_for_posts' when using PwP without setting blog host page // If static Page as Front Page, and on Blog, output Blog link if ( ! is_home() && ! is_page() && ! is_front_page() && ( 'page' == get_option( 'show_on_front' ) ) && get_option( 'page_for_posts' ) ) { $blogpageid = get_option( 'page_for_posts' ); $bloglink = '' . $blogname . ''; $bc .= $delimiter . $bloglink; } // Define Category Hierarchy Crumbs for Category Archive if ( is_category() ) { global $wp_query; if (is_object($wp_query->get_queried_object())) { $cat_obj = $wp_query->get_queried_object(); $thisCat = $cat_obj->term_id; $thisCat = get_category($thisCat); $parentCat = get_category($thisCat->parent); if ($thisCat->parent != 0) { $hierarchy = ( $delimiter . __( 'Categories','aspen') . ' ' . get_category_parents( $parentCat, TRUE, $delimiter ) ); } else { $hierarchy = $delimiter . __( 'Categories','aspen') . ' '; } } else { $hierarchy = ''; } // Set $currentLocation to the current category $currentLocation = single_cat_title( '' , FALSE ); } // Define Crumbs for Day/Year/Month Date-based Archives elseif ( is_date() ) { // Define Year/Month Hierarchy Crumbs for Day Archive if ( is_day() ) { $date_string = '' . get_the_time('Y') . ' ' . $delimiter . ' ' . '' . get_the_time('F') . ' '; $date_string .= $delimiter . ' '; $currentLocation = get_the_time('d'); } // Define Year Hierarchy Crumb for Month Archive elseif ( is_month() ) { $date_string = '' . get_the_time('Y') . ' '; $date_string .= $delimiter . ' '; $currentLocation = get_the_time('F'); } // Set CurrentLocation for Year Archive elseif ( is_year() ) { $date_string = ''; $currentLocation = get_the_time('Y'); } $hierarchy = $delimiter . __( 'Published','aspen') . ' ' . $date_string ; } // Define Category Hierarchy Crumbs for Single Posts elseif ( is_single() && !is_attachment() ) { $cats = get_the_category(); if ($cats) $cur_cat = $cats[0]; else $cur_cat = ''; foreach ($cats as $cat) { $children = get_categories( array ('parent' => $cat->term_id )); if (count($children) == 0) { $cur_cat = $cat; break; } } if ($cur_cat) { $hierarchy = $delimiter . get_category_parents( $cur_cat, TRUE, $delimiter ); } else { $hierarchy = $delimiter . ''; } // Note: get_the_title() is filtered to output a // default title if none is specified $currentLocation = get_the_title(); } // Define Category and Parent Post Crumbs for Post Attachments elseif ( is_attachment() ) { $parent = get_post($post->post_parent); $cat_parents = ''; if ( get_the_category($parent->ID) ) { $cat = get_the_category($parent->ID); $cat = $cat ? $cat[0] : ''; $cat_parents = get_category_parents( $cat, TRUE, $delimiter ); } $hierarchy = $delimiter . $cat_parents . '' . $parent->post_title . ' ' . $delimiter; // Note: Titles are forced for attachments; the // filename will be used if none is specified $currentLocation = get_the_title(); } // Define Current Location for Parent Pages elseif ( ! is_front_page() && is_page() && ! $post->post_parent ) { $hierarchy = $delimiter; // Note: get_the_title() is filtered to output a // default title if none is specified $currentLocation = get_the_title(); } // Define Parent Page Hierarchy Crumbs for Child Pages elseif ( ! is_front_page() && is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '' . get_the_title($page->ID) . ''; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); foreach ($breadcrumbs as $crumb) { $hierarchy = $hierarchy . $delimiter . $crumb; } $hierarchy = $hierarchy . $delimiter; // Note: get_the_title() is filtered to output a // default title if none is specified $currentLocation = get_the_title(); } // Define current location for Search Results page elseif ( is_search() ) { $hierarchy = $delimiter . __('Search Results','aspen') . ' '; $currentLocation = get_search_query(); } // Define current location for Tag Archives elseif ( is_tag() ) { $hierarchy = $delimiter . __( 'Tags','aspen') . ' '; $currentLocation = single_tag_title( '' , FALSE ); } // Define current location for Author Archives elseif ( is_author() ) { $hierarchy = $delimiter . __( 'Author','aspen') . ' '; $currentLocation = get_the_author_meta( 'display_name', get_query_var( 'author' ) ); } // Define current location for 404 Error page elseif ( is_404() ) { $hierarchy = $delimiter . __( '404','aspen') . ' '; $currentLocation = __( 'Page not found','aspen'); } // Define current location for Post Format Archives elseif ( get_post_format() && ! is_home() ) { $hierarchy = $delimiter . __( 'Post Formats','aspen') . ' '; $currentLocation = get_post_format_string( get_post_format() ) . 's'; } // Build the Current Location Link markup $currentLocationLink = $currentBefore . $currentLocation . $currentAfter; // Define breadcrumb pagination // Define pagination for paged Archive pages if ( get_query_var('paged') && ! function_exists( 'wp_paginate' ) ) { $crumbPagination = ' - ' . __('Page','aspen') . ' ' . get_query_var('paged'); } // Define pagination for Paged Posts and Pages if ( get_query_var('page') ) { $crumbPagination = ' - ' . __('Page','aspen') . ' ' . get_query_var('page') . ' '; } // Output the resulting Breadcrumbs $bc .= $hierarchy; // Output Hierarchy $bc .= $currentLocationLink; // Output Current Location $bc .= $crumbPagination; // Output page number, if Post or Page is paginated if (is_rtl()) { $list = explode($delimiter,$bc); // split on the arrow $list = array_reverse($list); $larrow = '←'; $bc = implode($larrow,$list); } // Wrap crumbs $bc = $containerBefore . $containerCrumb . $bc . $containerCrumbEnd . $containerAfter; if ($echo) echo $bc; else return $bc; return ''; } } /** * Paginate Archive Index Page Links * * Code based on codex examples */ if (!function_exists('aspen_get_paginate_archive_page_links')) { function aspen_get_paginate_archive_page_links( $type = 'plain', $endsize = 1, $midsize = 1 ) { global $wp_query, $wp_rewrite; $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1; // Sanitize input argument values if ( ! in_array( $type, array( 'plain', 'list', 'array' ) ) ) $type = 'plain'; $endsize = (int) $endsize; $midsize = (int) $midsize; $big = 999999999; // from codex - an unlikely number, then str_replace. Makes archive no permalinks work if (is_search()) { // works for search on non-permalinks... $base = '%_%'; } else { $base = str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ); } // Setup argument array for paginate_links() $pagination = array( 'base' => $base, 'format' => '?paged=%#%', 'total' => $wp_query->max_num_pages, 'current' => $current, 'show_all' => false, 'end_size' => $endsize, 'mid_size' => $midsize, 'type' => $type, 'prev_text' => '<<', 'next_text' => '>>' ); if ( !empty($wp_query->query_vars['s']) ) $pagination['add_args'] = array( 's' => get_query_var( 's' ) ); return paginate_links( $pagination ); } } // # MOBILE =================================================================== function aspen_use_sf() { return aspen_getopt('use_superfish'); } // ============================ MOBILE MENU ====================================== function aspen_mobile_menu_bar($mobile_id, $menu_id, $nohome = '') { // alternatives for slide open menu $home = aspen_getopt('mobile_slide_home_label'); if (!$home) $home = __('Home','aspen'); $menu_label = ($nohome != 'no-home') ? aspen_getopt('mobile_slide_nav_label') : aspen_getopt('mobile_slide_nav_label_sec') ; // use 'mobile_slide_nav_label_sec' for top menu if (!$menu_label) $menu_label = __('Menu','aspen'); $img_hide = $menu_label . ' ↑'; $img_show = $menu_label . ' ↓'; $img_toggle = $img_show; ?>
'; break; case 'begin-post' : // wrap one post global $aspen_cur_post_id; $aspen_cur_post_id = get_the_ID();// we need to know now if (aspen_is_checked_post_opt('pp_masonry_span2')) { // span 2 columns $usem .= '-span-2'; } echo '
'; // for masonry break; case 'end-post': // end of one post echo "
\n"; break; case 'end-posts': // end of all posts echo ' ' . "\n"; break; case 'invoke-code': ?>