Plugin Directory

Changeset 1541842


Ignore:
Timestamp:
11/28/2016 10:20:52 AM (9 years ago)
Author:
etemplates
Message:

SEO URL fixes

Location:
ect-sitemap/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ect-sitemap/trunk/ect-sitemap.php

    r1477635 r1541842  
    55Author:Andy Chapman
    66Author URI:http://www.ecommercetemplates.com
    7 Version:1.5
     7Version:1.6
    88*/
    99define('PLUGIN_NAME','ect_sitemap_');
     
    4242   
    4343    $IsSeo=get_option('ect_sitemap_is_seo');
    44    
    4544    $IsSeo=!empty($IsSeo) ? "checked='checked'" : '';
    46    
     45
    4746    if(isset($_GET['msg']))
    4847        echo '<div id="message" class="updated below-h2"><p>Settings saved successfully .</p></div>';
    49    
     48
    5049    echo '<form method="post">
    5150            <input type="hidden" name="def" value="1" />';
     
    9493    echo '<li><input type="submit" value="Save Changes" /></li></ul>';
    9594    echo '</form>';
    96    
     95
    9796/*  echo do_shortcode('[ECT_HTML_SITEMAP]');*/
    98    
     97
    9998    if(!empty($_POST))
    10099    {
     
    139138        /* if(isset($DataArr['home']))
    140139            $Str2.=HtmlInnerTag($DataArr['home']); */
    141        
     140
    142141        if(isset($DataArr['post']))
    143142            $Str2.=HtmlInnerTag($DataArr['post'],'Posts');
    144        
     143   
    145144        if(isset($DataArr['page']))
    146145            $Str2.=HtmlInnerTag($DataArr['page'],'Pages');
    147        
     146   
    148147    }
    149148    $D=StorePages();
    150149    $Str2.=HtmlInnerTag($D,'Store');
    151    
     150
    152151    return $Str2;
    153152}
     
    161160      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    162161      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
    163             http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">';
     162      http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">';
    164163    $DataArr=DataToArray();
    165164    if(!empty($DataArr))
     
    167166        if(isset($DataArr['home']))
    168167            $Str.=XmlInnerTag($DataArr['home']);
    169        
     168   
    170169        if(isset($DataArr['post']))
    171170            $Str.=XmlInnerTag($DataArr['post']);
     
    178177        $Str.=GetCats(1);
    179178        $Str.=ListStoreProd('',1);
    180        
     179   
    181180    }
    182181    $Str.='</urlset>';
     
    295294    $ExcludedPosts=get_option('ect_sitemap_excluded_posts');
    296295   
     296if(is_array($ExcludedPages) && is_array($ExcludedPosts))
     297    {
     298        $ExtIDs=array_merge($ExcludedPages,$ExcludedPosts);
     299    }
     300    elseif(!empty($ExcludedPages) && empty($ExcludedPosts))
     301    {
     302        $ExtIDs=$ExcludedPages;
     303    }
     304    elseif(empty($ExcludedPages) && !empty($ExcludedPosts))
     305    {
     306        $ExtIDs=$ExcludedPosts;
     307    }
     308   
    297309    $ExQ='';
    298     if(empty($NoC) && !empty($ExcludedPages) && is_array($ExcludedPages))
    299         $ExQ='and ID NOT IN ('.implode(',',$ExcludedPages).')';
    300    
    301     if(empty($NoC) && !empty($ExcludedPosts) && is_array($ExcludedPosts))
    302         $ExQ.=','.implode(',',$ExcludedPosts).')';
    303 
     310    if(empty($NoC) && !empty($ExtIDs) && is_array($ExtIDs))
     311    {
     312        $ExQ='and ID NOT IN ('.implode(',',$ExtIDs).')';
     313    }   
     314    /*if(empty($NoC) && !empty($ExcludedPosts) && is_array($ExcludedPosts))
     315    $ExQ.=','.implode(',',$ExcludedPosts).')';*/
    304316    $Data=$wpdb->get_results("select ID,post_modified_gmt,post_title from ".$wpdb->prefix."posts where post_status='publish' $ExQ");
    305317    if(!empty($Data))
     
    336348    $LastM=date('Y-m-d',$LastM);
    337349    /*return $Data=array('Search'=>array('Url'=>site_url('/').'search.php','PostTitle'=>'Search','LastModify'=>$LastM),'Cart'=>array('Url'=>site_url('/').'cart.php','PostTitle'=>'Cart','LastModify'=>$LastM),'Products'=>array('Url'=>site_url('/').'products.php','PostTitle'=>'Products','LastModify'=>$LastM),'Categories'=>array('Url'=>site_url('/').'categories.php','PostTitle'=>'Categories','LastModify'=>$LastM));*/
    338    
     350
    339351    return $Data=array('Categories'=>array('Url'=>site_url('/').'categories.php','PostTitle'=>'Categories','LastModify'=>$LastM));
    340352}
     
    362374                if(true)
    363375                    $CatName=$Pp->sectionName;
    364                
    365                 $k='products.php';
     376           
     377
     378            $k='products.php';
    366379                    if($Pp->rootSection==0)
    367380                        $k='categories.php';
  • ect-sitemap/trunk/readme.txt

    r1477635 r1541842  
    44Tags: Wordpress ecommerce, ecommerce, online store, sell products, shopping cart, wordpress store, wordpress shopping cart, ecommerce software, sitemap, site map, xml
    55Requires at least: 3
    6 Tested up to: 4.6
    7 Stable tag: 1.5
     6Tested up to: 4.6.1
     7Stable tag: 1.6
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7272== Changelog ==
    7373
     74= 1.6 =
     75* URL rendering fix. September 30th 2016.
    7476= 1.5 =
    7577* URL rendering fix. August, 18th 2016.
Note: See TracChangeset for help on using the changeset viewer.