Plugin Directory

Changeset 1647844


Ignore:
Timestamp:
04/29/2017 05:51:23 AM (8 years ago)
Author:
andrewsauder
Message:

1.2.0

  • caching updates
  • tested against WordPress 4.7.4
Location:
local-geo-search/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • local-geo-search/trunk/classes/cachesys.php

    r1228038 r1647844  
    3434
    3535        $content = false;
    36 
    3736        $fileName = self::$cacheDir.$cacheName.'.'.$key.'.cache';
    3837
    39         if($maxAge===false) {
    40             if(file_exists($fileName)) {
    41                 $content = file_get_contents($fileName);
    42             }
    43         }
    44         else {
    45             //if the cached file exists and it was last updated within the last X number of seconds
    46             if(file_exists($fileName) && $maxAge < filemtime($fileName)) {
    47                 $content = file_get_contents($fileName);
    48             }
     38        //calculate expiration
     39        $cacheExpired = self::cacheExpired( $fileName, $maxAge );
     40
     41        //get cache
     42        if(!$cacheExpired) {
     43            $content = file_get_contents($fileName);
    4944        }
    5045
     
    6156        $path = self::$cacheDir;
    6257
    63         if ($handle = opendir($path)) {
     58        $handle = opendir($path);
     59
     60        if($handle) {
    6461            while (false !== ($entry = readdir($handle))) {
    6562                if ($entry != "." && $entry != ".." && strpos($entry, $category)!==false) {
    66                     $content[] = file_get_contents(self::$cacheDir.$entry);
     63
     64                    $cacheExpired = self::cacheExpired( $path.$entry, $maxAge );
     65
     66                    if(!$cacheExpired) {
     67                        $content[] = file_get_contents( $path.$entry );
     68                    }
     69
    6770                }
    6871            }
     
    7881    }
    7982
     83    private static function cacheExpired( $fileName, $maxAge ) {
     84
     85        //if file does not exist, it is expired
     86        $cacheFileExists = file_exists($fileName);
     87
     88        if(!$cacheFileExists) {
     89            return true;
     90        }
     91
     92        //file exists so check based on max age
     93        if($maxAge===false) {
     94            //cache never expires
     95            $cacheExpired = false;
     96        }
     97        else {
     98            //check if it is expired
     99            $expirationTS = filemtime($fileName) + $maxAge;
     100            $cacheExpired = time() > $expirationTS;
     101        }
     102
     103        return $cacheExpired;
     104
     105    }
     106
    80107
    81108    /**
     
    135162        $path = self::$cacheDir;
    136163
    137         if ($handle = opendir($path)) {
     164        if($handle = opendir($path)) {
    138165
    139166            while (false !== ($file = readdir($handle))) {
     
    183210
    184211    /**
    185      * Delete a cached files with a specfied string in the file name
     212     * Delete a cached files with a specified string in the file name
    186213     *
    187214     * Example Usage:
  • local-geo-search/trunk/classes/fns.tools.php

    r1481957 r1647844  
    88    $host = home_url();
    99
    10     if($_SERVER['SERVER_NAME']=='testing-wordpress') {
     10    if($_SERVER['SERVER_NAME']=='local.localgeosearch.com') {
    1111        $api = 'http://it-as:9917';
    1212    }
  • local-geo-search/trunk/geoseo.php

    r1484499 r1647844  
    22/**
    33* Plugin Name: Local Geo Search
    4 * Plugin URI: https://www.localgeosearch.com
     4* Plugin URI: https://localgeosearch.com
    55* Description: Local GEO Search creates hundreds of location specific pages on your site to target your services in your market.
    6 * Version: 1.1.1
     6* Version: 1.2.0
    77* Author: Elite Impressions, LLC
    8 * Author URI: http://www.localgeosearch.com
     8* Author URI: https://localgeosearch.com
    99**/
    1010
  • local-geo-search/trunk/readme.txt

    r1484501 r1647844  
    1 === Local GEO Search ===
     1=== Local Geo Search ===
    22Contributors: andrewsauder
    3 Donate link: https://localgeosearch.com/promotewp16/
    4 Tags: seo, marketing, geolocation
     3Donate link: https://localgeosearch.com/
     4Tags: seo, marketing, geolocation, geographic marketing
    55Requires at least: 3.0.1
    6 Tested up to: 4.6
     6Tested up to: 4.7.4
    77Stable tag: trunk
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Local GEO Search creates hundreds of location specific pages on your site to target your services in your geographic market.
     11Local Geo Search creates hundreds of location specific pages on your site to target your services in your geographic market.
    1212
    1313
    1414== Description ==
    1515
    16 The Local GEO Search plugin requires that you have an active account with us at https://localgeosearch.com/promotewp16/. You will
    17 manage your terms/services and locations at the Local GEO Search site and the plugin will pull them into your site.
     16The Local Geo Search plugin requires that you have an active account with us at https://localgeosearch.com/. You will
     17manage your terms/services and locations at the Local Geo Search site and the plugin will pull them into your site.
    1818
    1919Get Started:
    2020
    21 *   Sign up today at https://localgeosearch.com/promotewp16/ - your first 3 months are free and after that you get a special price only for WordPress users!
    22 *   Add your terms, locations, and content and watch your site's page count grow by at least 150 pages instantly
    23 *   Sit back and watch our integrated analytics as new visitors start driving up your traffic
     21*   Sign up today at https://localgeosearch.com/ and we'll connect you with a regional marketing team that can help you implement Local Geo Search into your online marketing strategy
     22*   Once you're set up, add your terms, locations, and content
     23*   Hundreds of pages targeting your locations and key terms are added to your website and sitemap for indexing by search engines
    2424
    2525
     
    27271. Upload the zip file in Wordpress or unzip it and copy the geoseo directory into the wp-content/plugins directory
    28281. Activate the plugin through the 'Plugins' menu in WordPress
    29 1. Visit the plugin settings to link your website with the terms and locations you've added (you'll need to know the website token from localgeosearch.com)
     291. Open the Local Geo Search tab and enter your authentication token from https://manage.localgeosearch.com/
    3030
    3131
    3232== Frequently Asked Questions ==
    3333
     34= Should I use Local Geo Search on my site? =
     35
     36If you run a business that serves customers locally, Local Geo Search can be a valuable tool in maximizing your website's visibility on search engines. While the tool itself is powerful, it is only
     37one piece of a successful SEO plan. We can connect you with a regional team of marketing experts that can help you with an overarching online marketing strategy that leverages Local Geo Search.
     38
    3439= Is the plugin free to use? =
    3540
    36 Not really. The plugin requires you to have an active Local GEO Search account which comes with a monthly fee. Use of the plugin is included in that cost. You can sign up at https://localgeosearch.com/promotewp16/
     41No. Local Geo Search requires an account to use. If you want to see it in action, we can connect you with a marketing team. If you are a marketing company and are interested in leveraging Local Geo Search
     42for your customers, we offer white label packages for branding and using Local Geo Search as a powerful tool in your SEO for clients.
    3743
    38 = How many pages will Local GEO Search create on my site? =
     44= How many pages will Local Geo Search create on my site? =
    3945
    40 It depends on your plan. With the cheapest plan, it would create 25 pages. Our best plan creates 625 pages instantly.
     46It depends on the plan that you and your marketing team decide is best for your website. In the end, the number of created pages = 1 + ((number of terms) * (number of locations)) + (number of terms) + (number of locations)
    4147
    4248= Do the pages that get created look like my site? =
    4349
    44 Yes! The Local GEO Search pages use the same theme the rest of your site uses and includes all of the html head tags that your site includes. Like any other page, you can embed videos and images too!
     50Yes! The Local Geo Search pages use the same theme the rest of your site uses and includes all of the html head tags that your site includes. Like any other page, you can embed videos and images too!
    4551
    46 = Do you guarantee that our site will get top page results? =
     52= Can Local Geo Search alone get my website top page results? =
    4753
    48 We do not guarantee top page results for your key terms. Page ranking depends on how competitive your keywords and industry are, and other algorithms. We have seen great results with our SEO platform, and can make the best suggestions for you to see success.
     54We cannot guarantee top page results for your key terms and locations. Page ranking depends on how competitive your keywords and industry are, and other algorithms. We have seen great results and can make the best suggestions for you to see success.
    4955
    5056
    5157== Changelog ==
     58= 1.2.0 =
     59* caching updates
     60* tested against WordPress 4.7.4
     61
    5262= 1.1.1 =
    5363* fixed extra spacing before php code causing some sites to capture it as an early header output
     
    125135* Breaks backwards compatibility. If you already have the plugin installed, you will have to reauthenticate using the new method
    126136* New authentication method with single token tied to specfic website instead of username password
    127 * Site URL must match URL saved in Local GEO Search
     137* Site URL must match URL saved in Local Geo Search
    128138* Enhanced integration with AllInOneSEO sitemap.xml
    129 * Decreased required cloud calls per Local GEO Search page load
     139* Decreased required cloud calls per Local Geo Search page load
    130140
    131141= 0.40 =
     
    134144
    135145= 0.32 =
    136 * Public release of Local GEO Search Wordpress plugin
     146* Public release of Local Geo Search Wordpress plugin
Note: See TracChangeset for help on using the changeset viewer.