Version Description
Download this release
Release Info
Developer | ryanhellyer |
Plugin | Unique Headers |
Version | 1.4.6 |
Comparing to | |
See all releases |
Code changes from version 1.4.5 to 1.4.6
- inc/class-dotorg-plugin-review.php +2 -10
- inc/class-unique-headers-taxonomy-header-images.php +4 -5
- index.php +4 -4
- readme.txt +2 -1
inc/class-dotorg-plugin-review.php
CHANGED
@@ -53,23 +53,15 @@ class DotOrg_Plugin_Review {
|
|
53 |
public function seconds_to_words( $seconds ) {
|
54 |
|
55 |
// Get the years
|
56 |
-
$years = ( intval( $seconds ) / YEAR_IN_SECONDS ) %
|
57 |
if ( $years > 1 ) {
|
58 |
return sprintf( __( '%s years', $this->slug ), $years );
|
59 |
} elseif ( $years > 0) {
|
60 |
return __( 'a year', $this->slug );
|
61 |
}
|
62 |
|
63 |
-
// Get the months
|
64 |
-
$months = ( intval( $seconds ) / MONTH_IN_SECONDS ) % 4;
|
65 |
-
if ( $months > 1 ) {
|
66 |
-
return sprintf( __( '%s months', $this->slug ), $months );
|
67 |
-
} elseif ( $months > 0) {
|
68 |
-
return __( 'a month', $this->slug );
|
69 |
-
}
|
70 |
-
|
71 |
// Get the weeks
|
72 |
-
$weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) %
|
73 |
if ( $weeks > 1 ) {
|
74 |
return sprintf( __( '%s weeks', $this->slug ), $weeks );
|
75 |
} elseif ( $weeks > 0) {
|
53 |
public function seconds_to_words( $seconds ) {
|
54 |
|
55 |
// Get the years
|
56 |
+
$years = ( intval( $seconds ) / YEAR_IN_SECONDS ) % 100;
|
57 |
if ( $years > 1 ) {
|
58 |
return sprintf( __( '%s years', $this->slug ), $years );
|
59 |
} elseif ( $years > 0) {
|
60 |
return __( 'a year', $this->slug );
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
// Get the weeks
|
64 |
+
$weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) % 52;
|
65 |
if ( $weeks > 1 ) {
|
66 |
return sprintf( __( '%s weeks', $this->slug ), $weeks );
|
67 |
} elseif ( $weeks > 0) {
|
inc/class-unique-headers-taxonomy-header-images.php
CHANGED
@@ -92,16 +92,17 @@ class Unique_Header_Taxonomy_Header_Images {
|
|
92 |
$this->taxonomies = $args['taxonomies'];
|
93 |
$this->upload_header_image = $args['upload_header_image'];
|
94 |
|
95 |
-
add_action( '
|
|
|
96 |
}
|
97 |
|
98 |
/**
|
99 |
-
*
|
100 |
*
|
101 |
* @author Ryan Hellyer <ryanhellyer@gmail.com>
|
102 |
* @since 1.0
|
103 |
*/
|
104 |
-
public function
|
105 |
|
106 |
// Add actions for administration pages
|
107 |
if ( is_admin() ) {
|
@@ -114,8 +115,6 @@ class Unique_Header_Taxonomy_Header_Images {
|
|
114 |
|
115 |
}
|
116 |
|
117 |
-
add_filter( 'theme_mod_header_image', array( $this, 'header_image_filter' ), 5 );
|
118 |
-
|
119 |
}
|
120 |
|
121 |
/*
|
92 |
$this->taxonomies = $args['taxonomies'];
|
93 |
$this->upload_header_image = $args['upload_header_image'];
|
94 |
|
95 |
+
add_action( 'admin_init', array( $this, 'add_fields' ) );
|
96 |
+
add_filter( 'theme_mod_header_image', array( $this, 'header_image_filter' ), 5 );
|
97 |
}
|
98 |
|
99 |
/**
|
100 |
+
* Adding fields to taxonomy pages.
|
101 |
*
|
102 |
* @author Ryan Hellyer <ryanhellyer@gmail.com>
|
103 |
* @since 1.0
|
104 |
*/
|
105 |
+
public function add_fields() {
|
106 |
|
107 |
// Add actions for administration pages
|
108 |
if ( is_admin() ) {
|
115 |
|
116 |
}
|
117 |
|
|
|
|
|
118 |
}
|
119 |
|
120 |
/*
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Unique Headers
|
4 |
Plugin URI: https://geek.hellyer.kiwi/plugins/unique-headers/
|
5 |
Description: Unique Headers
|
6 |
-
Version: 1.4.
|
7 |
Author: Ryan Hellyer
|
8 |
Author URI: https://geek.hellyer.kiwi/
|
9 |
Text Domain: unique-headers
|
@@ -64,7 +64,7 @@ class Unique_Headers_Instantiate {
|
|
64 |
require( 'inc/class-unique-headers-display.php' );
|
65 |
require( 'inc/class-custom-image-meta-box.php' );
|
66 |
require( 'inc/legacy.php' );
|
67 |
-
|
68 |
// Loading dotorg plugin review code
|
69 |
if ( is_admin() ) {
|
70 |
require( 'inc/class-dotorg-plugin-review.php' );
|
@@ -72,11 +72,11 @@ class Unique_Headers_Instantiate {
|
|
72 |
array(
|
73 |
'slug' => 'unique-headers', // The plugin slug
|
74 |
'name' => 'Unique Headers', // The plugin name
|
75 |
-
'time_limit' =>
|
76 |
)
|
77 |
);
|
78 |
}
|
79 |
-
|
80 |
// Add hooks
|
81 |
add_action( 'plugins_loaded', array( $this, 'localization' ), 5 );
|
82 |
add_action( 'init', array( $this, 'instantiate_classes' ) );
|
3 |
Plugin Name: Unique Headers
|
4 |
Plugin URI: https://geek.hellyer.kiwi/plugins/unique-headers/
|
5 |
Description: Unique Headers
|
6 |
+
Version: 1.4.6
|
7 |
Author: Ryan Hellyer
|
8 |
Author URI: https://geek.hellyer.kiwi/
|
9 |
Text Domain: unique-headers
|
64 |
require( 'inc/class-unique-headers-display.php' );
|
65 |
require( 'inc/class-custom-image-meta-box.php' );
|
66 |
require( 'inc/legacy.php' );
|
67 |
+
|
68 |
// Loading dotorg plugin review code
|
69 |
if ( is_admin() ) {
|
70 |
require( 'inc/class-dotorg-plugin-review.php' );
|
72 |
array(
|
73 |
'slug' => 'unique-headers', // The plugin slug
|
74 |
'name' => 'Unique Headers', // The plugin name
|
75 |
+
'time_limit' => MINUTE_IN_SECONDS, // The time limit at which notice is shown
|
76 |
)
|
77 |
);
|
78 |
}
|
79 |
+
|
80 |
// Add hooks
|
81 |
add_action( 'plugins_loaded', array( $this, 'localization' ), 5 );
|
82 |
add_action( 'init', array( $this, 'instantiate_classes' ) );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: custom-header, header, headers, images, page, post, plugin, image, images,
|
|
4 |
Donate link: https://geek.hellyer.kiwi/donate/
|
5 |
Requires at least: 4.3
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 1.4.
|
8 |
|
9 |
|
10 |
|
@@ -126,6 +126,7 @@ No, I'm too busy. Having said that, if you are willing to pay me a small fortune
|
|
126 |
|
127 |
== Changelog ==
|
128 |
|
|
|
129 |
Version 1.4.5: Removing plugin review notice due to unsolvable errors.
|
130 |
Version 1.4.4: Adding plugin review class back, with correct time stamp set.
|
131 |
Version 1.4.3: Temporarily removing plugin review class until bugs are fixed.
|
4 |
Donate link: https://geek.hellyer.kiwi/donate/
|
5 |
Requires at least: 4.3
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 1.4.6
|
8 |
|
9 |
|
10 |
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
Version 1.4.6: Fixing bug with handling taxonomies. Added plugin review notice back, but without the non-existent MONTH_IN_SECONDS constant.
|
130 |
Version 1.4.5: Removing plugin review notice due to unsolvable errors.
|
131 |
Version 1.4.4: Adding plugin review class back, with correct time stamp set.
|
132 |
Version 1.4.3: Temporarily removing plugin review class until bugs are fixed.
|