Trim trailing whites

git-svn-id: https://develop.svn.wordpress.org/trunk@13268 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-02-21 00:03:42 +00:00
parent 42c92f9fdc
commit f24e88359e
23 changed files with 570 additions and 570 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
$redirect['query'] = remove_query_arg( array( 'category_name', 'tag', 'cat', 'tag_id', 'term', 'taxonomy'), $redirect['query']);
if ( is_tax() ) { // Custom taxonomies will have a custom query var, remove those too:
$tax = get_taxonomy( $obj->taxonomy );
if ( false !== $tax->query_var)
if ( false !== $tax->query_var)
$redirect['query'] = remove_query_arg($tax->query_var, $redirect['query']);
}
+2 -2
View File
@@ -364,12 +364,12 @@ function wp_dropdown_categories( $args = '' ) {
$output = "<select name='$name' id='$name' class='$class' $tab_index_attribute>\n";
else
$output = '';
if ( empty($categories) && ! $r['hide_if_empty'] && !empty($show_option_none) ) {
$show_option_none = apply_filters( 'list_cats', $show_option_none );
$output .= "\t<option value='-1' selected='selected'>$show_option_none</option>\n";
}
if ( ! empty( $categories ) ) {
if ( $show_option_all ) {
+3 -3
View File
@@ -1469,13 +1469,13 @@ function comment_form( $args = array(), $post_id = null ) {
$defaults = array( 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<p class="comment-form-author">' .
'<label for="author">' . __( 'Name' ) . '</label> ' .
( $req ? '<span class="required">*</span>' : '' ) .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1"' . $aria_req . ' />' .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1"' . $aria_req . ' />' .
'</p><!-- #form-section-author .form-section -->',
'email' => '<p class="comment-form-email">' .
'<label for="email">' . __( 'Email' ) . '</label> ' .
( $req ? '<span class="required">*</span>' : '' ) .
'<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" tabindex="2"' . $aria_req . ' />' .
'</p><!-- #form-section-email .form-section -->',
'</p><!-- #form-section-email .form-section -->',
'url' => '<p class="comment-form-url">' .
'<label for="url">' . __( 'Website' ) . '</label>' .
'<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" />' .
@@ -1486,7 +1486,7 @@ function comment_form( $args = array(), $post_id = null ) {
'</p><!-- #form-section-comment .form-section -->',
'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></p>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ),
'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email is <em>never</em> published nor shared.' ) . ( $req ? __( ' Required fields are marked <span class="required">*</span>' ) : '' ) . '</p>',
'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email is <em>never</em> published nor shared.' ) . ( $req ? __( ' Required fields are marked <span class="required">*</span>' ) : '' ) . '</p>',
'comment_notes_after' => '<dl class="form-allowed-tags"><dt>' . __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:' ) . '</dt> <dd><code>' . allowed_tags() . '</code></dd></dl>',
'id_form' => 'commentform',
'id_submit' => 'submit',
+186 -186
View File
@@ -31,10 +31,10 @@ function wp_custom_navigation_get_menu_items( $menu_objects, $key = 'ID' ) {
}
function wp_custom_navigation_setup($override = false) {
$nav_version = '1.1.0';
//Custom Navigation Menu Setup
//Check for Upgrades
if (get_option('wp_settings_custom_nav_version') <> '') {
$nav_version_in_db = get_option('wp_settings_custom_nav_version');
@@ -42,11 +42,11 @@ function wp_custom_navigation_setup($override = false) {
else {
$nav_version_in_db = '0';
}
//Override for menu descriptions
update_option('wp_settings_custom_nav_advanced_options','yes');
if(($nav_version_in_db <> $nav_version) || ($override))
if(($nav_version_in_db <> $nav_version) || ($override))
update_option('wp_settings_custom_nav_version',$nav_version);
$custom_menus = get_terms( 'menu', array( 'hide_empty' => false ) );
@@ -84,20 +84,20 @@ function wp_custom_navigation_setup($override = false) {
/*-----------------------------------------------------------------------------------*/
function wp_custom_navigation_output($args = array()) {
//DEFAULT ARGS
$type = 'frontend';
$name = 'Menu 1';
$name = 'Menu 1';
$id = 0;
$desc = 2;
$before_title = '';
$after_title = '';
if (isset($args)) {
if ( !is_array($args) )
if ( !is_array($args) )
parse_str( $args, $args );
extract($args);
}
@@ -109,7 +109,7 @@ function wp_custom_navigation_output($args = array()) {
{
$desc = 2;
}
$queried_id = 0;
global $wp_query;
if ( is_page() )
@@ -145,14 +145,14 @@ function wp_custom_navigation_output($args = array()) {
$link = get_category_link( $menu_item->post_parent );
else
$link = $menu_item->guid;
if ( $menu_item->post_title == '' ) {
$title_raw = get_categories( 'include='.$menu_item->post_parent );
$title = htmlentities($title_raw[0]->cat_name);
$title = htmlentities($title_raw[0]->cat_name);
} else {
$title = htmlentities( $menu_item->post_title );
}
if ( $menu_item->post_content == '' )
$description = htmlentities( strip_tags( category_description( $menu_item->post_parent ) ) );
else
@@ -176,14 +176,14 @@ function wp_custom_navigation_output($args = array()) {
else {
$anchor_title = $title;
}
if ($queried_id == $wp_custom_nav_menu_items->post_id) {
$li_class = 'class="current_page_item"';
}
else {
$li_class = '';
}
if (isset($wp_custom_nav_menu_items->new_window)) {
if ($wp_custom_nav_menu_items->new_window > 0) {
$target = 'target="_blank"';
@@ -192,30 +192,30 @@ function wp_custom_navigation_output($args = array()) {
$target = '';
}
}
*/
*/
//List Items
?><li id="menu-<?php echo $menu_item->ID; ?>" value="<?php echo $menu_item->ID; ?>" <?php echo $li_class; ?>><?php
//@todo: update front end to use post data
//FRONTEND Link
if ($type == "frontend")
{
?><a title="<?php echo $anchor_title; ?>" href="<?php echo $link; ?>" <?php echo $target; ?>><?php echo $before_title.$title.$after_title; ?><?php
if ( $advanced_option_descriptions == 'no' )
{
{
?><a title="<?php echo $anchor_title; ?>" href="<?php echo $link; ?>" <?php echo $target; ?>><?php echo $before_title.$title.$after_title; ?><?php
if ( $advanced_option_descriptions == 'no' )
{
// 2 widget override do NOT display descriptions
// 1 widget override display descriptions
// 0 widget override not set
if (($desc == 1) || ($desc == 0) )
{
?><span class="nav-description"><?php echo $description; ?></span><?php
}
}
elseif ($desc == 2)
{ }
else
{ }
}
else
}
else
{
// 2 widget override do NOT display descriptions
// 1 widget override display descriptions
@@ -223,21 +223,21 @@ function wp_custom_navigation_output($args = array()) {
if ($desc == 1)
{
?><span class="nav-description"><?php echo $description; ?></span><?php
}
}
elseif (($desc == 2) || ($desc == 0))
{ }
else
else
{ }
}
?></a><?php
?></a><?php
}
//BACKEND draggable and droppable elements
elseif ($type == "backend")
$link_type = substr( $menu_item->post_status, 5 );
{
?>
<dl>
<dt>
<span class="title"><?php echo $title; ?></span>
@@ -249,7 +249,7 @@ function wp_custom_navigation_output($args = array()) {
</span>
</dt>
</dl>
<a><span class=""></span></a>
<input type="hidden" name="dbid<?php echo $menu_item->menu_order; ?>" id="dbid<?php echo $menu_item->menu_order; ?>" value="<?php echo $menu_item->ID; ?>" />
<input type="hidden" name="postmenu<?php echo $menu_item->menu_order; ?>" id="postmenu<?php echo $menu_item->menu_order; ?>" value="<?php echo $id; ?>" />
@@ -262,44 +262,44 @@ function wp_custom_navigation_output($args = array()) {
<input type="hidden" name="linktype<?php echo $menu_item->menu_order; ?>" id="linktype<?php echo $menu_item->menu_order; ?>" value="<?php echo $link_type; ?>" />
<input type="hidden" name="anchortitle<?php echo $menu_item->menu_order; ?>" id="anchortitle<?php echo $menu_item->menu_order; ?>" value="<?php echo esc_html( $menu_item->post_excerpt ); ?>" />
<input type="hidden" name="newwindow<?php echo $menu_item->menu_order; ?>" id="newwindow<?php echo $menu_item->menu_order; ?>" value="<?php echo ( '' == $menu_item->post_content_filtered ? '0' : '1' ); ?>" />
<?php
<?php
}
//@todo: implement menu heirarchy
/* //DISPLAY menu sub items
if ($wp_custom_nav_menu_items->parent_id == 0)
if ($wp_custom_nav_menu_items->parent_id == 0)
{
//FRONTEND
if ($type == 'frontend')
if ($type == 'frontend')
{
//Recursive function
$intj = wp_custom_navigation_sub_items($wp_custom_nav_menu_items->id,$wp_custom_nav_menu_items->link_type,$table_name,$type,$wp_custom_nav_menu_id);
}
//BACKEND
else
else
{
//Recursive function
$intj = wp_custom_navigation_sub_items($wp_custom_nav_menu_items->id,$wp_custom_nav_menu_items->link_type,$table_name,$type,$id);
}
}
*/ ?></li>
<?php
<?php
}
}
//@todo: implement menu heirarchy
//RECURSIVE Sub Menu Items
function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,$menu_id = 0) {
$parent_id = 0;
global $wpdb;
//GET sub menu items
$wp_custom_nav_menu = $wpdb->get_results("SELECT id,post_id,parent_id,position,custom_title,custom_link,custom_description,menu_icon,link_type,custom_anchor_title,new_window FROM ".$table_name." WHERE parent_id = '".$post_id."' AND menu_id='".$menu_id."' ORDER BY position ASC");
if (empty($wp_custom_nav_menu))
{
}
else
{
@@ -317,26 +317,26 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
}
//DISPLAY Loop
foreach ($wp_custom_nav_menu as $sub_item)
foreach ($wp_custom_nav_menu as $sub_item)
{
//Figure out where the menu item sits
$counter=$sub_item->position;
//Prepare Menu Data
//Category Menu Item
if ($sub_item->link_type == 'category')
if ($sub_item->link_type == 'category')
{
$parent_id = $sub_item->parent_id;
$post_id = $sub_item->post_id;
if ($sub_item->custom_link == '') {
$link = get_category_link($sub_item->post_id);
}
else {
$link = $sub_item->custom_link;
}
if ($sub_item->custom_title == '') {
$title_raw = get_categories('include='.$sub_item->post_id);
$title = htmlentities($title_raw[0]->cat_name);
@@ -344,7 +344,7 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
else {
$title = htmlentities($sub_item->custom_title);
}
if ($sub_item->custom_description == '') {
$description = strip_tags(category_description($sub_item->post_id));
}
@@ -356,10 +356,10 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
//Page Menu Item
elseif ($sub_item->link_type == 'page')
{
$parent_id = $sub_item->parent_id;
$post_id = $sub_item->post_id;
if ($sub_item->custom_link == '') {
$link = get_permalink($sub_item->post_id);
}
@@ -373,7 +373,7 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
else {
$title = htmlentities($sub_item->custom_title);
}
if ($sub_item->custom_description == '') {
$description = get_post_meta($sub_item->post_id, 'page-description', true);
}
@@ -381,7 +381,7 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
$description = $sub_item->custom_description;
}
$target = '';
}
//Custom Menu Item
else
@@ -399,7 +399,7 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
else {
$li_class = '';
}
//SET anchor title
if (isset($sub_item->custom_anchor_title)) {
$anchor_title = htmlentities($sub_item->custom_anchor_title);
@@ -407,19 +407,19 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
else {
$anchor_title = $title;
}
if (isset($sub_item->new_window)) {
if ($sub_item->new_window > 0) {
$target = 'target="_blank"';
}
}
//List Items
?><li id="menu-<?php echo $counter; ?>" value="<?php echo $counter; ?>" <?php echo $li_class; ?>><?php
?><li id="menu-<?php echo $counter; ?>" value="<?php echo $counter; ?>" <?php echo $li_class; ?>><?php
//FRONTEND
if ($output_type == "frontend")
{
?><a title="<?php echo $anchor_title; ?>" href="<?php echo $link; ?>" <?php echo $target; ?>><?php echo $title; ?></a><?php
?><a title="<?php echo $anchor_title; ?>" href="<?php echo $link; ?>" <?php echo $target; ?>><?php echo $title; ?></a><?php
}
//BACKEND
elseif ($output_type == "backend")
@@ -430,7 +430,7 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
<span class="title"><?php echo $title; ?></span>
<span class="controls">
<span class="type"><?php echo $sub_item->link_type; ?></span>
<a id="edit<?php echo $counter; ?>" onclick="edititem(<?php echo $counter; ?>)" value="<?php echo $counter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="edit<?php echo $counter; ?>" onclick="edititem(<?php echo $counter; ?>)" value="<?php echo $counter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="remove<?php echo $counter; ?>" onclick="removeitem(<?php echo $counter; ?>)" value="<?php echo $counter; ?>"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-close.png" /></a>
<a id="view<?php echo $counter; ?>" target="_blank" href="<?php echo $link; ?>"><img alt="View Page" title="View Page" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-viewpage.png" /></a>
</span>
@@ -448,23 +448,23 @@ function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,
<input type="hidden" name="linktype<?php echo $counter; ?>" id="linktype<?php echo $counter; ?>" value="<?php echo $sub_item->link_type; ?>" />
<input type="hidden" name="anchortitle<?php echo $counter; ?>" id="anchortitle<?php echo $counter; ?>" value="<?php echo $anchor_title; ?>" />
<input type="hidden" name="newwindow<?php echo $counter; ?>" id="newwindow<?php echo $counter; ?>" value="<?php echo $sub_item->new_window; ?>" />
<?php
<?php
}
//Do recursion
wp_custom_navigation_sub_items($sub_item->id,$sub_item->link_type,$table_name,$output_type,$menu_id);
wp_custom_navigation_sub_items($sub_item->id,$sub_item->link_type,$table_name,$output_type,$menu_id);
?></li>
<?php
}
<?php
}
?></ul>
<?php
}
<?php
}
return $parent_id;
}
@@ -485,19 +485,19 @@ function wp_custom_nav_get_pages($counter,$type) {
'exclude_tree' => '',
'number' => '',
'offset' => 0 );
//GET all pages
//GET all pages
$pages_array = get_pages($pages_args);
$intCounter = $counter;
$parentli = $intCounter;
if ($pages_array)
{
//DISPLAY Loop
foreach ($pages_array as $post)
{
if ($post->post_parent == 0)
{
//Custom Menu
@@ -505,15 +505,15 @@ function wp_custom_nav_get_pages($counter,$type) {
{
$description = get_post_meta($post->ID, 'page-description', true);
?>
<li id="menu-<?php echo $intCounter; ?>" value="<?php echo $intCounter; ?>">
<dl>
<dt>
<span class="title"><?php echo $post->post_title; ?></span>
<span class="controls">
<span class="type">page</span>
<a id="edit<?php echo $intCounter; ?>" onclick="edititem(<?php echo $intCounter; ?>)" value="<?php echo $intCounter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="edit<?php echo $intCounter; ?>" onclick="edititem(<?php echo $intCounter; ?>)" value="<?php echo $intCounter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="remove<?php echo $intCounter; ?>" onclick="removeitem(<?php echo $intCounter; ?>)" value="<?php echo $intCounter; ?>">
<img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-close.png" />
</a>
@@ -521,7 +521,7 @@ function wp_custom_nav_get_pages($counter,$type) {
<img alt="View Page" title="View Page" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-viewpage.png" />
</a>
</span>
</dt>
</dl>
<a class="hide" href="<?php echo get_permalink($post->ID); ?>"><span class="title"><?php echo $post->post_title; ?></span>
@@ -536,26 +536,26 @@ function wp_custom_nav_get_pages($counter,$type) {
<input type="hidden" name="linktype<?php echo $intCounter; ?>" id="linktype<?php echo $intCounter; ?>" value="page" />
<input type="hidden" name="anchortitle<?php echo $intCounter; ?>" id="anchortitle<?php echo $intCounter; ?>" value="<?php echo htmlentities($post->post_title); ?>" />
<input type="hidden" name="newwindow<?php echo $intCounter; ?>" id="newwindow<?php echo $intCounter; ?>" value="0" />
<?php $parentli = $post->ID; ?>
<?php $intCounter++; ?>
<?php $intCounter++; ?>
<?php
//Recursive function
$intCounter = wp_custom_navigation_default_sub_items($post->ID, $intCounter, $parentli, 'pages', 'menu');
?>
</li>
<?php
<?php
}
//Sidebar Menu
elseif ($type == 'default')
{
?>
<li>
<dl>
<dt>
@@ -564,36 +564,36 @@ function wp_custom_nav_get_pages($counter,$type) {
$post_url = get_permalink($post->ID);
$post_id = $post->ID;
$post_parent_id = $post->post_parent;
$description = htmlentities(get_post_meta($post_id, 'page-description', true));
?>
<?php $templatedir = get_bloginfo('url'); ?>
<span class="title"><?php echo $post->post_title; ?></span> <a onclick="appendToList('<?php echo $templatedir; ?>','Page','<?php echo $post_text; ?>','<?php echo $post_url; ?>','<?php echo $post_id; ?>','<?php echo $post_parent_id ?>','<?php echo $description; ?>')" name="<?php echo $post_text; ?>" value="<?php echo get_permalink($post->ID); ?>"><img alt="Add to Custom Menu" title="Add to Custom Menu" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-add.png" /></a></dt>
</dl>
<?php $parentli = $post->ID; ?>
<?php $intCounter++; ?>
<?php $intCounter++; ?>
<?php
//Recursive function
$intCounter = wp_custom_navigation_default_sub_items($post_id, $intCounter, $parentli, 'pages', 'default');
?>
</li>
<?php
<?php
}
else
{
}
}
}
}
}
}
}
else
else
{
echo 'Not Found';
}
@@ -616,14 +616,14 @@ function wp_custom_nav_get_categories($counter, $type) {
'include' => '',
'number' => '',
'pad_counts' => false );
$intCounter = $counter;
//GET all categories
$intCounter = $counter;
//GET all categories
$categories_array = get_categories($category_args);
if ($categories_array)
{
//DISPLAY Loop
@@ -636,14 +636,14 @@ function wp_custom_nav_get_categories($counter, $type) {
if ($type == 'menu')
{
?>
<li id="menu-<?php echo $intCounter; ?>" value="<?php echo $intCounter; ?>">
<dl>
<dt>
<span class="title"><?php echo $cat_item->cat_name; ?></span>
<span class="controls">
<span class="type">category</span>
<a id="edit<?php echo $intCounter; ?>" onclick="edititem(<?php echo $intCounter; ?>)" value="<?php echo $intCounter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="edit<?php echo $intCounter; ?>" onclick="edititem(<?php echo $intCounter; ?>)" value="<?php echo $intCounter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="remove<?php echo $intCounter; ?>" onclick="removeitem(<?php echo $intCounter; ?>)" value="<?php echo $intCounter; ?>">
<img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-close.png" />
</a>
@@ -651,11 +651,11 @@ function wp_custom_nav_get_categories($counter, $type) {
<img alt="View Page" title="View Page" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-viewpage.png" />
</a>
</span>
</dt>
</dl>
<a class="hide" href="<?php echo get_category_link($cat_item->cat_ID); ?>"><span class="title"><?php echo $cat_item->cat_name; ?></span>
<?php
<?php
$use_cats_raw = get_option('wp_settings_custom_nav_descriptions');
$use_cats = strtolower($use_cats_raw);
if ($use_cats == 'yes') { ?>
@@ -672,19 +672,19 @@ function wp_custom_nav_get_categories($counter, $type) {
<input type="hidden" name="linktype<?php echo $intCounter; ?>" id="linktype<?php echo $intCounter; ?>" value="category" />
<input type="hidden" name="anchortitle<?php echo $intCounter; ?>" id="anchortitle<?php echo $intCounter; ?>" value="<?php echo htmlentities($cat_item->cat_name); ?>" />
<input type="hidden" name="newwindow<?php echo $intCounter; ?>" id="newwindow<?php echo $intCounter; ?>" value="0" />
<?php $parentli = $cat_item->cat_ID; ?>
<?php $intCounter++; ?>
<?php $intCounter++; ?>
<?php
//Recursive function
$intCounter = wp_custom_navigation_default_sub_items($cat_item->cat_ID, $intCounter, $parentli, 'categories','menu');
?>
</li>
<?php
<?php
}
//Sidebar Menu
elseif ($type == 'default')
@@ -704,24 +704,24 @@ function wp_custom_nav_get_categories($counter, $type) {
<span class="title"><?php echo $cat_item->cat_name; ?></span> <a onclick="appendToList('<?php echo $templatedir; ?>','Category','<?php echo $post_text; ?>','<?php echo $post_url; ?>','<?php echo $post_id; ?>','<?php echo $post_parent_id ?>','<?php echo $description; ?>')" name="<?php echo $post_text; ?>" value="<?php echo $post_url; ?>"><img alt="Add to Custom Menu" title="Add to Custom Menu" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-add.png" /></a> </dt>
</dl>
<?php $parentli = $cat_item->cat_ID; ?>
<?php $intCounter++; ?>
<?php
<?php $intCounter++; ?>
<?php
//Recursive function
$intCounter = wp_custom_navigation_default_sub_items($cat_item->cat_ID, $intCounter, $parentli, 'categories','default');
?>
</li>
<?php
}
}
<?php
}
}
}
}
else
else
{
echo 'Not Found';
}
return $intCounter;
}
@@ -729,9 +729,9 @@ function wp_custom_nav_get_categories($counter, $type) {
function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli, $type, $output_type) {
$counter = $intCounter;
//Custom Menu
if ($output_type == 'menu')
if ($output_type == 'menu')
{
$sub_args = array(
'child_of' => $childof,
@@ -739,43 +739,43 @@ function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli
'parent' => $childof);
}
//Sidebar Menu
elseif ($output_type == 'default')
elseif ($output_type == 'default')
{
$sub_args = array(
'child_of' => $childof,
'hide_empty' => false,
'parent' => $childof);
}
else
else
{
}
//Get Sub Category Items
//Get Sub Category Items
if ($type == 'categories')
{
$sub_array = get_categories($sub_args);
$sub_array = get_categories($sub_args);
}
//Get Sub Page Items
elseif ($type == 'pages')
{
$sub_array = get_pages($sub_args);
}
if ($sub_array)
{
?>
<ul id="sub-custom-nav-<?php echo $type ?>">
<?php
//DISPLAY Loop
foreach ($sub_array as $sub_item)
{
//Prepare Menu Data
//Category Menu Item
if ($type == 'categories')
if ($type == 'categories')
{
$link = get_category_link($sub_item->cat_ID);
$title = htmlentities($sub_item->cat_name);
@@ -783,7 +783,7 @@ function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli
$itemid = $sub_item->cat_ID;
$linktype = 'category';
$appendtype = 'Category';
$description = htmlentities(strip_tags($sub_item->description));
$description = htmlentities(strip_tags($sub_item->description));
}
//Page Menu Item
elseif ($type == 'pages')
@@ -797,13 +797,13 @@ function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli
$description = htmlentities(get_post_meta($itemid, 'page-description', true));
}
//Custom Menu Item
else
else
{
$title = '';
$linktype = 'custom';
$appendtype= 'Custom';
}
//Custom Menu
if ($output_type == 'menu')
{
@@ -814,7 +814,7 @@ function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli
<span class="title"><?php echo $title; ?></span>
<span class="controls">
<span class="type"><?php echo $linktype; ?></span>
<a id="edit<?php echo $counter; ?>" onclick="edititem(<?php echo $counter; ?>)" value="<?php echo $counter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="edit<?php echo $counter; ?>" onclick="edititem(<?php echo $counter; ?>)" value="<?php echo $counter; ?>"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-edit.png" /></a>
<a id="remove<?php echo $counter; ?>" onclick="removeitem(<?php echo $counter; ?>)" value="<?php echo $counter; ?>">
<img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-close.png" />
</a>
@@ -822,7 +822,7 @@ function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli
<img alt="View Page" title="View Page" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-viewpage.png" />
</a>
</span>
</dt>
</dl>
<a class="hide" href="<?php echo $link; ?>"><?php echo $title; ?></a>
@@ -837,49 +837,49 @@ function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli
<input type="hidden" name="linktype<?php echo $counter; ?>" id="linktype<?php echo $counter; ?>" value="<?php echo $linktype; ?>" />
<input type="hidden" name="anchortitle<?php echo $counter; ?>" id="anchortitle<?php echo $counter; ?>" value="<?php echo $title; ?>" />
<input type="hidden" name="newwindow<?php echo $counter; ?>" id="newwindow<?php echo $counter; ?>" value="0" />
<?php $counter++; ?>
<?php
<?php
//Do recursion
$counter = wp_custom_navigation_default_sub_items($parent_id, $counter, $parent_id, $type, 'menu');
$counter = wp_custom_navigation_default_sub_items($parent_id, $counter, $parent_id, $type, 'menu');
?>
</li>
<?php
<?php
}
//Sidebar Menu
elseif ($output_type == 'default')
{
?>
<li>
<dl>
<dt>
<?php $templatedir = get_bloginfo('url'); ?>
<span class="title"><?php echo $title; ?></span> <a onclick="appendToList('<?php echo $templatedir; ?>','<?php echo $appendtype; ?>','<?php echo $title; ?>','<?php echo $link; ?>','<?php echo $itemid; ?>','<?php echo $parent_id ?>','<?php echo $description; ?>')" name="<?php echo $title; ?>" value="<?php echo $link; ?>"><img alt="Add to Custom Menu" title="Add to Custom Menu" src="<?php echo get_bloginfo('url'); ?>/wp-admin/images/ico-add.png" /></a> </dt>
</dl>
<?php
<?php
//Do recursion
$counter = wp_custom_navigation_default_sub_items($itemid, $counter, $parent_id, $type, 'default');
?>
</li>
<?php
<?php
}
}
?>
</ul>
<?php
<?php
}
return $counter;
}
@@ -891,19 +891,19 @@ function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli
function get_children_menu_elements($childof, $intCounter, $parentli, $type, $menu_id, $table_name) {
$counter = $intCounter;
global $wpdb;
//Get Sub Category Items
//Get Sub Category Items
if ($type == 'categories')
{
$sub_args = array(
'child_of' => $childof,
'hide_empty' => false,
'parent' => $childof);
$sub_array = get_categories($sub_args);
$sub_array = get_categories($sub_args);
}
//Get Sub Page Items
elseif ($type == 'pages')
@@ -911,14 +911,14 @@ function get_children_menu_elements($childof, $intCounter, $parentli, $type, $me
$sub_args = array(
'child_of' => $childof,
'parent' => $childof);
$sub_array = get_pages($sub_args);
}
else {
}
if ($sub_array)
{
//DISPLAY Loop
@@ -928,7 +928,7 @@ function get_children_menu_elements($childof, $intCounter, $parentli, $type, $me
$sub_item_parent = $sub_item->parent;
}
elseif (isset($sub_item->post_parent)) {
$sub_item_parent = $sub_item->post_parent;
$sub_item_parent = $sub_item->post_parent;
}
else {
}
@@ -937,7 +937,7 @@ function get_children_menu_elements($childof, $intCounter, $parentli, $type, $me
{
//Prepare Menu Data
//Category Menu Item
if ($type == 'categories')
if ($type == 'categories')
{
$link = get_category_link($sub_item->cat_ID);
$title = htmlentities($sub_item->cat_name);
@@ -957,13 +957,13 @@ function get_children_menu_elements($childof, $intCounter, $parentli, $type, $me
$appendtype= 'Page';
}
//Custom Menu Item
else
else
{
$title = '';
$linktype = 'custom';
$appendtype= 'Custom';
}
//CHECK for existing parent records
//echo $parent_id;
$wp_result = $wpdb->get_results("SELECT id FROM ".$table_name." WHERE post_id='".$parent_id."' AND link_type='".$linktype."' AND menu_id='".$menu_id."'");
@@ -973,17 +973,17 @@ function get_children_menu_elements($childof, $intCounter, $parentli, $type, $me
else {
//$parent_id = 0;
}
//INSERT item
$insert = "INSERT INTO ".$table_name." (position,post_id,parent_id,custom_title,custom_link,custom_description,menu_icon,link_type,menu_id,custom_anchor_title) "."VALUES ('".$counter."','".$itemid."','".$parent_id."','".$title."','".$link."','','','".$linktype."','".$menu_id."','".$title."')";
$results = $wpdb->query( $insert );
$counter++;
$counter = get_children_menu_elements($itemid, $counter, $parent_id, $type, $menu_id, $table_name);
}
}
//Do nothing
else {
}
}
}
+133 -133
View File
@@ -1009,10 +1009,10 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
function WP_CustomNavWidget() {
$widget_ops = array('description' => 'Use this widget to add one of your Custom Navigation Menus as a widget.' );
parent::WP_Widget(false, __('Custom Navigation Menu'),$widget_ops);
parent::WP_Widget(false, __('Custom Navigation Menu'),$widget_ops);
}
function widget($args, $instance) {
function widget($args, $instance) {
$navmenu = $instance['navmenu'];
$navtitle = $instance['navtitle'];
$navdeveloper = strtolower($instance['navdeveloper']);
@@ -1022,21 +1022,21 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
$navdivclass = $instance['navdivclass'];
$navulid = $instance['navulid'];
$navulclass = $instance['navulclass'];
//Override for menu descriptions
$advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options');
if ($advanced_option_descriptions == 'no')
{
if ($advanced_option_descriptions == 'no')
{
$navwidgetdescription = 2;
}
}
else
{
$navwidgetdescription = $instance['navwidgetdescription'];
}
$menuexists = false;
global $wpdb;
//GET menu name
if ($navmenu > 0)
{
@@ -1046,108 +1046,108 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
$menuexists = true;
}
//Do nothing
else
else
{
$menuexists = false;
}
?>
<?php
<?php
//DEVELOPER settings enabled
if ($navdeveloper == 'yes')
{
if ($navdeveloper == 'yes')
{
//DISPLAY Custom DIV
if ($navdiv == 'yes')
{
if ($navdiv == 'yes')
{
?>
<div id="<?php echo $navdivid; ?>" class="<?php echo $navdivclass; ?>">
<?php
<?php
}
//Do NOT display DIV
else
else
{
}
}
}
}
//DISPLAY default DIV
else
else
{
?>
<div class="widget">
<?php
<?php
}
?>
<h3><?php echo $navtitle; ?></h3>
<?php
if ($menuexists)
<?php
if ($menuexists)
{
?>
<?php
<?php
//DEVELOPER settings enabled
if ($navdeveloper == 'yes')
{
if ($navdeveloper == 'yes')
{
//DISPLAY Custom UL
if ($navul == 'yes')
{
if ($navul == 'yes')
{
?>
<ul id="<?php echo $navulid; ?>" class="<?php echo $navulclass; ?>">
<?php
<?php
}
//Do NOT display UL
else
else
{
}
}
}
}
//DISPLAY default UL
else
else
{
?>
<ul class="custom-nav">
<?php
<?php
}
?>
<?php
//DISPLAY custom navigation menu
if (get_option('wp_custom_nav_menu') == 'true') {
custom_nav('name='.$wp_custom_nav_menu_name.'&desc='.$navwidgetdescription);
}
}
?>
<?php
<?php
//DEVELOPER settings enabled
if ($navdeveloper == 'yes')
{
if ($navdeveloper == 'yes')
{
//DISPLAY Custom UL
if ($navul == 'yes')
{
if ($navul == 'yes')
{
?>
</ul>
<?php
<?php
}
//Do NOT display UL
else
else
{
}
}
}
}
//DISPLAY default UL
else
else
{
?>
</ul>
<?php
<?php
}
?>
<?php
}
@@ -1156,41 +1156,41 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
echo "You have not setup the custom navigation widget correctly, please check your settings in the backend.";
}
?>
<?php
<?php
//DEVELOPER settings enabled
if ($navdeveloper == 'yes')
{
if ($navdeveloper == 'yes')
{
//DISPLAY Custom DIV
if ($navdiv == 'yes')
{
if ($navdiv == 'yes')
{
?>
</div>
<?php
<?php
}
//Do NOT display DIV
else
else
{
}
}
}
}
//DISPLAY default DIV
else
else
{
?>
</div>
<?php
<?php
}
?><!-- /#nav-container -->
<?php
}
function update($new_instance, $old_instance) {
function update($new_instance, $old_instance) {
return $new_instance;
}
function form($instance) {
function form($instance) {
$navmenu = esc_attr($instance['navmenu']);
$navtitle = esc_attr($instance['navtitle']);
$navdeveloper = esc_attr($instance['navdeveloper']);
@@ -1201,25 +1201,25 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
$navulid = esc_attr($instance['navulid']);
$navulclass = esc_attr($instance['navulclass']);
$navwidgetdescription = esc_attr($instance['navwidgetdescription']);
global $wpdb;
//GET Menu Items for SELECT OPTIONS
//GET Menu Items for SELECT OPTIONS
$table_name_custom_menus = $wpdb->prefix . "custom_nav_menus";
$custom_menu_records = $wpdb->get_results("SELECT id,menu_name FROM ".$table_name_custom_menus);
//CHECK if menus exist
if ($custom_menu_records > 0)
{
?>
<p>
<label for="<?php echo $this->get_field_id('navmenu'); ?>"><?php _e('Select Menu:'); ?></label>
<select id="<?php echo $this->get_field_id('navmenu'); ?>" name="<?php echo $this->get_field_name('navmenu'); ?>">
<?php
<?php
//DISPLAY SELECT OPTIONS
foreach ($custom_menu_records as $custom_menu_record)
{
@@ -1232,136 +1232,136 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
?>
<option value="<?php echo $custom_menu_record->id; ?>" <?php echo $selected_option; ?>><?php echo $custom_menu_record->menu_name; ?></option>
<?php
}
?>
</select>
</p>
<p>
<label for="<?php echo $this->get_field_id('navtitle'); ?>"><?php _e('Title:'); ?></label>
<input type="text" name="<?php echo $this->get_field_name('navtitle'); ?>" value="<?php echo $navtitle; ?>" class="widefat" id="<?php echo $this->get_field_id('navtitle'); ?>" />
</p>
<p>
<?php
$checked = strtolower($navdeveloper);
?>
<label for="<?php echo $this->get_field_id('navdeveloper'); ?>"><?php _e('Advanced Options:'); ?></label><br />
<label for="<?php echo $this->get_field_id('navdeveloper'); ?>"><?php _e('Advanced Options:'); ?></label><br />
<span class="checkboxes">
<label>Yes</label><input type="radio" id="<?php echo $this->get_field_name('navdeveloper'); ?>" name="<?php echo $this->get_field_name('navdeveloper'); ?>" value="yes" <?php if ($checked=='yes') { echo 'checked="checked"'; } ?> />
<label>No</label><input type="radio" id="<?php echo $this->get_field_name('navdeveloper'); ?>" name="<?php echo $this->get_field_name('navdeveloper'); ?>" value="no" <?php if ($checked=='yes') { } else { echo 'checked="checked"'; } ?> />
</span><!-- /.checkboxes -->
</p>
<?php
<?php
//DEVELOPER settings
if ($checked == 'yes')
{
?>
<p>
<?php
$checked = strtolower($navdiv);
?>
<label for="<?php echo $this->get_field_id('navdiv'); ?>"><?php _e('Wrap in container DIV:'); ?></label><br />
<label for="<?php echo $this->get_field_id('navdiv'); ?>"><?php _e('Wrap in container DIV:'); ?></label><br />
<span class="checkboxes">
<label>Yes</label><input type="radio" id="<?php echo $this->get_field_name('navdiv'); ?>" name="<?php echo $this->get_field_name('navdiv'); ?>" value="yes" <?php if ($checked=='yes') { echo 'checked="checked"'; } ?> />
<label>No</label><input type="radio" id="<?php echo $this->get_field_name('navdiv'); ?>" name="<?php echo $this->get_field_name('navdiv'); ?>" value="no" <?php if ($checked=='yes') { } else { echo 'checked="checked"'; } ?> />
</span><!-- /.checkboxes -->
</p>
<?php
if ($checked == 'yes')
{
?>
<p>
<label for="<?php echo $this->get_field_id('navdivid'); ?>"><?php _e('DIV id:'); ?></label>
<input type="text" name="<?php echo $this->get_field_name('navdivid'); ?>" value="<?php echo $navdivid; ?>" class="widefat" id="<?php echo $this->get_field_id('navdivid'); ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('navdivclass'); ?>"><?php _e('DIV class:'); ?></label>
<input type="text" name="<?php echo $this->get_field_name('navdivclass'); ?>" value="<?php echo $navdivclass; ?>" class="widefat" id="<?php echo $this->get_field_id('navdivclass'); ?>" />
</p>
<?php
}
?>
<p>
<?php
$checked = strtolower($navul);
?>
<label for="<?php echo $this->get_field_id('navul'); ?>"><?php _e('Wrap in container UL:'); ?></label><br />
<label for="<?php echo $this->get_field_id('navul'); ?>"><?php _e('Wrap in container UL:'); ?></label><br />
<span class="checkboxes">
<label>Yes</label><input type="radio" id="<?php echo $this->get_field_name('navul'); ?>" name="<?php echo $this->get_field_name('navul'); ?>" value="yes" <?php if ($checked=='yes') { echo 'checked="checked"'; } ?> />
<label>No</label><input type="radio" id="<?php echo $this->get_field_name('navul'); ?>" name="<?php echo $this->get_field_name('navul'); ?>" value="no" <?php if ($checked=='yes') { } else { echo 'checked="checked"'; } ?> />
</span><!-- /.checkboxes -->
</p>
<?php
if ($checked == 'yes')
{
?>
<p>
<label for="<?php echo $this->get_field_id('navulid'); ?>"><?php _e('UL id:'); ?></label>
<input type="text" name="<?php echo $this->get_field_name('navulid'); ?>" value="<?php echo $navulid; ?>" class="widefat" id="<?php echo $this->get_field_id('navulid'); ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('navulclass'); ?>"><?php _e('UL class:'); ?></label>
<input type="text" name="<?php echo $this->get_field_name('navulclass'); ?>" value="<?php echo $navulclass; ?>" class="widefat" id="<?php echo $this->get_field_id('navulclass'); ?>" />
</p>
<?php
}
?>
<?php $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options'); ?>
<p <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?>>
<?php
$checked = strtolower($navwidgetdescription);
?>
<label for="<?php echo $this->get_field_id('navwidgetdescription'); ?>"><?php _e('Show Top Level Descriptions:'); ?></label><br />
<label for="<?php echo $this->get_field_id('navwidgetdescription'); ?>"><?php _e('Show Top Level Descriptions:'); ?></label><br />
<span class="checkboxes">
<label>Yes</label><input type="radio" id="<?php echo $this->get_field_name('navwidgetdescription'); ?>" name="<?php echo $this->get_field_name('navwidgetdescription'); ?>" value="1" <?php if ($checked=='1') { echo 'checked="checked"'; } ?> />
<label>No</label><input type="radio" id="<?php echo $this->get_field_name('navwidgetdescription'); ?>" name="<?php echo $this->get_field_name('navwidgetdescription'); ?>" value="2" <?php if ($checked=='1') { } else { echo 'checked="checked"'; } ?> />
</span><!-- /.checkboxes -->
</p>
<?php
<?php
}
//Do nothing
else
else
{
}
}
//Error message for menus not existing
else
else
{
?>
<p>
@@ -1370,7 +1370,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
<?php
}
}
}
/**
@@ -1408,9 +1408,9 @@ function wp_widgets_init() {
register_widget('WP_Widget_RSS');
register_widget('WP_Widget_Tag_Cloud');
register_widget('WP_CustomNavWidget');
do_action('widgets_init');
}
+1 -1
View File
@@ -2062,7 +2062,7 @@ function get_link($bookmark_id, $output = OBJECT, $filter = 'raw') {
* @since 2.3.1
* @deprecated 2.8.0
* @deprecated Use esc_url_raw()
* @see esc_url_raw()
* @see esc_url_raw()
*
* @param string $url The URL to be cleaned.
* @param array $protocols An array of acceptable protocols.
+1 -1
View File
@@ -610,7 +610,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' )
* Removes option by name. Prevents removal of protected WordPress options.
*
* @package WordPress
* @subpackage Option
* @subpackage Option
* @since 1.2.0
*
* @uses do_action() Calls 'delete_option' hook before option is deleted.
+1 -1
View File
@@ -713,7 +713,7 @@ function single_tag_title($prefix = '', $display = true ) {
return;
$tag = $wp_query->get_queried_object();;
if ( ! $tag )
return;
+1 -1
View File
@@ -1012,7 +1012,7 @@ class WP_Http_Streams {
'max_redirects' => $r['redirection'] + 1, // See #11557
'protocol_version' => (float) $r['httpversion'],
'header' => $strHeaders,
'ignore_errors' => true, // Return non-200 requests.
'ignore_errors' => true, // Return non-200 requests.
'timeout' => $r['timeout'],
'ssl' => array(
'verify_peer' => $ssl_verify,
+1 -1
View File
@@ -34,7 +34,7 @@ function ms_upload_constants( ) {
*/
function ms_cookie_constants( ) {
global $current_site;
/**
* @since 1.2.0
*/
+4 -4
View File
@@ -397,16 +397,16 @@ function wp_default_scripts( &$scripts ) {
) );
}
//Custom Navigation
$scripts->add( 'custom-navigation-ui-custom', '/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js', array('jquery'), '1.7.2' );
$scripts->add_data( 'custom-navigation-ui-custom', 'group', 1 );
$scripts->add( 'custom-navigation-default-items', "/wp-admin/js/custom-navigation-default-items$suffix.js", false, '20100220' );
$scripts->add( 'custom-navigation-dynamic-functions', "/wp-admin/js/custom-navigation-dynamic-functions$suffix.js", false, '20100220' );
$scripts->add( 'custom-navigation-php-functions', "/wp-admin/js/custom-navigation-php-functions$suffix.js", false, '20100220' );
}
/**
@@ -473,7 +473,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
$styles->add( 'custom-navigation', "/wp-admin/css/custom-navigation$suffix.css", array(), '20100215' );
foreach ( $rtl_styles as $rtl_style )
$styles->add_data( $rtl_style, 'rtl', true );
}
+1 -1
View File
@@ -243,7 +243,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
if ( empty($args[$cap]) )
$args[$cap] = 'manage_categories';
}
if ( empty($args['singular_label']) )
$args['singular_label'] = $args['label'];
+1 -1
View File
@@ -14,7 +14,7 @@ elseif ( is_feed() ) :
do_feed();
return;
elseif ( is_trackback() ) :
include( ABSPATH . 'wp-trackback.php' );
include( ABSPATH . 'wp-trackback.php' );
return;
endif;