# vimeography/2.2/lib/robots.php

Vimeography: Vimeo Video Gallery WordPress Plugin, version 2.2. 26 lines.

- Page: https://pluginprobe.com/plugins/vimeography/2.2/code/lib/robots.php
- Raw: https://pluginprobe.com/plugins/vimeography/2.2/raw/lib/robots.php
- Modified: 2014-05-08T23:13:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/vimeography/2.2/code/lib/robots.php#L10-L20`.

```php
<?php

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;

class Vimeography_Robots {

  public function __construct() {
    add_action( 'do_robots',      array($this, 'vimeography_block_robots') );
  }

  /**
   * Adds the VIMEOGRAPHY_ASSETS_URL to the virtual robots.txt restricted list.
   * Fired when the template loader determines a robots.txt request.
   *
   * @access public
   * @static
   * @return void
   */
  public static function vimeography_block_robots() {
    $blocked_asset_path = str_ireplace(site_url(), '', VIMEOGRAPHY_ASSETS_URL);
    echo 'Disallow: '.$blocked_asset_path."\n";
  }

}

```
