|
1 | 1 | <?php |
| 2 | +/** |
| 3 | + * Domain names |
| 4 | + * |
| 5 | + * @author Pronamic <info@pronamic.eu> |
| 6 | + * @copyright 2005-2021 Pronamic |
| 7 | + * @license GPL-3.0-or-later |
| 8 | + * @package Pronamic\WordPress\DomainMapping |
| 9 | + */ |
2 | 10 |
|
3 | 11 | global $post; |
4 | 12 |
|
5 | | -$query = new WP_Query( array( |
6 | | - 'post_type' => 'any', |
7 | | - 'nopaging' => true, |
8 | | - 'meta_query' => array( |
9 | | - array( |
10 | | - 'key' => '_pronamic_domain_mapping_host', |
11 | | - 'compare' => 'EXISTS', |
| 13 | +$query = new \WP_Query( |
| 14 | + array( |
| 15 | + 'post_type' => 'any', |
| 16 | + 'nopaging' => true, |
| 17 | + 'meta_query' => array( |
| 18 | + array( |
| 19 | + 'key' => '_pronamic_domain_mapping_host', |
| 20 | + 'compare' => 'EXISTS', |
| 21 | + ), |
12 | 22 | ), |
13 | | - ), |
14 | | - 'order' => 'ASC', |
15 | | - 'orderby' => 'meta_value', |
16 | | - 'meta_key' => '_pronamic_domain_mapping_host', |
17 | | -) ); |
| 23 | + 'order' => 'ASC', |
| 24 | + 'orderby' => 'meta_value', |
| 25 | + 'meta_key' => '_pronamic_domain_mapping_host', |
| 26 | + ) |
| 27 | +); |
18 | 28 |
|
19 | 29 | ?> |
20 | 30 | <div class="wrap"> |
21 | | - <h1><?php echo esc_html( get_admin_page_title() ); ?></h1> |
| 31 | + <h1><?php echo \esc_html( \get_admin_page_title() ); ?></h1> |
22 | 32 |
|
23 | 33 | <ul class="subsubsub"> |
24 | 34 | <li class="all"> |
25 | 35 | <a class="current" href=""> |
26 | | - <?php esc_html_e( 'All', 'pronamic_domain_mapping' ); ?> <span class="count">(<?php echo esc_html( $query->found_posts ); ?>)</span> |
| 36 | + <?php \esc_html_e( 'All', 'pronamic_domain_mapping' ); ?> <span class="count">(<?php echo \esc_html( $query->found_posts ); ?>)</span> |
27 | 37 | </a> |
28 | 38 | </li> |
29 | 39 | </ul> |
30 | 40 |
|
31 | 41 | <table cellspacing="0" class="wp-list-table widefat fixed posts"> |
32 | 42 | <thead> |
33 | 43 | <tr> |
34 | | - <th scope="col"><?php esc_html_e( 'Domain Name', 'pronamic_domain_mapping' ); ?></th> |
35 | | - <th scope="col"><?php esc_html_e( 'Title', 'pronamic_domain_mapping' ); ?></th> |
| 44 | + <th scope="col"><?php \esc_html_e( 'Domain Name', 'pronamic_domain_mapping' ); ?></th> |
| 45 | + <th scope="col"><?php \esc_html_e( 'Title', 'pronamic_domain_mapping' ); ?></th> |
36 | 46 | </tr> |
37 | 47 | </thead> |
38 | 48 |
|
39 | 49 | <tbody> |
40 | 50 |
|
41 | | - <?php while ( $query->have_posts() ) : $query->the_post(); ?> |
| 51 | + <?php |
| 52 | + |
| 53 | + while ( $query->have_posts() ) : |
| 54 | + |
| 55 | + $query->the_post(); |
| 56 | + |
| 57 | + ?> |
42 | 58 |
|
43 | 59 | <tr> |
44 | 60 | <td> |
45 | 61 | <strong> |
46 | | - <a href="<?php the_permalink(); ?>"> |
47 | | - <?php echo esc_html( get_post_meta( $post->ID, '_pronamic_domain_mapping_host', true ) ); ?> |
| 62 | + <a href="<?php \the_permalink(); ?>"> |
| 63 | + <?php echo \esc_html( \get_post_meta( $post->ID, '_pronamic_domain_mapping_host', true ) ); ?> |
48 | 64 | </a> |
49 | 65 | </strong> |
50 | 66 |
|
51 | 67 | <div class="row-actions"> |
52 | 68 | <span class="edit"> |
53 | | - <a href="<?php echo esc_attr( get_edit_post_link( $post->ID ) ); ?>"><?php esc_html_e( 'Edit', 'pronamic_domain_mapping' ); ?></a> | |
| 69 | + <a href="<?php echo \esc_attr( \get_edit_post_link( $post->ID ) ); ?>"><?php \esc_html_e( 'Edit', 'pronamic_domain_mapping' ); ?></a> | |
54 | 70 | </span> |
55 | 71 |
|
56 | 72 | <span class="view"> |
57 | | - <a href="<?php the_permalink(); ?>"><?php esc_html_e( 'View', 'pronamic_domain_mapping' ); ?></a> |
| 73 | + <a href="<?php \the_permalink(); ?>"><?php \esc_html_e( 'View', 'pronamic_domain_mapping' ); ?></a> |
58 | 74 | </span> |
59 | 75 | </div> |
60 | 76 | </td> |
61 | 77 | <td> |
62 | | - <a href="<?php the_permalink(); ?>"> |
63 | | - <?php the_title(); ?> |
| 78 | + <a href="<?php \the_permalink(); ?>"> |
| 79 | + <?php \the_title(); ?> |
64 | 80 | </a> |
65 | 81 | </td> |
66 | 82 | </tr> |
|
70 | 86 | </tbody> |
71 | 87 | </table> |
72 | 88 |
|
73 | | - <?php |
74 | | - |
75 | | - wp_reset_postdata(); |
76 | | - |
77 | | - ?> |
| 89 | + <?php \wp_reset_postdata(); ?> |
78 | 90 | </div> |
0 commit comments