Plugin Directory

Changeset 1355083


Ignore:
Timestamp:
02/21/2016 08:06:49 AM (10 years ago)
Author:
devcon1
Message:
  • Security Improvments. Blocked direct access to plugin files.
  • When debug mode is turned on, it reports "notice: undefined variable" for 3 options under settings menu. This issue has been fixed.
Location:
portfolio-gallery-master/trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • portfolio-gallery-master/trunk/README.txt

    r1258570 r1355083  
    44Tags: portfolio gallery, direction aware portfolio gallery, portfolio plugin, portfolio, gallery
    55Requires at least: 3.5.x
    6 Tested up to: 4.3.1
    7 Stable tag: 4.3.1
     6Tested up to: 4.4.2
     7Stable tag: 4.4.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6161Upgrade notices describe the reason a user should upgrade.  No more than 300 characters.
    6262
    63 = 0.5 =
     63= 1.0.1 =
    6464This version fixes a security related bug.  Upgrade immediately.
     65
     66= 1.0.5 =
     67* Security Improvments. Blocked direct access to plugin files.
     68* When debug mode is turned on, it reports "notice: undefined variable" for 3 options under settings menu. This issue has been fixed.
    6569
    6670== Support ==
  • portfolio-gallery-master/trunk/admin/class-portfolio-gallery-master-admin.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * The admin-specific functionality of the plugin.
     
    2424     * @since    1.0.0
    2525     * @access   private
    26      * @var      string    $plugin_name    The ID of this plugin.
     26     * @var      string    $portfolio_gallery_master    The ID of this plugin.
    2727     */
    28     private $plugin_name;
     28    private $portfolio_gallery_master;
    2929
    3030    /**
     
    4141     *
    4242     * @since    1.0.0
    43      * @param      string    $plugin_name       The name of this plugin.
     43     * @param      string    $portfolio_gallery_master       The name of this plugin.
    4444     * @param      string    $version    The version of this plugin.
    4545     */
    46     public function __construct( $plugin_name, $version ) {
    47         $this->plugin_name = $plugin_name;
     46    public function __construct( $portfolio_gallery_master, $version ) {
     47        $this->portfolio_gallery_master = $portfolio_gallery_master;
    4848        $this->version = $version;
    4949    }
     
    5555     */
    5656    public function enqueue_styles() {
    57         wp_enqueue_style( $this->plugin_name . '-pgm-admin-css', plugin_dir_url( __FILE__ ) . 'css/portfolio-gallery-master-admin.css', array(), $this->version, 'all' );
    58         wp_enqueue_style( $this->plugin_name . '-pgm-minicolors-css', plugin_dir_url( __FILE__ ) . 'css/jquery.minicolors.css', array(), $this->version, 'all' );
     57        wp_enqueue_style( $this->portfolio_gallery_master . '-pgm-admin-css', plugin_dir_url( __FILE__ ) . 'css/portfolio-gallery-master-admin.css', array(), $this->version, 'all' );
     58        wp_enqueue_style( $this->portfolio_gallery_master . '-pgm-minicolors-css', plugin_dir_url( __FILE__ ) . 'css/jquery.minicolors.css', array(), $this->version, 'all' );
    5959    }
    6060
     
    6565     */
    6666    public function enqueue_scripts() {
    67         wp_enqueue_script( $this->plugin_name . '-pgm-admin-js', plugin_dir_url( __FILE__ ) . 'js/portfolio-gallery-master-admin.js', array(), $this->version, 'all' );
    68         wp_enqueue_script( $this->plugin_name . '-pgm-minicolors-js', plugin_dir_url( __FILE__ ) . 'js/jquery.minicolors.min.js', array( 'jquery' ), $this->version, 'all' );
     67        wp_enqueue_script( $this->portfolio_gallery_master . '-pgm-admin-js', plugin_dir_url( __FILE__ ) . 'js/portfolio-gallery-master-admin.js', array(), $this->version, 'all' );
     68        wp_enqueue_script( $this->portfolio_gallery_master . '-pgm-minicolors-js', plugin_dir_url( __FILE__ ) . 'js/jquery.minicolors.min.js', array( 'jquery' ), $this->version, 'all' );
    6969    }
    7070
     
    196196            array($this, 'callback_pgm_display_mode'),
    197197            'pgm_settings_menu',
    198             'settings_section_pgm_main_menu'
     198            'settings_section_pgm_main_menu',
     199            array($this, '')
    199200        );
    200201        add_settings_field(
     
    203204            array($this, 'callback_pgm_display_mode_rows'),
    204205            'pgm_settings_menu',
    205             'settings_section_pgm_main_menu'
     206            'settings_section_pgm_main_menu',
     207            array($this, '')
    206208        );
    207209        add_settings_field(
     
    210212            array($this, 'callback_pgm_display_mode_min_width'),
    211213            'pgm_settings_menu',
    212             'settings_section_pgm_main_menu'
     214            'settings_section_pgm_main_menu',
     215            array($this, '')
    213216        );
    214217        add_settings_field(
     
    217220            array($this, 'callback_pgm_display_mode_max_width'),
    218221            'pgm_settings_menu',
    219             'settings_section_pgm_main_menu'
     222            'settings_section_pgm_main_menu',
     223            array($this, '')
    220224        );
    221225        register_setting(
     
    444448        $mode = get_option( 'pgm_portfolio_display_mode' );
    445449       
    446         $html .= '
     450        $html = '
    447451        <div class="pgm_portfolio_display_mode_settings">
    448452            <label for="pgm_display_per_row">Number of portfolios to display per row:</label>
     
    458462        $mode = get_option( 'pgm_portfolio_display_mode' );
    459463       
    460         $html .= '
     464        $html = '
    461465        <div class="pgm_portfolio_display_mode_settings">
    462466            <label for="pgm_display_min_width">Min width of each portfolio gallery item:</label>
     
    469473        $mode = get_option( 'pgm_portfolio_display_mode' );
    470474       
    471         $html .= '
     475        $html = '
    472476        <div class="pgm_portfolio_display_mode_settings">
    473477            <label for="pgm_display_max_width">Max width of each portfolio gallery item:</label>
  • portfolio-gallery-master/trunk/admin/partials/menu-pgm-settings-display.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Provide a admin area view for the plugin
  • portfolio-gallery-master/trunk/admin/partials/menu-pgm-styles-display.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Provide a admin area view for the plugin
  • portfolio-gallery-master/trunk/admin/partials/settings-section-pgm-main-settings.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Provide a admin area view for the plugin
  • portfolio-gallery-master/trunk/admin/partials/settings-section-pgm-style-dimension.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Provide a admin area view for the plugin
  • portfolio-gallery-master/trunk/admin/partials/settings-section-pgm-style-settings.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Provide a admin area view for the plugin
  • portfolio-gallery-master/trunk/includes/class-portfolio-gallery-master-activator.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Fired during plugin activation
  • portfolio-gallery-master/trunk/includes/class-portfolio-gallery-master-deactivator.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Fired during plugin deactivation
  • portfolio-gallery-master/trunk/includes/class-portfolio-gallery-master-i18n.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Define the internationalization functionality
  • portfolio-gallery-master/trunk/includes/class-portfolio-gallery-master-loader.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Register all actions and filters for the plugin
  • portfolio-gallery-master/trunk/includes/class-portfolio-gallery-master.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * The file that defines the core plugin class
     
    4545     * @since    1.0.0
    4646     * @access   protected
    47      * @var      string    $plugin_name    The string used to uniquely identify this plugin.
    48      */
    49     protected $plugin_name;
     47     * @var      string    $portfolio_gallery_master    The string used to uniquely identify this plugin.
     48     */
     49    protected $portfolio_gallery_master;
    5050
    5151    /**
     
    6969    public function __construct() {
    7070
    71         $this->plugin_name = 'portfolio-gallery-master';
     71        $this->portfolio_gallery_master = 'portfolio-gallery-master';
    7272        $this->version = '1.0.0';
    7373
     
    136136
    137137        $plugin_i18n = new Portfolio_Gallery_Master_i18n();
    138         $plugin_i18n->set_domain( $this->get_plugin_name() );
     138        $plugin_i18n->set_domain( $this->get_portfolio_gallery_master() );
    139139
    140140        $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
     
    151151    private function define_admin_hooks() {
    152152
    153         $plugin_admin = new Portfolio_Gallery_Master_Admin( $this->get_plugin_name(), $this->get_version() );
     153        $plugin_admin = new Portfolio_Gallery_Master_Admin( $this->get_portfolio_gallery_master(), $this->get_version() );
    154154
    155155        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
     
    169169    private function define_public_hooks() {
    170170
    171         $plugin_public = new Portfolio_Gallery_Master_Public( $this->get_plugin_name(), $this->get_version() );
     171        $plugin_public = new Portfolio_Gallery_Master_Public( $this->get_portfolio_gallery_master(), $this->get_version() );
    172172
    173173        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
     
    192192     * @return    string    The name of the plugin.
    193193     */
    194     public function get_plugin_name() {
    195         return $this->plugin_name;
     194    public function get_portfolio_gallery_master() {
     195        return $this->portfolio_gallery_master;
    196196    }
    197197
  • portfolio-gallery-master/trunk/portfolio-gallery-master.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * The plugin bootstrap file
     
    1717 * Plugin URI:        https://icanwp.com/plugins/portfolio-gallery-master/
    1818 * Description:       Portfolio Gallery Master is designed to provide a very simple portfolio administrations using custom post type post. Each post users create under the PGM Portfolio becomes a gallery on the page where they put the shortcode. Each post needs a featured image assigned to the post and it will automatically scaled in the original ratio to be displayed. Each portfolio gallery has a mouse overlay effect that shows the title of the portfolio post. Users can adjust the frame color, font color, overlay background color, and many more from the styles and settings. This plugin also features a responsive mode by default that always show the galleries centered to the parent container and there is a mode where you can set to show a specific number or galleries per row and automatically scale when the browser size changes.
    19  * Version:           1.0.0
     19 * Version:           1.0.5
    2020 * Author:            Web Marketing Smart
    2121 * Author URI:        https://icanwp.com/
     
    3535 * This action is documented in includes/class-portfolio-gallery-master-activator.php
    3636 */
    37 function activate_plugin_name() {
     37function activate_portfolio_gallery_master() {
    3838    require_once plugin_dir_path( __FILE__ ) . 'includes/class-portfolio-gallery-master-activator.php';
    3939    Portfolio_Gallery_Master_Activator::activate();
     
    4444 * This action is documented in includes/class-portfolio-gallery-master-deactivator.php
    4545 */
    46 function deactivate_plugin_name() {
     46function deactivate_portfolio_gallery_master() {
    4747    require_once plugin_dir_path( __FILE__ ) . 'includes/class-portfolio-gallery-master-deactivator.php';
    4848    Portfolio_Gallery_Master_Deactivator::deactivate();
    4949}
    5050
    51 register_activation_hook( __FILE__, 'activate_plugin_name' );
    52 register_deactivation_hook( __FILE__, 'deactivate_plugin_name' );
     51register_activation_hook( __FILE__, 'activate_portfolio_gallery_master' );
     52register_deactivation_hook( __FILE__, 'deactivate_portfolio_gallery_master' );
    5353
    5454/**
  • portfolio-gallery-master/trunk/public/class-portfolio-gallery-master-public.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * The public-facing functionality of the plugin.
     
    2424     * @since    1.0.0
    2525     * @access   private
    26      * @var      string    $plugin_name    The ID of this plugin.
     26     * @var      string    $portfolio_gallery_master    The ID of this plugin.
    2727     */
    28     private $plugin_name;
     28    private $portfolio_gallery_master;
    2929
    3030    /**
     
    4141     *
    4242     * @since    1.0.0
    43      * @param      string    $plugin_name       The name of the plugin.
     43     * @param      string    $portfolio_gallery_master       The name of the plugin.
    4444     * @param      string    $version    The version of this plugin.
    4545     */
    46     public function __construct( $plugin_name, $version ) {
     46    public function __construct( $portfolio_gallery_master, $version ) {
    4747
    48         $this->plugin_name = $plugin_name;
     48        $this->portfolio_gallery_master = $portfolio_gallery_master;
    4949        $this->version = $version;
    5050
     
    5757     */
    5858    public function enqueue_styles() {
    59         wp_enqueue_style( $this->plugin_name . '-pgm-public-css', plugin_dir_url( __FILE__ ) . 'css/portfolio-gallery-master-public.css', array(), $this->version, 'all' );
     59        wp_enqueue_style( $this->portfolio_gallery_master . '-pgm-public-css', plugin_dir_url( __FILE__ ) . 'css/portfolio-gallery-master-public.css', array(), $this->version, 'all' );
    6060    }
    6161
     
    6666     */
    6767    public function enqueue_scripts() {
    68         wp_enqueue_script( $this->plugin_name . '-pgm-public-js' , plugin_dir_url( __FILE__ ) . 'js/portfolio-gallery-master-public.js', array( 'jquery' ), $this->version, false );
    69         wp_enqueue_script( $this->plugin_name . '-pgm-public-hoverdir-js', plugin_dir_url( __FILE__ ) . 'js/jquery.hoverdir.js', array( 'jquery' ), $this->version, false );
    70         wp_enqueue_script( $this->plugin_name . '-pgm-public-modernizer-js', plugin_dir_url( __FILE__ ) . 'js/modernizr.custom.97074.js', array( 'jquery' ), $this->version, false );
     68        wp_enqueue_script( $this->portfolio_gallery_master . '-pgm-public-js' , plugin_dir_url( __FILE__ ) . 'js/portfolio-gallery-master-public.js', array( 'jquery' ), $this->version, false );
     69        wp_enqueue_script( $this->portfolio_gallery_master . '-pgm-public-hoverdir-js', plugin_dir_url( __FILE__ ) . 'js/jquery.hoverdir.js', array( 'jquery' ), $this->version, false );
     70        wp_enqueue_script( $this->portfolio_gallery_master . '-pgm-public-modernizer-js', plugin_dir_url( __FILE__ ) . 'js/modernizr.custom.97074.js', array( 'jquery' ), $this->version, false );
    7171        $pgm_loc = array(
    7272            'pgm_display_mode' => get_option( 'pgm_portfolio_display_mode' ),
     
    7979            'pgm_padding' => get_option( 'pgm_portfolio_padding' )
    8080        );
    81         wp_localize_script( $this->plugin_name . '-pgm-public-js', 'pgm_loc', $pgm_loc );
     81        wp_localize_script( $this->portfolio_gallery_master . '-pgm-public-js', 'pgm_loc', $pgm_loc );
    8282    }
    8383
  • portfolio-gallery-master/trunk/public/partials/portfolio-gallery-master-public-display.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Provide a public-facing view for the plugin
  • portfolio-gallery-master/trunk/uninstall.php

    r1253780 r1355083  
    11<?php
    2 
     2if ( ! defined( 'ABSPATH' ) ) exit;
    33/**
    44 * Fired when the plugin is uninstalled.
Note: See TracChangeset for help on using the changeset viewer.