wp-pay-extensions /
memberpress
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * MemberPress transaction form. |
||||
| 4 | * |
||||
| 5 | * @author Pronamic <[email protected]> |
||||
| 6 | * @copyright 2005-2020 Pronamic |
||||
| 7 | * @license GPL-3.0-or-later |
||||
| 8 | * @package Pronamic\WordPress\Pay\Extensions\MemberPress |
||||
| 9 | */ |
||||
| 10 | |||||
| 11 | ?> |
||||
| 12 | <tr valign="top"> |
||||
| 13 | <th scope="row"> |
||||
| 14 | <label for="trans_num"><?php esc_html_e( 'Pronamic Payment', 'pronamic_ideal' ); ?></label> |
||||
| 15 | </th> |
||||
| 16 | <td> |
||||
| 17 | <?php |
||||
| 18 | |||||
| 19 | $query = new WP_Query( |
||||
| 20 | array( |
||||
| 21 | 'post_type' => 'pronamic_payment', |
||||
| 22 | 'post_status' => 'any', |
||||
| 23 | 'nopaging' => true, |
||||
| 24 | 'meta_query' => array( |
||||
| 25 | array( |
||||
| 26 | 'key' => '_pronamic_payment_source', |
||||
| 27 | 'compare' => '=', |
||||
| 28 | 'value' => 'memberpress', |
||||
| 29 | ), |
||||
| 30 | array( |
||||
| 31 | 'key' => '_pronamic_payment_source_id', |
||||
| 32 | 'compare' => '=', |
||||
| 33 | 'value' => $memberpress_transaction_id, |
||||
| 34 | ), |
||||
| 35 | ), |
||||
| 36 | ) |
||||
| 37 | ); |
||||
| 38 | |||||
| 39 | if ( $query->have_posts() ) { |
||||
| 40 | echo '<ul>'; |
||||
| 41 | |||||
| 42 | while ( $query->have_posts() ) { |
||||
| 43 | $query->the_post(); |
||||
| 44 | |||||
| 45 | echo '<li>'; |
||||
| 46 | |||||
| 47 | printf( |
||||
| 48 | '<a href="%s">%s</a>', |
||||
| 49 | esc_attr( get_edit_post_link( get_post() ) ), |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 50 | esc_html( get_the_ID() ) |
||||
|
0 ignored issues
–
show
It seems like
get_the_ID() can also be of type false; however, parameter $text of esc_html() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 51 | ); |
||||
| 52 | |||||
| 53 | echo '</li>'; |
||||
| 54 | } |
||||
| 55 | |||||
| 56 | echo '</ul>'; |
||||
| 57 | |||||
| 58 | wp_reset_postdata(); |
||||
| 59 | } |
||||
| 60 | |||||
| 61 | ?> |
||||
| 62 | </td> |
||||
| 63 | </tr> |
||||
| 64 |