Skip to content

Commit

Permalink
Release v2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
azurecurve committed Sep 17, 2022
1 parent 842a67f commit 3c654ac
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 34 deletions.
27 changes: 14 additions & 13 deletions azrcrv-icons.php
Expand Up @@ -3,7 +3,7 @@
* ------------------------------------------------------------------------------
* Plugin Name: Icons
* Description: Allows icons to be added to posts and pages using a shortcode.
* Version: 2.1.0
* Version: 2.1.1
* Author: azurecurve
* Author URI: https://development.azurecurve.co.uk/classicpress-plugins/
* Plugin URI: https://development.azurecurve.co.uk/classicpress-plugins/icons/
Expand Down Expand Up @@ -35,6 +35,7 @@
const PLUGIN_SLUG = 'azrcrv-' . PLUGIN_SHORT_SLUG;
const PLUGIN_HYPHEN = 'azrcrv-i';
const PLUGIN_UNDERSCORE = 'azrcrv_i';
const PLUGIN_FILE = __FILE__;

/**
* Prevent direct access.
Expand All @@ -46,55 +47,55 @@
/**
* Include plugin Menu Client.
*/
require_once dirname( __FILE__ ) . '/includes/azurecurve-menu-populate.php';
require_once dirname( __FILE__ ) . '/includes/azurecurve-menu-display.php';
require_once dirname( PLUGIN_FILE ) . '/includes/azurecurve-menu-populate.php';
require_once dirname( PLUGIN_FILE ) . '/includes/azurecurve-menu-display.php';

/**
* Include Update Client.
*/
require_once dirname( __FILE__ ) . '/libraries/updateclient/UpdateClient.class.php';
require_once dirname( PLUGIN_FILE ) . '/libraries/updateclient/UpdateClient.class.php';

/**
* Include setup of registration activation hook, actions, filters and shortcodes.
*/
require_once dirname( __FILE__ ) . '/includes/setup.php';
require_once dirname( PLUGIN_FILE ) . '/includes/setup.php';

/**
* Load styles functions.
*/
require_once dirname( __FILE__ ) . '/includes/functions-styles.php';
require_once dirname( PLUGIN_FILE ) . '/includes/functions-styles.php';

/**
* Load scripts functions.
*/
require_once dirname( __FILE__ ) . '/includes/functions-scripts.php';
require_once dirname( PLUGIN_FILE ) . '/includes/functions-scripts.php';

/**
* Load menu functions.
*/
require_once dirname( __FILE__ ) . '/includes/functions-menu.php';
require_once dirname( PLUGIN_FILE ) . '/includes/functions-menu.php';

/**
* Load language functions.
*/
require_once dirname( __FILE__ ) . '/includes/functions-language.php';
require_once dirname( PLUGIN_FILE ) . '/includes/functions-language.php';

/**
* Load plugin image functions.
*/
require_once dirname( __FILE__ ) . '/includes/functions-plugin-images.php';
require_once dirname( PLUGIN_FILE ) . '/includes/functions-plugin-images.php';

/**
* Load settings functions.
*/
require_once dirname( __FILE__ ) . '/includes/functions-settings.php';
require_once dirname( PLUGIN_FILE ) . '/includes/functions-settings.php';

/**
* Load plugin functionality.
*/
require_once dirname( __FILE__ ) . '/includes/plugin-functionality.php';
require_once dirname( PLUGIN_FILE ) . '/includes/plugin-functionality.php';

/**
* Load backward compatibility.
*/
require_once dirname( __FILE__ ) . '/includes/plugin-backward-compatibility.php';
require_once dirname( PLUGIN_FILE ) . '/includes/plugin-backward-compatibility.php';
16 changes: 2 additions & 14 deletions includes/functions-plugin-images.php
Expand Up @@ -5,31 +5,19 @@

/**
* Declare the Namespace.
*
* @since 1.0.0
*/
namespace azurecurve\Icons;

/**
* Custom plugin image path.
*
* @since 1.2.0
*/
function custom_image_path( $path ) {
if ( strpos( $path, PLUGIN_SLUG ) !== false ) {
$path = plugin_dir_path( __FILE__ ) . '../assets/images';
}
return $path;
return plugin_dir_path( PLUGIN_FILE ) . 'assets/images';
}

/**
* Custom plugin image url.
*
* @since 1.2.0
*/
function custom_image_url( $url ) {
if ( strpos( $url, PLUGIN_SLUG ) !== false ) {
$url = esc_url_raw( plugin_dir_url( __FILE__ ) . '../assets/images' );
}
return $url;
return esc_url_raw( plugin_dir_url( PLUGIN_FILE ) . 'assets/images' );
}
8 changes: 3 additions & 5 deletions includes/setup.php
Expand Up @@ -28,14 +28,12 @@
add_action( 'admin_post_' . PLUGIN_UNDERSCORE . '_save_options', __NAMESPACE__ . '\\save_options' );
add_action( 'admin_post_' . PLUGIN_UNDERSCORE . '_upload_image', __NAMESPACE__ . '\\upload_image' );

// add additional actions.

// add filters.
add_filter( 'plugin_action_links', __NAMESPACE__ . '\\add_plugin_action_link', 10, 2 );
add_filter( 'codepotent_update_manager_image_path', __NAMESPACE__ . '\\custom_image_path' );
add_filter( 'codepotent_update_manager_image_url', __NAMESPACE__ . '\\custom_image_url' );

// add additional filters.
$plugin_slug_for_um = plugin_basename( trim( PLUGIN_FILE ) );
add_filter( 'codepotent_update_manager_' . $plugin_slug_for_um . '_image_path', __NAMESPACE__ . '\\custom_image_path' );
add_filter( 'codepotent_update_manager_' . $plugin_slug_for_um . '_image_url', __NAMESPACE__ . '\\custom_image_url' );

// add shortcodes.
add_shortcode( 'icon', __NAMESPACE__ . '\\shortcode_display_icon' );
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
@@ -1,12 +1,12 @@
=== Icons ===

Description: Allows a 16x16 icon to be displayed in a post or page using a shortcode.
Version: 2.1.0
Version: 2.1.1
Tags: icon, icons, posts, pages
Author: azurecurve
Author URI: https://development.azurecurve.co.uk/
Plugin URI: https://development.azurecurve.co.uk/classicpress-plugins/icons/
Download link: https://github.com/azurecurve/azrcrv-icons/releases/download/v2.1.0/azrcrv-icons.zip
Download link: https://github.com/azurecurve/azrcrv-icons/releases/download/v2.1.1/azrcrv-icons.zip
Donate link: https://development.azurecurve.co.uk/support-development/
Requires PHP: 5.6
Requires: 1.0.0
Expand Down Expand Up @@ -57,6 +57,9 @@ This plugin is developed for ClassicPress, but will likely work on WordPress.

# Changelog

### [Version 2.1.1](https://github.com/azurecurve/azrcrv-icons/releases/tag/v2.1.1)
* Fix Update Manager View Details link (contributed by xxsimoxx).

### [Version 2.1.0](https://github.com/azurecurve/azrcrv-icons/releases/tag/v2.1.0)
* Standardise handling of developer name and url.
* Update language template.
Expand Down

0 comments on commit 3c654ac

Please sign in to comment.