$str ) { if ( strstr( $str, ">$current_cat<" ) ) { unset($cats[$i]); break; } } if ( empty($cats) ) return false; return trim(join( $glue, $cats )); } // end cats_meow // For tag lists on tag archives: Returns other tags except the current one (redundant) function tag_ur_it($glue) { $current_tag = single_tag_title( '', '', false ); $separator = "\n"; $tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) ); foreach ( $tags as $i => $str ) { if ( strstr( $str, ">$current_tag<" ) ) { unset($tags[$i]); break; } } if ( empty($tags) ) return false; return trim(join( $glue, $tags )); } // end tag_ur_it // Register widgetized areas function theme_widgets_init() { // Area 1 register_sidebar( array ( 'name' => 'Primary Widget Area', 'id' => 'primary_widget_area', 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 2 register_sidebar( array ( 'name' => 'Secondary Widget Area', 'id' => 'secondary_widget_area', 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); // FOOTER WIDGET AREA 1 register_sidebar( array ( 'name' => 'Footer Widget 1', 'id' => 'footer_widget_1', 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); // FOOTER WIDGET AREA 2 register_sidebar( array ( 'name' => 'Footer Widget 2', 'id' => 'footer_widget_2', 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); // FOOTER WIDGET AREA 3 register_sidebar( array ( 'name' => 'Footer Widget 3', 'id' => 'footer_widget_3', 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); } // end theme_widgets_init add_action( 'init', 'theme_widgets_init' ); // Pre-set Widgets $preset_widgets = array ( 'primary_widget_area' => array( 'search', 'pages', 'categories', 'archives' ), 'secondary_widget_area' => array( 'links', 'meta' ) ); if ( isset( $_GET['activated'] ) ) { update_option( 'sidebars_widgets', $preset_widgets ); } // update_option( 'sidebars_widgets', NULL ); // Check for static widgets in widget-ready areas function is_sidebar_active( $index ){ global $wp_registered_sidebars; $widgetcolums = wp_get_sidebars_widgets(); if ($widgetcolums[$index]) return true; return false; } // end is_sidebar_active // Produces an avatar image with the hCard-compliant photo class function commenter_link() { $commenter = get_comment_author_link(); if ( ereg( ']* class=[^>]+>', $commenter ) ) { $commenter = ereg_replace( '(]* class=[\'"]?)', '\\1url ' , $commenter ); } else { $commenter = ereg_replace( '(' . $commenter . ''; } // end commenter_link // Custom callback to list comments in the nanodesigns style function custom_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; $GLOBALS['comment_depth'] = $depth; ?>
  • >
    | Permalink', 'nanodesigns'), get_comment_date(), get_comment_time(), '#comment-' . get_comment_ID() ); edit_comment_link(__('Edit', 'nanodesigns'), ' | ', ''); ?>
    comment_approved == '0') _e("\t\t\t\t\tYour comment is awaiting moderation.\n", 'nanodesigns') ?>
    __('Reply','nanodesigns'), 'login_text' => __('Log in to reply.','nanodesigns'), 'depth' => $depth, 'before' => '' ))); endif; } // end custom_comments // Custom callback to list pings function custom_pings($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • >
    | ', ''); ?>
    comment_approved == '0') _e('\t\t\t\t\tYour trackback is awaiting moderation.\n', 'nanodesigns') ?>
    __('Primary Menu'), 'top'=>__('Top Menu'), ) ); /* ----------------------------------------------------------------- * CODE FOR ADMIN PANEL FOR THE THEME --------------------------------------------------------------------*/ //require_once('functions-admin.php'); /* ----------------------------------------------------------------- * CUSTOM FUNCTIONS --------------------------------------------------------------------*/ //require_once('functions-custom.php'); ?>