Changeset 3242201
- Timestamp:
- 02/17/2025 10:39:30 PM (14 months ago)
- Location:
- wired-impact-volunteer-management/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (2 diffs)
-
cypress/support/commands.js (modified) (1 diff)
-
frontend/class-public.php (modified) (7 diffs)
-
includes/class-wi-volunteer-management.php (modified) (1 diff)
-
languages/wired-impact-volunteer-management.pot (modified) (5 diffs)
-
wivm.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wired-impact-volunteer-management/trunk/README.txt
r3201881 r3242201 5 5 Tested up to: 6.7 6 6 Requires PHP: 5.2.4 7 Stable tag: 2.5 7 Stable tag: 2.5.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 127 127 == Changelog == 128 128 129 = 2.5.1 = 130 * Fixed bug where pagination doesn't work when listing volunteer opportunities on a static front page. 131 * Fixed Cross Site Scripting (XSS) vulnerability when outputting custom CSS classes. 132 129 133 = 2.5 = 130 134 * Fixed issues where some strings didn't allow for translation. -
wired-impact-volunteer-management/trunk/cypress/support/commands.js
r3201881 r3242201 130 130 */ 131 131 Cypress.Commands.add('getBlockEditorIFrameBody', () => { 132 133 cy.log('getBlockEditorIFrameBody');132 133 cy.log('getBlockEditorIFrameBody'); 134 134 135 135 return cy -
wired-impact-volunteer-management/trunk/frontend/class-public.php
r3011449 r3242201 228 228 */ 229 229 public function display_one_time_volunteer_opps( $attributes ) { 230 $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; 230 231 $paged = $this->get_current_page_number(); 231 232 $args = array( 232 'post_type' => 'volunteer_opp', 233 'meta_key' => '_start_date_time', 234 'orderby' => 'meta_value_num', 235 'order' => 'ASC', 236 'meta_query' => array( 237 array( //Only if one-time opp is true 233 'paged' => $paged, 234 'post_type' => 'volunteer_opp', 235 'orderby' => 'meta_value_num', 236 'order' => 'ASC', 237 'meta_key' => '_start_date_time', 238 'meta_query' => array( 239 array( // Only if one-time opp is true. 238 240 'key' => '_one_time_opp', 239 'value' => 1, 241 'value' => 1, 240 242 'compare' => '==', 241 243 ), 242 array( // Only if event is in the future244 array( // Only if event is in the future. 243 245 'key' => '_start_date_time', 244 'value' => current_time( 'timestamp' ), 246 'value' => current_time( 'timestamp' ), 245 247 'compare' => '>=', 246 248 ), 247 'relation' => 'AND' 249 'relation' => 'AND', 248 250 ), 249 'paged' => $paged250 251 ); 251 252 … … 259 260 */ 260 261 public function display_flexible_volunteer_opps( $attributes ) { 261 $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; 262 $args = array( 263 'post_type' => 'volunteer_opp', 264 'meta_query' => array( 265 array( //Only if one-time opp is not true 262 263 $paged = $this->get_current_page_number(); 264 $args = array( 265 'paged' => $paged, 266 'post_type' => 'volunteer_opp', 267 'meta_query' => array( 268 array( // Only if one-time opp is not true. 266 269 'key' => '_one_time_opp', 267 'value' => 1, 270 'value' => 1, 268 271 'compare' => '!=', 269 272 ), 270 273 ), 271 'paged' => $paged272 274 ); 273 275 … … 275 277 } 276 278 279 /** 280 * Get the current page number when listing volunteer opportunities. 281 * 282 * The query var is almost always "paged", but for static front pages 283 * it's "page". If neither of those are set, then default to 1. 284 * 285 * @return int The current page number. 286 */ 287 private function get_current_page_number() { 288 289 $paged = absint( get_query_var( 'paged' ) ); 290 291 if ( $paged > 0 ) { 292 293 return $paged; 294 } 295 296 $paged = absint( get_query_var( 'page' ) ); 297 298 if ( $paged > 0 ) { 299 300 return $paged; 301 } 302 303 return 1; 304 } 277 305 278 306 /** … … 344 372 * as a shortcode parameter, include it in the container class name. 345 373 */ 346 $class_name = ( empty( $attributes['className'] ) ) ? $list_type : $list_type . ' ' . sanitize_text_field( $attributes['className'] );374 $class_name = ( empty( $attributes['className'] ) ) ? $list_type : $list_type . ' ' . $attributes['className']; 347 375 348 376 /** … … 350 378 * as a shortcode parameter, use it for the list's container ID. 351 379 */ 352 $anchor = ( empty( $attributes['anchor'] ) ) ? '' : ' id="' . sanitize_html_class( $attributes['anchor'] ) . '"';380 $anchor = ( empty( $attributes['anchor'] ) ) ? '' : ' id="' . esc_attr( $attributes['anchor'] ) . '"'; 353 381 ?> 354 382 355 <div class="volunteer-opps <?php echo $class_name; ?>"<?php echo $anchor; ?>>383 <div class="volunteer-opps <?php echo esc_attr( $class_name ); ?>"<?php echo $anchor; ?>> 356 384 357 385 <?php … … 386 414 /** 387 415 * Get the page navigation when displaying a list of volunteer opportunities. 388 * 389 * We provide a filter so custom navigation can be utilized in place of the 416 * 417 * We overwrite the global $paged variable to set the page number since 418 * previous_posts_link() and next_posts_link() don't work correctly 419 * on static front pages. See our get_current_page_number() method 420 * for more information. 421 * 422 * We provide a filter so custom navigation can be utilized in place of the 390 423 * default WordPress functionality. 391 424 * 392 425 * @return string The HTML for the page navigation. 393 426 */ 394 public function get_page_navigation(){ 395 396 ob_start(); ?> 427 public function get_page_navigation() { 428 429 global $paged; 430 $original_paged = $paged; 431 $paged = $this->get_current_page_number(); 432 433 ob_start(); 434 ?> 397 435 398 436 <div class="navigation volunteer-opps-navigation"> … … 401 439 </div> 402 440 403 <?php 441 <?php 442 $paged = $original_paged; 443 404 444 return apply_filters( 'wivm_page_navigation', ob_get_clean() ); 405 445 } -
wired-impact-volunteer-management/trunk/includes/class-wi-volunteer-management.php
r3201881 r3242201 69 69 70 70 $this->plugin_name = 'wired-impact-volunteer-management'; 71 $this->version = '2.5 ';71 $this->version = '2.5.1'; 72 72 73 73 $this->load_dependencies(); -
wired-impact-volunteer-management/trunk/languages/wired-impact-volunteer-management.pot
r3201881 r3242201 1 # Copyright (C) 202 4Wired Impact1 # Copyright (C) 2025 Wired Impact 2 2 # This file is distributed under the GPL-2.0+. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Wired Impact Volunteer Management 2.5 \n"5 "Project-Id-Version: Wired Impact Volunteer Management 2.5.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wired-impact-volunteer-management\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-12-03T17:32:13+00:00\n"12 "POT-Creation-Date: 2025-02-17T22:22:27+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 9.0\n"14 "X-Generator: WP-CLI 2.11.0\n" 15 15 "X-Domain: wired-impact-volunteer-management\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: wivm.php 18 19 #: admin/class-admin.php:270 19 20 msgid "Wired Impact Volunteer Management" … … 21 22 22 23 #. Plugin URI of the plugin 24 #: wivm.php 23 25 msgid "https://wiredimpact.com/wordpress-plugins-for-nonprofits/volunteer-management/" 24 26 msgstr "" 25 27 26 28 #. Description of the plugin 29 #: wivm.php 27 30 msgid "A simple, free way to keep track of your nonprofit’s volunteers and opportunities." 28 31 msgstr "" 29 32 30 33 #. Author of the plugin 34 #: wivm.php 31 35 msgid "Wired Impact" 32 36 msgstr "" 33 37 34 38 #. Author URI of the plugin 39 #: wivm.php 35 40 msgid "https://wiredimpact.com" 36 41 msgstr "" … … 309 314 #: admin/class-admin.php:1144 310 315 #: admin/class-admin.php:1278 311 #: frontend/class-public.php: 478312 #: frontend/class-public.php: 485316 #: frontend/class-public.php:518 317 #: frontend/class-public.php:525 313 318 msgid "Security Check." 314 319 msgstr "" … … 751 756 msgstr "" 752 757 753 #: frontend/class-public.php: 292758 #: frontend/class-public.php:320 754 759 msgid "Find Out More" 755 760 msgstr "" 756 761 757 #: frontend/class-public.php:3 69762 #: frontend/class-public.php:397 758 763 msgid "Sorry, there are no volunteer opportunities available right now." 759 764 msgstr "" 760 765 761 #: frontend/class-public.php: 399766 #: frontend/class-public.php:437 762 767 msgid "« Previous Opportunities" 763 768 msgstr "" 764 769 765 #: frontend/class-public.php:4 00770 #: frontend/class-public.php:438 766 771 msgid "More Opportunities »" 767 772 msgstr "" -
wired-impact-volunteer-management/trunk/wivm.php
r3201881 r3242201 17 17 * Plugin URI: https://wiredimpact.com/wordpress-plugins-for-nonprofits/volunteer-management/ 18 18 * Description: A simple, free way to keep track of your nonprofit’s volunteers and opportunities. 19 * Version: 2.5 19 * Version: 2.5.1 20 20 * Author: Wired Impact 21 21 * Author URI: https://wiredimpact.com
Note: See TracChangeset
for help on using the changeset viewer.