Changeset 3235962
- Timestamp:
- 02/06/2025 11:26:10 AM (13 months ago)
- Location:
- iteras/trunk
- Files:
-
- 6 edited
-
DEVELOPMENT.txt (modified) (1 diff)
-
README.txt (modified) (2 diffs)
-
admin/iteras-admin.php (modified) (10 diffs)
-
admin/views/admin.php (modified) (1 diff)
-
iteras.php (modified) (1 diff)
-
public/iteras-public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
iteras/trunk/DEVELOPMENT.txt
r3235960 r3235962 50 50 51 51 cd .. 52 svn commit -m ' New release' trunk52 svn commit -m '<some commit message>' trunk 53 53 svn cp trunk tags/<version> 54 svn commit -m ' New release' tags54 svn commit -m 'Release <version>' tags -
iteras/trunk/README.txt
r3203746 r3235962 2 2 Tags: paywall, subscribe, subscriptions, subscription, subscribers, access-control, paid content, premium, premium content, monetize, magazine, media pass, registration, billing, membership, member, earn money 3 3 Requires at least: 3.5.1 4 Tested up to: 6. 4.25 Stable tag: 1. 7.04 Tested up to: 6.7.1 5 Stable tag: 1.8.0 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 115 115 116 116 == Changelog == 117 = 1.8.0 = 118 * Paywall bulk actions and paywall column available on pages overview 119 * Fixed potential CSRF problem with plugin settings form in Wordpress administration 120 117 121 = 1.7.0 = 118 122 * Paywall signing key is now handled separately -
iteras/trunk/admin/iteras-admin.php
r3016412 r3235962 45 45 add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) ); 46 46 47 // Add column on post list 48 add_filter( 'manage_post_posts_columns', array( $this, 'add_paywall_post_columns' ) ); 49 add_action( 'manage_post_posts_custom_column', array( $this, 'populate_paywall_post_columns' ), 10, 2 ); 47 // Add column on lists 48 add_filter( 'manage_post_posts_columns', array( $this, 'add_paywall_columns' ) ); 49 add_action( 'manage_post_posts_custom_column', array( $this, 'populate_paywall_columns' ), 10, 2 ); 50 add_filter( 'manage_page_posts_columns', array( $this, 'add_paywall_columns' ) ); 51 add_action( 'manage_page_posts_custom_column', array( $this, 'populate_paywall_columns' ), 10, 2 ); 50 52 51 53 add_action( 'load-post.php', array( $this, 'paywall_post_meta_boxes_setup' ) ); … … 55 57 add_filter( 'bulk_actions-edit-post', array( $this, 'add_bulk_actions' ) ); 56 58 add_filter( 'handle_bulk_actions-edit-post', array( $this, 'execute_bulk_actions' ), 10, 3 ); 59 add_filter( 'bulk_actions-edit-page', array( $this, 'add_bulk_actions' ) ); 60 add_filter( 'handle_bulk_actions-edit-page', array( $this, 'execute_bulk_actions' ), 10, 3 ); 57 61 } 58 62 … … 92 96 93 97 94 function add_paywall_ post_columns( $columns ) {98 function add_paywall_columns( $columns ) { 95 99 $columns["iteras-paywalled"] = __("Paywall"); 96 100 return $columns; … … 98 102 99 103 100 function populate_paywall_ post_columns( $column, $post_id ) {104 function populate_paywall_columns( $column, $post_id ) { 101 105 if ($column == "iteras-paywalled") { 102 106 $paywalled = !!get_post_meta($post_id, Iteras::POST_META_KEY, true); … … 180 184 181 185 function add_bulk_actions( $bulk_actions ) { 186 if ( !in_array( current_filter(), array( 'bulk_actions-edit-post', 'bulk_actions-edit-page' ), true ) ) { 187 return $bulk_actions; 188 } 189 182 190 $settings = $this->plugin->settings; 183 191 foreach ( $settings['paywalls'] as $p ) { … … 266 274 $messages = array(); 267 275 268 if ($_SERVER['REQUEST_METHOD'] == "POST") { 276 if ($_SERVER['REQUEST_METHOD'] == 'POST') { 277 if ( !isset( $_POST['iteras_plugin_settings_nonce'] ) || 278 !wp_verify_nonce( $_POST['iteras_plugin_settings_nonce'], 'iteras_plugin_settings' ) ) { 279 wp_die( __( "Security check failed", $this->plugin_slug ) ); 280 } 281 269 282 $this->save_settings_form(); 270 283 } 271 284 272 if (array_key_exists( "sync", $_POST)) {285 if (array_key_exists('sync', $_POST)) { 273 286 $settings = $this->plugin->settings; 274 287 $paywalls = $this->fetch_paywalls($settings['api_key']); … … 285 298 array_push($messages, array( 286 299 "text" => __( "Synchronization of paywalls from ITERAS complete", $this->plugin_slug ), 287 "type" => "success"300 "type" => 'success' 288 301 )); 289 302 } … … 291 304 array_push($messages, array( 292 305 "text" => __( "Couldn't synchronize paywalls from ITERAS", $this->plugin_slug ), 293 "type" => "error"306 "type" => 'error' 294 307 )); 295 308 } … … 298 311 if (ITERAS_DEBUG && array_key_exists("reset", $_POST)) { 299 312 $this->plugin->reset_plugin(); 300 _log("RESET");301 313 } 302 314 … … 331 343 private function save_settings_form() { 332 344 if (!current_user_can('manage_options')) { 333 wp_die('You do not have sufficient permissions to access this page.'); 334 } 345 wp_die( __('You do not have sufficient permissions to access this page.', $this->plugin_slug ) ); 346 } 347 335 348 $prev_settings = $this->plugin->settings; 336 349 $settings = array( -
iteras/trunk/admin/views/admin.php
r3016412 r3235962 9 9 10 10 <form method="post" action=""> 11 <?php wp_nonce_field( 'iteras_plugin_settings', 'iteras_plugin_settings_nonce' ); ?> 11 12 <input name="paywall" type="hidden" value="<?=$settings['paywall_id']; ?>"> 12 13 <table class="form-table"> -
iteras/trunk/iteras.php
r3016412 r3235962 13 13 * Plugin URI: https://app.iteras.dk 14 14 * Description: Integration with ITERAS, a cloud-based state-of-the-art system for managing subscriptions/memberships and payments. 15 * Version: 1. 7.015 * Version: 1.8.0 16 16 * Author: ITERAS 17 17 * Author URI: https://www.iteras.dk -
iteras/trunk/public/iteras-public.php
r3016412 r3235962 16 16 class Iteras { 17 17 18 const VERSION = '1. 7.0';18 const VERSION = '1.8.0'; 19 19 20 20 const SETTINGS_KEY = "iteras_settings";
Note: See TracChangeset
for help on using the changeset viewer.