Changeset 1905033
- Timestamp:
- 07/06/2018 07:14:38 AM (8 years ago)
- Location:
- cookie-law-info
- Files:
-
- 51 added
- 6 edited
-
nbproject (added)
-
nbproject/private (added)
-
nbproject/private/private.properties (added)
-
nbproject/project.properties (added)
-
nbproject/project.xml (added)
-
tags/1.5.9 (added)
-
tags/1.5.9/admin (added)
-
tags/1.5.9/admin/cli-admin-page.php (added)
-
tags/1.5.9/admin/cli-admin.js (added)
-
tags/1.5.9/admin/cli-admin.php (added)
-
tags/1.5.9/cookie-law-info.php (added)
-
tags/1.5.9/css (added)
-
tags/1.5.9/css/cli-admin-style.css (added)
-
tags/1.5.9/css/cli-style.css (added)
-
tags/1.5.9/css/cli-tables.css (added)
-
tags/1.5.9/i18n (added)
-
tags/1.5.9/i18n/cookie-law-info-da_DK.mo (added)
-
tags/1.5.9/i18n/cookie-law-info-da_DK.po (added)
-
tags/1.5.9/images (added)
-
tags/1.5.9/images/collapse.png (added)
-
tags/1.5.9/images/cross.png (added)
-
tags/1.5.9/images/expand.png (added)
-
tags/1.5.9/images/overlay.png (added)
-
tags/1.5.9/images/td_back.gif (added)
-
tags/1.5.9/images/tick.png (added)
-
tags/1.5.9/js (added)
-
tags/1.5.9/js/admin-ui-controller.js (added)
-
tags/1.5.9/js/cookielawinfo.js (added)
-
tags/1.5.9/nbproject (added)
-
tags/1.5.9/nbproject/private (added)
-
tags/1.5.9/nbproject/private/private.properties (added)
-
tags/1.5.9/nbproject/private/private.xml (added)
-
tags/1.5.9/nbproject/project.properties (added)
-
tags/1.5.9/nbproject/project.xml (added)
-
tags/1.5.9/php (added)
-
tags/1.5.9/php/custom-post-types.php (added)
-
tags/1.5.9/php/functions.php (added)
-
tags/1.5.9/php/shortcodes.php (added)
-
tags/1.5.9/readme.txt (added)
-
tags/1.5.9/screenshot-1.png (added)
-
tags/1.5.9/screenshot-2.png (added)
-
tags/1.5.9/screenshot-3.png (added)
-
tags/1.5.9/screenshot-4.png (added)
-
tags/1.5.9/screenshot-5.png (added)
-
tags/1.5.9/wpml-config.xml (added)
-
trunk/admin/cli-admin-page.php (modified) (1 diff)
-
trunk/cookie-law-info.php (modified) (3 diffs)
-
trunk/js/cookielawinfo.js (modified) (1 diff)
-
trunk/nbproject (added)
-
trunk/nbproject/private (added)
-
trunk/nbproject/private/private.properties (added)
-
trunk/nbproject/private/private.xml (added)
-
trunk/nbproject/project.properties (added)
-
trunk/nbproject/project.xml (added)
-
trunk/php/functions.php (modified) (2 diffs)
-
trunk/php/shortcodes.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cookie-law-info/trunk/admin/cli-admin-page.php
r1885932 r1905033 845 845 // Store sanitised values only: 846 846 847 $stored_options[$key] = wp_unslash($_POST[$key]);847 $stored_options[$key] = sanitize_textarea_field(wp_unslash($_POST[$key])); 848 848 } 849 849 } -
cookie-law-info/trunk/cookie-law-info.php
r1899112 r1905033 6 6 Author: webtoffee 7 7 Author URI: https://www.webtoffee.com/product/gdpr-cookie-consent/ 8 Version: 1.5. 88 Version: 1.5.9 9 9 License: GPL2 10 10 Text Domain: cookie-law-info … … 111 111 112 112 // Bye bye custom meta: 113 global $post;114 113 $args = array('post_type' => 'cookielawinfo'); 115 $ cookies = new WP_Query( $args);114 $posts = get_posts($args); 116 115 117 if ( !$ cookies->have_posts()) {116 if ( !$posts ) { 118 117 return; 119 118 } 120 119 121 while ( $cookies->have_posts() ) : $cookies->the_post(); 122 // Get custom fields: 123 $custom = get_post_custom( $post->ID ); 120 if( $posts ) 121 { 122 foreach( $posts as $post ) 123 { 124 $custom = get_post_custom( $post->ID ); 124 125 // Look for old values. If they exist, move them to new values then delete old values: 125 126 if ( isset ( $custom["cookie_type"][0] ) ) { … … 135 136 delete_post_meta( $post->ID, "_cli_cookie_duration", $custom["_cli_cookie_duration"][0] ); 136 137 } 137 endwhile; 138 } 139 } 140 138 141 } 139 142 -
cookie-law-info/trunk/js/cookielawinfo.js
r1899112 r1905033 1 1 function cli_show_cookiebar(p) { 2 /* plugin version 1.5. 8*/2 /* plugin version 1.5.9 */ 3 3 var Cookie = { 4 4 set: function(name,value,days) { -
cookie-law-info/trunk/php/functions.php
r1885932 r1905033 133 133 * Force reload 134 134 */ 135 $version = '1.5. 4';135 $version = '1.5.9'; 136 136 137 137 wp_register_style( 'cookielawinfo-style', CLI_PLUGIN_URL . 'css/cli-style.css', null, $version ); … … 150 150 151 151 152 function get_non_necessary_cookie_ids() {152 function get_non_necessary_cookie_ids() { 153 153 global $wpdb; 154 155 $args = array( 156 'post_type' => 'cookielawinfo', 157 'meta_query' => array( 158 array( 159 'key' => '_cli_cookie_sensitivity', 160 'value' => 'non-necessary' 161 ) 162 ) 163 164 ); 165 $cookies = new WP_Query( $args ); 166 167 if ( !$cookies->have_posts() ) { 168 return; 169 } 170 $cookie_slugs = array(); 171 172 while($cookies->have_posts()): 173 174 $cookies->the_post(); 175 global $post; 176 $cookie_slugs[] = get_post_meta( $post->ID, "_cli_cookie_slugid", true); 177 178 endwhile; 179 180 return $cookie_slugs; 154 155 $args = array( 156 'post_type' => 'cookielawinfo', 157 'meta_query' => array( 158 array( 159 'key' => '_cli_cookie_sensitivity', 160 'value' => 'non-necessary' 161 ) 162 ) 163 ); 164 $posts = get_posts($args); 165 166 if (!$posts) { 167 return; 168 } 169 $cookie_slugs = array(); 170 171 if ($posts) { 172 foreach ($posts as $post) { 173 $cookie_slugs[] = get_post_meta($post->ID, "_cli_cookie_slugid", true); 174 } 175 } 176 177 return $cookie_slugs; 181 178 } 182 179 -
cookie-law-info/trunk/php/shortcodes.php
r1883791 r1905033 71 71 ), $atts ) ); 72 72 73 global $post;74 73 75 74 $args = array( … … 80 79 'orderby' => 'title' 81 80 ); 82 $ cookies = new WP_Query( $args);81 $posts = get_posts($args); 83 82 84 83 $ret = '<table class="cookielawinfo-' . $style . '"><thead><tr>'; … … 97 96 $ret .= '</thead><tbody>'; 98 97 99 if ( !$cookies->have_posts() ) { 100 $ret .= '<tr class="cookielawinfo-row"><td colspan="2" class="cookielawinfo-column-empty">' . $not_shown_message . '</td></tr>'; 101 } 102 103 while ( $cookies->have_posts() ) : $cookies->the_post(); 104 // Get custom fields: 98 if ( !$posts ) { 99 $ret .= '<tr class="cookielawinfo-row"><td colspan="4" class="cookielawinfo-column-empty">' . $not_shown_message . '</td></tr>'; 100 } 101 if( $posts ) 102 { 103 foreach( $posts as $post ) 104 { 105 105 $custom = get_post_custom( $post->ID ); 106 106 $cookie_type = ( isset ( $custom["_cli_cookie_type"][0] ) ) ? $custom["_cli_cookie_type"][0] : ''; 107 107 $cookie_duration = ( isset ( $custom["_cli_cookie_duration"][0] ) ) ? $custom["_cli_cookie_duration"][0] : ''; 108 108 // Output HTML: 109 $ret .= '<tr class="cookielawinfo-row"><td class="cookielawinfo-column-1">' . get_the_title(). '</td>';109 $ret .= '<tr class="cookielawinfo-row"><td class="cookielawinfo-column-1">' . $post->post_title . '</td>'; 110 110 $ret .= '<td class="cookielawinfo-column-2">' . $cookie_type .'</td>'; 111 111 $ret .= '<td class="cookielawinfo-column-3">' . $cookie_duration .'</td>'; 112 $ret .= '<td class="cookielawinfo-column-4">' . get_the_content() .'</td>'; 112 $ret .= '<td class="cookielawinfo-column-4">' . $post->post_content .'</td>'; 113 $ret = apply_filters('cli_new_column_values_to_audit_table',$ret, $custom); 113 114 $ret .= '</tr>'; 114 endwhile; 115 116 } 117 } 115 118 $ret .= '</tbody></table>'; 116 119 return $ret; 120 117 121 } 118 122 -
cookie-law-info/trunk/readme.txt
r1899124 r1905033 5 5 Requires at least: 3.3.1 6 6 Tested up to: 4.9.6 7 Stable tag: 1.5. 87 Stable tag: 1.5.9 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 167 167 == Changelog == 168 168 169 = 1.5.9 = 170 171 * Issue with the plugin interfering with breadcrumb fixed. 172 169 173 = 1.5.8 = 170 174 171 * Support for <u>in the message bar.175 * Support for underline tag in the message bar. 172 176 173 177 = 1.5.7 = … … 270 274 == Upgrade Notice == 271 275 272 = 1.5.8 = 273 274 * Support for <u> in the message bar. 276 = 1.5.9 = 277 278 * Issue with the plugin interfering with breadcrumb fixed. 279 280
Note: See TracChangeset
for help on using the changeset viewer.