diff --git a/includes/class.base.php b/includes/class.base.php index ecc3277..6c048d8 100644 --- a/includes/class.base.php +++ b/includes/class.base.php @@ -27,13 +27,6 @@ class FVRT_Base { */ var $debug; - /** - * Legacy constructor - */ - function FVRT_Base() { - $this->__construct(); - } - /** * Constructor */ diff --git a/includes/class.media.php b/includes/class.media.php index 4213cc5..5a4a581 100644 --- a/includes/class.media.php +++ b/includes/class.media.php @@ -65,13 +65,6 @@ class FVRT_Media extends FVRT_Base { */ var $type_current = null; - /** - * Legacy Constructor - */ - function FVRT_Media() { - $this->__construct(); - } - /** * Constructor */ @@ -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 ) { @@ -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 diff --git a/includes/class.utilities.php b/includes/class.utilities.php index 12ac2ae..1dcb2b3 100644 --- a/includes/class.utilities.php +++ b/includes/class.utilities.php @@ -10,10 +10,6 @@ */ class FVRT_Utilities { - function FVRT_Utilities() { - $this->__construct(); - } - function __construct() { } diff --git a/main.php b/main.php index b444046..a659d4c 100644 --- a/main.php +++ b/main.php @@ -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 */ diff --git a/model.php b/model.php index 6b3ce81..70c03b9 100644 --- a/model.php +++ b/model.php @@ -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); @@ -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) @@ -497,8 +494,10 @@ function admin_page() {