Plugin Directory

Changeset 1576712


Ignore:
Timestamp:
01/17/2017 05:44:19 PM (9 years ago)
Author:
eugenbobrowski
Message:

1.5 - add Crawl-delay rule

Location:
robotstxt-rewrite/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • robotstxt-rewrite/trunk/README.txt

    r1514957 r1576712  
    11=== Robots.txt rewrite ===
    22Contributors: eugenbobrowski
     3Donate link: http://atf.li/
    34Tags:  crawler, crawlers, robot, robots, robots.txt, editor, google, search, seo, spiders
    45Requires at least: 4.0
    5 Tested up to: 4.6.1
    6 Stable tag: 1.4
     6Tested up to: 4.7.1
     7Stable tag: 1.5
    78License: GPLv2 or later
    89License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1516
    1617A simple plugin to manage your robots.txt. Plugin donn't create the file or edit it. This plugin edit WordPress output of robots.txt content. And get you a easy and usable interface to manage it.
     18
     19**Features**
     20
     21* Drag-n-drop robots.txt paths
     22* Changing `blog_public` option form plugin settings page
     23* Site map field for robots.txt
     24* Robots.txt physical file checking.
     25
     26![Screenshort](https://raw.githubusercontent.com/EugenBobrowski/robotstxt-rewrite/master/screenshot-1.png)
    1727
    1828== Installation ==
     
    3646
    3747== Changelog ==
     48
     49= 1.4 =
     50*Release Date - 17th January, 2017*
     51
     52* Add Crawl-delay rule.
     53
    3854
    3955= 1.4 =
     
    7187== Upgrade Notice ==
    7288
    73 = 1.4 =
    74 Please update if you using or want to migrate to PHP7
    75 
    7689= 1.0 =
    7790Initial.
  • robotstxt-rewrite/trunk/robotstxt-rewrite-admin.php

    r1454675 r1576712  
    8181            }
    8282            $to_save['site_map'] = (isset($_POST['robots_options']['site_map'])) ? sanitize_text_field($_POST['robots_options']['site_map']) : '';
     83            $to_save['crawl_delay'] = (isset($_POST['robots_options']['crawl_delay'])) ? sanitize_text_field($_POST['robots_options']['crawl_delay']) : '';
    8384
    8485            update_option('robots_options', $to_save);
     
    174175                            )); ?></td>
    175176                    </tr>
     177                    <tr class="">
     178                        <th scope="row"><label><?php _e('Crawl-delay:', 'robotstxt-rewrite'); ?></label></th>
     179                        <td><?php AtfHtmlHelper::text(array(
     180                                'id' => 'crawl_delay',
     181                                'name' => 'robots_options[crawl_delay]',
     182                                'value' => $options['crawl_delay'],
     183                                'desc' => __('In seconds. This rule is ignored by Googlebot', 'robotstxt-rewrite')
     184
     185                            )); ?></td>
     186                    </tr>
    176187                </table>
    177188
     
    215226            'bots' => '',
    216227            'site_map' => '',
     228            'crawl_delay' => '',
    217229            );
    218230
  • robotstxt-rewrite/trunk/robotstxt-rewrite.php

    r1497562 r1576712  
    22/**
    33 * @package Robots.txt rewriter
    4  * @version 1.4
     4 * @version 1.6
    55 */
    66/*
     
    99Description: Manage your robots.txt form admin side. Plugin provide to help search engines to indexing site correctly. A simple plugin to manage your robots.txt. Plugin donn't create the file or edit it. This plugin edit WordPress output of robots.txt content. And get you a easy and usable interface to manage it.
    1010Author: Eugen Bobrowski
    11 Version: 1.4
    12 Author URI: http://atf.li/
     11Version: 1.5
     12Author URI: http://bobrowski.ru/
    1313Text Domain: robotstxt-rewrite
    1414*/
     
    6868
    6969            $site_map = (!empty($options['site_map'])) ? "\nSitemap: " . $options['site_map'] : '';
     70            $crawl_delay = (!empty($options['crawl_delay'])) ? "\nCrawl-Delay: " . $options['crawl_delay'] : '';
    7071            $host = "\nHost: " . get_site_url() . "\n";
    7172
    72             $output .= implode($host , $user_agents) . $site_map . $host . "\n\n\n\n" . apply_filters('robots_txt_rewrite_footer', "# This robots.txt file was created by Robots.txt Rewrite plugin: https://wordpress.org/plugins/robotstxt-rewrite/\n");
     73            $output .= implode("\n\n" , $user_agents) . $site_map . $crawl_delay . $host . apply_filters('robots_txt_rewrite_footer', "\n\n\n\n# This robots.txt file was created by Robots.txt Rewrite plugin: https://wordpress.org/plugins/robotstxt-rewrite/\n");
    7374
    7475
Note: See TracChangeset for help on using the changeset viewer.