Version Description
- Added plugin settings page link to plugins.php
- Bug fix: custom posts bug affecting some other plugins
Download this release
Release Info
Developer | richardashby |
Plugin | Cookie Law / GDPR Info |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.2.1
- cookie-law-info.php +10 -1
- php/custom-post-types.php +0 -29
- readme.txt +5 -1
cookie-law-info.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/extend/plugins/cookie-law-info/description/
|
|
5 |
Description: A simple way of 'implied consent' to show your website complies with the EU Cookie Law, which came into force on 26 May 2012.
|
6 |
Author: Richard Ashby
|
7 |
Author URI: http://www.cookielawinfo.com/
|
8 |
-
Version: 1.2
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
@@ -92,6 +92,15 @@ add_filter( 'manage_edit-cookielawinfo_columns', 'cookielawinfo_edit_columns' );
|
|
92 |
add_action( 'manage_posts_custom_column', 'cookielawinfo_custom_columns' );
|
93 |
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
/** Register the uninstall function */
|
96 |
function cookielawinfo_activate() {
|
97 |
register_uninstall_hook( __FILE__, 'cookielawinfo_uninstall_plugin' );
|
5 |
Description: A simple way of 'implied consent' to show your website complies with the EU Cookie Law, which came into force on 26 May 2012.
|
6 |
Author: Richard Ashby
|
7 |
Author URI: http://www.cookielawinfo.com/
|
8 |
+
Version: 1.2.1
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
92 |
add_action( 'manage_posts_custom_column', 'cookielawinfo_custom_columns' );
|
93 |
|
94 |
|
95 |
+
// 12/05 edit
|
96 |
+
// Add plugin settings / more plugins link to the WordPress dashboard 'plugins' page:
|
97 |
+
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'cookielawinfo_plugin_action_links' );
|
98 |
+
function cookielawinfo_plugin_action_links( $links ) {
|
99 |
+
$links[] = '<a href="'. get_admin_url(null, 'edit.php?post_type=cookielawinfo&page=cookie-law-info') .'">Settings</a>';
|
100 |
+
return $links;
|
101 |
+
}
|
102 |
+
|
103 |
+
|
104 |
/** Register the uninstall function */
|
105 |
function cookielawinfo_activate() {
|
106 |
register_uninstall_hook( __FILE__, 'cookielawinfo_uninstall_plugin' );
|
php/custom-post-types.php
CHANGED
@@ -66,35 +66,6 @@ function cookielawinfo_register_custom_post_type() {
|
|
66 |
'supports' => array( 'title','editor' )
|
67 |
);
|
68 |
register_post_type( 'cookielawinfo' , $args );
|
69 |
-
|
70 |
-
// Migrate custom meta:
|
71 |
-
cookielawinfo_migrate_custom_meta();
|
72 |
-
}
|
73 |
-
|
74 |
-
|
75 |
-
/** Updates custom meta to fix bug in version 1.0.1 */
|
76 |
-
function cookielawinfo_migrate_custom_meta() {
|
77 |
-
global $post;
|
78 |
-
$args = array('post_type' => 'cookielawinfo');
|
79 |
-
$cookies = new WP_Query( $args );
|
80 |
-
|
81 |
-
if ( !$cookies->have_posts() ) {
|
82 |
-
return;
|
83 |
-
}
|
84 |
-
|
85 |
-
while ( $cookies->have_posts() ) : $cookies->the_post();
|
86 |
-
// Get custom fields:
|
87 |
-
$custom = get_post_custom( $post->ID );
|
88 |
-
// Look for old values. If they exist, move them to new values then delete old values:
|
89 |
-
if ( isset ( $custom["cookie_type"][0] ) ) {
|
90 |
-
update_post_meta( $post->ID, "_cli_cookie_type", sanitize_text_field( $custom["cookie_type"][0] ) );
|
91 |
-
delete_post_meta( $post->ID, "cookie_type", $custom["cookie_type"][0] );
|
92 |
-
}
|
93 |
-
if ( isset ( $custom["cookie_duration"][0] ) ) {
|
94 |
-
update_post_meta( $post->ID, "_cli_cookie_duration", sanitize_text_field( $custom["cookie_duration"][0] ) );
|
95 |
-
delete_post_meta( $post->ID, "cookie_duration", $custom["cookie_duration"][0] );
|
96 |
-
}
|
97 |
-
endwhile;
|
98 |
}
|
99 |
|
100 |
|
66 |
'supports' => array( 'title','editor' )
|
67 |
);
|
68 |
register_post_type( 'cookielawinfo' , $args );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://mobro.co/richashby
|
|
4 |
Tags: eu cookie law, cookie law, eu privacy directive, privacy directive, cookies, privacy, compliance
|
5 |
Requires at least: 3.3.1
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 1.2
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -165,6 +165,10 @@ The more information you give, the quicker I can respond.
|
|
165 |
|
166 |
== Changelog ==
|
167 |
|
|
|
|
|
|
|
|
|
168 |
= 1.2 =
|
169 |
* Removed 3rd party JavaScript "jQuery.cookie" which can cause issues with certain versions of Apache server
|
170 |
* Added native JavaScript cookie getter/setter
|
4 |
Tags: eu cookie law, cookie law, eu privacy directive, privacy directive, cookies, privacy, compliance
|
5 |
Requires at least: 3.3.1
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.2.1
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
165 |
|
166 |
== Changelog ==
|
167 |
|
168 |
+
= 1.2.1 =
|
169 |
+
* Added plugin settings page link to plugins.php
|
170 |
+
* Bug fix: custom posts bug affecting some other plugins
|
171 |
+
|
172 |
= 1.2 =
|
173 |
* Removed 3rd party JavaScript "jQuery.cookie" which can cause issues with certain versions of Apache server
|
174 |
* Added native JavaScript cookie getter/setter
|