Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Commit

Permalink
Added new filter 'fly_dir_path'
Browse files Browse the repository at this point in the history
  • Loading branch information
junaidbhura committed Jan 3, 2017
1 parent c8081fe commit 1c2b9be
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
20 changes: 10 additions & 10 deletions fly-dynamic-image-resizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Fly Dynamic Image Resizer
Description: Dynamically create image sizes on the fly!
Version: 1.0.2
Version: 1.0.3
Author: Junaid Bhura
Author URI: http://www.junaidbhura.com
Text Domain: fly-images
Expand All @@ -26,8 +26,16 @@ class Fly_Images {
* Constructor
*/
public function __construct() {
/* Initializations */
add_action( 'init', array( $this, 'init' ) );
}

/**
* Initializes Actions
*/
public function init() {
/* Checks for Fly Images Directory */
$this->_fly_dir = $this->get_fly_dir();
$this->_fly_dir = apply_filters( 'fly_dir_path', $this->get_fly_dir() );

// Check if the Fly Image folder exists and is writeable
if ( ! is_dir( $this->_fly_dir ) ) {
Expand All @@ -39,14 +47,6 @@ public function __construct() {
$this->_fly_dir_writeable = true;
}

/* Initializations */
add_action( 'init', array( $this, 'init' ) );
}

/**
* Initializes Actions
*/
public function init() {
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
add_filter( 'media_row_actions', array( $this, 'media_row_action' ), 10, 2 );
add_action( 'delete_attachment', array( $this, 'delete_attachment' ) );
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: junaidbhura
Tags: media library, images, resize, dynamic, on the fly
Requires at least: 3.0
Tested up to: 4.7
Stable tag: 1.0.2
Stable tag: 1.0.3

Dynamically create image sizes on the fly!

Expand Down Expand Up @@ -101,6 +101,9 @@ Create dynamic image sizes in your PHP code!

== Changelog ==

= 1.0.3 =
* Added new filter 'fly_dir_path'.

= 1.0.2 =
* Fixed IIS URLs.

Expand Down

0 comments on commit 1c2b9be

Please sign in to comment.