Skip to content

Commit

Permalink
Merge branch 'release-1.2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
archetyped committed Jan 8, 2016
2 parents 8566209 + 2b93656 commit 77b0785
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 34 deletions.
7 changes: 0 additions & 7 deletions includes/class.base.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ class FVRT_Base {
*/
var $debug;

/**
* Legacy constructor
*/
function FVRT_Base() {
$this->__construct();
}

/**
* Constructor
*/
Expand Down
20 changes: 8 additions & 12 deletions includes/class.media.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@ class FVRT_Media extends FVRT_Base {
*/
var $type_current = null;

/**
* Legacy Constructor
*/
function FVRT_Media() {
$this->__construct();
}

/**
* Constructor
*/
Expand Down Expand Up @@ -399,7 +392,7 @@ function media_upload_mime_type_links($type_links) {
*/
function attachment_fields_to_edit($form_fields, $attachment) {
if ( $this->is_custom_media() ) {
$post =& get_post($attachment);
$post = get_post($attachment);
//Clear all form fields
$form_fields = array();
if ( isset($post->post_mime_type) && 0 === strpos($post->post_mime_type, 'image/') && ( $q = $this->get_request_props() ) && false !== $q ) {
Expand Down Expand Up @@ -856,12 +849,15 @@ function &get_types() {
*/
function get_type($type) {
//Normalize
if ( is_object($type) )
if ( is_object($type) ) {
$type = get_object_vars($type);
if ( is_array($type) && isset($type['name']) )
$type = $type['name'];
if ( !is_string($type) )
}
if ( is_array($type) && isset($type['type_name']) ) {
$type = $type['type_name'];
}
if ( !is_string($type) ) {
$type = strval($type);
}

$types =& $this->get_types();
//Fetch type
Expand Down
4 changes: 0 additions & 4 deletions includes/class.utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
*/
class FVRT_Utilities {

function FVRT_Utilities() {
$this->__construct();
}

function __construct() {

}
Expand Down
2 changes: 1 addition & 1 deletion main.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Favicon Rotator
Plugin URI: http://archetyped.com/tools/favicon-rotator/
Description: Easily set site favicon and even rotate through multiple icons
Version: 1.2.5
Version: 1.2.6
Author: Archetyped
Author URI: http://archetyped.com
*/
Expand Down
17 changes: 9 additions & 8 deletions model.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ class FaviconRotator extends FVRT_Base {

/*-** Initialization **-*/

function FaviconRotator() {
$this->__construct();
}

function __construct() {
parent::__construct();
$this->opt_key = $this->add_prefix($this->opt_key);
Expand Down Expand Up @@ -399,7 +395,8 @@ function display_icon($type) {
//Select random icon
$idx = ( count($icons) > 1 ) ? array_rand($icons) : 0;
$icon_id = $icons[$idx];
$icon = array_shift($this->media->get_icon_src($icon_id, $type));
$icon_src = $this->media->get_icon_src($icon_id, $type);
$icon = array_shift($icon_src);
//Validate icon
if ( !is_string($icon) || empty($icon) ) {
//Reset variable to NULL (will loop to next icon)
Expand Down Expand Up @@ -497,8 +494,10 @@ function admin_page() {
<p id="fv_msg_empty_<?php echo $t->type_name; ?>"<?php if ( $icons ) echo ' style="display: none;"'?>><?php _e($t->lbl_empty); ?></p>
<ul id="fv_item_wrap_<?php echo $t->type_name; ?>" class="fv_item_wrap <?php echo ( is_null($t->limit) ) ? 'multi' : 'single'; ?>">
<?php foreach ( $icons as $icon ) : //List icons
$icon_src = array_shift($this->media->get_icon_src($icon->ID, $t->type_name));
$src = array_shift(wp_get_attachment_image_src($icon->ID, 'full'));
$icon_srcs = $this->media->get_icon_src($icon->ID, $t->type_name);
$icon_src = array_shift($icon_srcs);
$icon_media = wp_get_attachment_image_src($icon->ID, 'full');
$src = array_shift($icon_media);
?>
<li class="fv_item">
<div>
Expand All @@ -511,7 +510,9 @@ function admin_page() {
</div>
</div>
</li>
<?php endforeach; //End icon listing ?>
<?php endforeach; //End icon listing
unset($icon_srcs, $icon_src, $icon_media, $src);
?>
</ul>
<div style="display: none">
<li id="fv_item_temp_<?php echo $t->type_name; ?>" class="fv_item">
Expand Down
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: Archetyped
Donate link: http://mycharitywater.org/archetyped-2012-fall
Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android
Requires at least: 3.8
Tested up to: 3.8
Requires at least: 4.4
Tested up to: 4.4
Stable tag: trunk

Easily set site favicon and even rotate through multiple icons
Expand Down Expand Up @@ -48,6 +48,11 @@ No upgrade notices
1. Favicon submenu in Appearance menu

== Changelog ==

= 1.2.6 =
* Update: WordPress compatibility (4.4)
* Optimize: PHP standards

= 1.2.5 =
* Update: WordPress 3.8 support

Expand Down

0 comments on commit 77b0785

Please sign in to comment.