Skip to content
Snippets Groups Projects
Select Git revision
  • 2b1e32189beffb72afc2b2fedd4de782b733896e
  • master default protected
  • bugfix/wordpress-review
  • bugfix/prevent-error-notice
  • remove-arrow
  • feature/update-message
  • feature/minimum-plugin-version-check-demo1
  • feature/plugin-name
  • 3.7.1
  • 3.7.0
  • 3.6.3
  • 3.6.2
  • 3.6.1
  • 3.6.0
  • 3.6.0-beta3
  • 3.6.0-beta2
  • 3.6.0-beta1
  • 3.5.2
  • 3.5.1
  • 3.5.0
  • 3.4.0
  • 3.3.0
  • 3.2.8
  • 3.2.7
  • 3.2.6
  • 3.2.5
  • 3.2.4
  • 3.2.3
28 results

Plugin_Info.php

Blame
  • Plugin_Info.php 2.60 KiB
    <?php
    
    if ( ! interface_exists( 'WPDesk_Translatable' ) ) {
    	require_once __DIR__ . '/../Translatable.php';
    }
    if ( ! class_exists( 'WPDesk_Buildable' ) ) {
    	require_once __DIR__ . '/../Buildable.php';
    }
    if ( ! class_exists( 'WPDesk_Has_Plugin_Info' ) ) {
    	require_once 'Has_Plugin_Info.php';
    }
    
    /**
     * Structure with core info about plugin
     *
     * have to be compatible with PHP 5.2.x
     */
    class WPDesk_Plugin_Info implements WPDesk_Translatable, WPDesk_Buildable, WPDesk_Has_Plugin_Info {
    	/** @var string */
    	private $plugin_file_name;
    
    	/** @var string */
    	private $plugin_dir;
    
    	/** @var string */
    	private $plugin_url;
    
    	/** @var string */
    	private $class_name;
    
    	/** @var string */
    	private $version;
    
    	/** @var string */
    	private $product_id;
    
    	/** @var \DateTimeInterface */
    	private $release_date;
    
    	/** string */
    	private $text_domain;
    
    	/**
    	 * @return string
    	 */
    	public function get_plugin_file_name() {
    		return $this->plugin_file_name;
    	}
    
    	/**
    	 * @param string $plugin_name
    	 */
    	public function set_plugin_file_name( $plugin_name ) {
    		$this->plugin_file_name = $plugin_name;
    	}
    
    	/**
    	 * @return string
    	 */
    	public function get_plugin_dir() {
    		return $this->plugin_dir;
    	}
    
    	/**
    	 * @param string $plugin_dir
    	 */
    	public function set_plugin_dir( $plugin_dir ) {
    		$this->plugin_dir = $plugin_dir;
    	}