Changeset 43099
- Timestamp:
- 05/02/2018 02:47:23 AM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-admin/privacy.php
r43098 r43099 61 61 } 62 62 63 // If a privacy policy page ID is available, make sure the page actually exists. If not, display a warning63 // If a privacy policy page ID is available, make sure the page actually exists. If not, display an error. 64 64 $privacy_policy_page_exists = false; 65 65 $privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); … … 72 72 'page_for_privacy_policy', 73 73 __( 'The currently selected privacy policy page does not exist. Please create or select new page.' ), 74 ' warning'74 'error' 75 75 ); 76 76 } else { … … 91 91 } 92 92 93 $title = __( 'Privacy Tools' );94 95 93 get_current_screen()->add_help_tab( array( 96 94 'id' => 'privacy', … … 108 106 ?> 109 107 <div class="wrap"> 110 <h1><?php echo esc_html( $title); ?></h1>108 <h1><?php _e( 'Privacy Tools' ); ?></h1> 111 109 <?php settings_errors(); ?> 112 110 113 <h2 class="title"><?php _e( 'Privacy policy page' ); ?></h2> 111 <h2><?php _e( 'Privacy policy page' ); ?></h2> 112 113 <?php 114 if ( $privacy_policy_page_exists ) { 115 $edit_href = add_query_arg( 116 array( 117 'post' => $privacy_policy_page_id, 118 'action' => 'edit', 119 ), 120 admin_url( 'post.php' ) 121 ); 122 $view_href = get_permalink( $privacy_policy_page_id ); 123 124 ?> 125 <p><strong> 126 <?php 127 printf( 128 __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your privacy policy.' ), 129 $edit_href, 130 $view_href 131 ); 132 ?> 133 </strong></p> 134 <?php 135 } 136 ?> 137 114 138 <table class="form-table"> 115 <?php116 117 if ( $privacy_policy_page_exists ) {118 $edit_href = add_query_arg(119 array(120 'post' => $privacy_policy_page_id,121 'action' => 'edit',122 ),123 admin_url( 'post.php' )124 );125 $view_href = get_permalink( $privacy_policy_page_id );126 127 ?>128 <tr>129 <th colspan="2">130 <?php131 printf(132 __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your privacy policy.' ),133 $edit_href,134 $view_href135 );136 ?>137 </th>138 </tr>139 <?php140 }141 142 ?>143 139 <tr> 144 140 <th scope="row"> 145 <?php 146 147 if ( $privacy_policy_page_exists ) { 148 _e( 'Select another page for your privacy policy' ); 149 } else { 150 _e( 'Select an existing privacy policy page' ); 151 } 152 153 ?> 141 <label for="page_for_privacy_policy"> 142 <?php 143 144 if ( $privacy_policy_page_exists ) { 145 _e( 'Select another page for your privacy policy' ); 146 } else { 147 _e( 'Select an existing privacy policy page' ); 148 } 149 150 ?> 151 </label> 154 152 </th> 155 153 <td id="front-static-pages"> 156 154 <form method="post" action=""> 157 <?php wp_nonce_field( 'set-privacy-page' ); ?>158 155 <input type="hidden" name="action" value="set-privacy-page" /> 159 < fieldset>160 <legend class="screen-reader-text"><span><?php _e( 'Select your privacy policy page.' ); ?></span></legend> 161 <label for="page_for_privacy_policy">162 <?php wp_dropdown_pages(163 array(164 'name' => 'page_for_privacy_policy',165 'show_option_none' => __( '— Select —' ),166 'option_none_value' => '0',167 'selected' => $privacy_policy_page_id,168 'post_status' => array( 'draft', 'publish' ),169 )170 ); 171 ?>172 </label>173 </fieldset> 174 <?php submit_button( __( 'Set Page' ) );?>156 <?php 157 158 wp_dropdown_pages( 159 array( 160 'name' => 'page_for_privacy_policy', 161 'show_option_none' => __( '— Select —' ), 162 'option_none_value' => '0', 163 'selected' => $privacy_policy_page_id, 164 'post_status' => array( 'draft', 'publish' ), 165 ) 166 ); 167 168 wp_nonce_field( 'set-privacy-page' ); 169 submit_button( __( 'Set Page' ), 'primary', 'submit', true, array( 'id' => 'set-page' ) ); 170 171 ?> 175 172 </form> 176 173 </td> … … 185 182 <form method="post" action=""> 186 183 <input type="hidden" name="action" value="create-privacy-page" /> 187 <?php wp_nonce_field( 'create-privacy-page' ); ?> 188 <?php submit_button( __( 'Create Page' ) ); ?> 184 <?php 185 186 wp_nonce_field( 'create-privacy-page' ); 187 submit_button( __( 'Create Page' ), 'primary', 'submit', true, array( 'id' => 'create-page' ) ); 188 189 ?> 189 190 </form> 190 191 </td>
Note: See TracChangeset
for help on using the changeset viewer.