Changeset 42978
- Timestamp:
- 04/13/2018 05:55:25 PM (7 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/forms.css
r42967 r42978 1077 1077 } 1078 1078 1079 /*------------------------------------------------------------------------------ 1080 Privacy Policy settings screen 1081 ------------------------------------------------------------------------------*/ 1082 .tools-privacy-policy-page form { 1083 margin-bottom: 1.3em; 1084 } 1085 1086 .tools-privacy-policy-page input.button, 1087 .tools-privacy-policy-page select { 1088 margin-left: 6px; 1089 } 1090 1091 .tools-privacy-edit { 1092 margin: 2.3em 0; 1093 } 1094 1095 .tools-privacy-policy-page span { 1096 line-height: 2em; 1097 } 1098 1099 .privacy_requests .column-email { 1100 width: 40%; 1101 } 1102 1103 .privacy_requests .column-type { 1104 text-align: center; 1105 } 1106 1107 .privacy_requests thead td:first-child, 1108 .privacy_requests tfoot td:first-child { 1109 border-left: 4px solid #fff; 1110 } 1111 1112 .privacy_requests tbody th { 1113 border-left: 4px solid #fff; 1114 background: #fff; 1115 box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); 1116 } 1117 1118 .privacy_requests tbody td { 1119 background: #fff; 1120 box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); 1121 } 1122 1123 .privacy_requests .status-request-confirmed th, 1124 .privacy_requests .status-request-confirmed td { 1125 background-color: #f7fcfe; 1126 border-left-color: #00a0d2; 1127 } 1128 1129 .privacy_requests .status-request-failed th, 1130 .privacy_requests .status-request-failed td { 1131 background-color: #fef7f1; 1132 border-left-color: #d64d21; 1133 } 1134 1135 .status-label { 1136 font-weight: bold; 1137 } 1138 1139 .status-label.status-request-pending { 1140 font-weight: normal; 1141 font-style: italic; 1142 color: #6c7781; 1143 } 1144 1145 .status-label.status-request-failed { 1146 color: #aa0000; 1147 font-weight: bold; 1148 } 1149 1150 .wp-privacy-request-form { 1151 clear: both; 1152 } 1153 1154 .wp-privacy-request-form-field { 1155 margin: 1.5em 0; 1156 } 1157 1158 .wp-privacy-request-form label { 1159 font-weight: bold; 1160 line-height: 1.5; 1161 padding-bottom: .5em; 1162 display: block; 1163 } 1164 1165 .wp-privacy-request-form input { 1166 line-height: 1.5; 1167 margin: 0; 1168 } 1169 1170 .email-personal-data::before { 1171 display: inline-block; 1172 font: normal 20px/1 dashicons; 1173 margin: 3px 5px 0 -2px; 1174 speak: none; 1175 -webkit-font-smoothing: antialiased; 1176 -moz-osx-font-smoothing: grayscale; 1177 vertical-align: top; 1178 } 1179 1180 .email-personal-data--sending::before { 1181 color: #f56e28; 1182 content: "\f463"; 1183 -webkit-animation: rotation 2s infinite linear; 1184 animation: rotation 2s infinite linear; 1185 } 1186 1187 .email-personal-data--sent::before { 1188 color: #79ba49; 1189 content: "\f147"; 1190 } 1191 1079 1192 1080 1193 /* =Media Queries … … 1405 1518 } 1406 1519 1407 1408 /* Privacy */1409 1410 .privacy_requests .column-email {1411 width: 40%;1412 }1413 .privacy_requests .column-type {1414 text-align: center;1415 }1416 .privacy_requests thead td:first-child,1417 .privacy_requests tfoot td:first-child {1418 border-left: 4px solid #fff;1419 }1420 .privacy_requests tbody th {1421 border-left: 4px solid #fff;1422 background: #fff;1423 box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);1424 }1425 .privacy_requests tbody td {1426 background: #fff;1427 box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);1428 }1429 .privacy_requests .status-request-confirmed th,1430 .privacy_requests .status-request-confirmed td {1431 background-color: #f7fcfe;1432 border-left-color: #00a0d2;1433 }1434 .privacy_requests .status-request-failed th,1435 .privacy_requests .status-request-failed td {1436 background-color: #fef7f1;1437 border-left-color: #d64d21;1438 }1439 .status-label {1440 font-weight: bold;1441 }1442 .status-label.status-request-pending {1443 font-weight: normal;1444 font-style: italic;1445 color: #6c7781;1446 }1447 .status-label.status-request-failed {1448 color: #aa0000;1449 font-weight: bold;1450 }1451 .wp-privacy-request-form {1452 clear: both;1453 }1454 .wp-privacy-request-form-field {1455 margin: 1.5em 0;1456 }1457 .wp-privacy-request-form label {1458 font-weight: bold;1459 line-height: 1.5;1460 padding-bottom: .5em;1461 display: block;1462 }1463 .wp-privacy-request-form input {1464 line-height: 1.5;1465 margin: 0;1466 }1467 .email-personal-data::before {1468 display: inline-block;1469 font: normal 20px/1 dashicons;1470 margin: 3px 5px 0 -2px;1471 speak: none;1472 -webkit-font-smoothing: antialiased;1473 -moz-osx-font-smoothing: grayscale;1474 vertical-align: top;1475 }1476 .email-personal-data--sending::before {1477 color: #f56e28;1478 content: "\f463";1479 -webkit-animation: rotation 2s infinite linear;1480 animation: rotation 2s infinite linear;1481 }1482 .email-personal-data--sent::before {1483 color: #79ba49;1484 content: "\f147";1485 }1486 1520 @-webkit-keyframes rotation { 1487 1521 0% { … … 1494 1528 } 1495 1529 } 1530 1496 1531 @keyframes rotation { 1497 1532 0% { -
trunk/src/wp-admin/privacy.php
r42823 r42978 29 29 'page_for_privacy_policy', 30 30 'page_for_privacy_policy', 31 __( 'Privacy policy page updated successfully.' ), 31 sprintf( 32 // translators: URL to Customizer -> Menus 33 __( 'Privacy policy page updated successfully. Remember to <a href="%s">update your menus</a>!' ), 34 'customize.php?autofocus[panel]=nav_menus' 35 ), 32 36 'updated' 33 37 ); … … 51 55 } else { 52 56 update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id ); 57 53 58 add_settings_error( 54 59 'page_for_privacy_policy', 55 60 'page_for_privacy_policy', 56 __( 'Privacy policy page created successfully.' ), 61 sprintf( 62 // translators: URL to edit Privacy Policy page 63 __( 'Your Privacy Policy page created successfully. You’ll want to <a href="%s">review and edit your policy</a> next.' ), 64 'post.php?post=' . $privacy_policy_page_id . '&action=edit' 65 ), 57 66 'updated' 58 67 ); … … 63 72 // If a privacy policy page ID is available, make sure the page actually exists. If not, display an error. 64 73 $privacy_policy_page_exists = false; 65 $privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );74 $privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); 66 75 67 76 if ( ! empty( $privacy_policy_page_id ) ) { 68 $privacy_policy_page = get_post( $privacy_policy_page_id ); 69 if ( ! $privacy_policy_page instanceof WP_Post ) { 77 78 $privacy_policy_page = get_post( $privacy_policy_page_id ); 79 80 if ( ! $privacy_policy_page instanceof WP_Post ) { 81 add_settings_error( 82 'page_for_privacy_policy', 83 'page_for_privacy_policy', 84 __( 'The currently selected privacy policy page does not exist. Please create or select new page.' ), 85 'error' 86 ); 87 } else { 88 if ( 'trash' === $privacy_policy_page->post_status ) { 70 89 add_settings_error( 71 90 'page_for_privacy_policy', 72 91 'page_for_privacy_policy', 73 __( 'The currently selected privacy policy page does not exist. Please create or select new page.' ), 92 sprintf( 93 // translators: URL to Pages Trash. 94 __( 'The currently selected privacy policy page is in the trash. Please create or select new privacy policy page or <a href="%s">restore the current page</a>.' ), 95 'edit.php?post_status=trash&post_type=page' 96 ), 74 97 'error' 75 98 ); 76 99 } else { 77 if ( 'trash' === $privacy_policy_page->post_status ) { 78 add_settings_error( 79 'page_for_privacy_policy', 80 'page_for_privacy_policy', 81 sprintf( 82 __( 'The currently selected privacy policy page is in the trash. Please create or select new privacy policy page or <a href="%s">restore the current page</a>.' ), 83 'edit.php?post_status=trash&post_type=page' 84 ), 85 'error' 86 ); 87 } else { 88 $privacy_policy_page_exists = true; 89 } 100 $privacy_policy_page_exists = true; 90 101 } 102 } 91 103 } 92 104 … … 94 106 'id' => 'privacy', 95 107 'title' => __( 'Privacy' ), 96 'content' => '<p>' . __( 'This page provides tools with which you can manage your user \'s personal data and site\'s privacy policy.' ) . '</p>',108 'content' => '<p>' . __( 'This page provides tools with which you can manage your user’s personal data and site’s privacy policy.' ) . '</p>', 97 109 ) ); 98 110 … … 108 120 <h1><?php _e( 'Privacy Tools' ); ?></h1> 109 121 <?php settings_errors(); ?> 110 111 <h2><?php _e( 'Privacy policy page' ); ?></h2> 112 122 <h2><?php _e( 'Privacy Policy page' ); ?></h2> 123 <p> 124 <?php _e( 'The first step towards privacy laws compliance is to have a comprehensive Privacy Policy.' ); ?> 125 <?php _e( 'If you already have a Privacy Policy page, please select it below. If not, create one.' ); ?> 126 <?php _e( 'The new policy will include the suggested privacy text.' ); ?> 127 </p> 128 <p> 129 <?php _e( 'After your Privacy Policy page is set, we suggest that you edit it.' ); ?> 130 <?php _e( 'On the edit page screen you will find additional privacy information added by your plugins.' ); ?> 131 <?php _e( 'We would also suggest reviewing your privacy policy from time to time, after a WordPress or a plugin update.' ); ?> 132 <?php _e( 'There may be changes or new suggested information for you to consider adding to your policy.' ); ?> 133 </p> 113 134 <?php 114 135 if ( $privacy_policy_page_exists ) { 115 136 $edit_href = add_query_arg( 116 137 array( 117 'post' => $privacy_policy_page_id,138 'post' => $privacy_policy_page_id, 118 139 'action' => 'edit', 119 140 ), 120 141 admin_url( 'post.php' ) 121 142 ); 143 122 144 $view_href = get_permalink( $privacy_policy_page_id ); 123 124 145 ?> 125 <p ><strong>146 <p class="tools-privacy-edit"><strong> 126 147 <?php 127 148 printf( 128 __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your privacy policy.' ), 149 // translators: %1$s URL to Edit Page, %2$s URL to View Page 150 __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your privacy policy page content.' ), 129 151 $edit_href, 130 152 $view_href … … 135 157 } 136 158 ?> 137 138 <table class="form-table ">159 <hr> 160 <table class="form-table tools-privacy-policy-page"> 139 161 <tr> 140 162 <th scope="row"> 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> 163 <?php 164 if ( $privacy_policy_page_exists ) { 165 _e( 'Change your Privacy Policy page' ); 166 } else { 167 _e( 'Select a Privacy Policy page' ); 168 } 169 ?> 152 170 </th> 153 <td id="front-static-pages">171 <td> 154 172 <form method="post" action=""> 173 <label for="page_for_privacy_policy"> 174 <?php _e( 'Either select an existing page:' ); ?> 175 </label> 155 176 <input type="hidden" name="action" value="set-privacy-page" /> 156 177 <?php 157 158 178 wp_dropdown_pages( 159 179 array( … … 167 187 168 188 wp_nonce_field( 'set-privacy-page' ); 169 submit_button( __( 'Set Page' ), 'primary', 'submit', true, array( 'id' => 'set-page' ) ); 170 189 190 submit_button( __( 'Use This Page' ), 'primary', 'submit', false, array( 'id' => 'set-page' ) ); 191 ?> 192 </form> 193 194 <form method="post" action=""> 195 <input type="hidden" name="action" value="create-privacy-page" /> 196 <span> 197 <?php _e( 'Or create a new page: ' ); ?> 198 </span> 199 <?php 200 wp_nonce_field( 'create-privacy-page' ); 201 202 submit_button( __( 'Create New Page' ), 'primary', 'submit', false, array( 'id' => 'create-page' ) ); 171 203 ?> 172 204 </form> 173 205 </td> 174 206 </tr> 175 <?php176 177 if ( ! $privacy_policy_page_exists ) {178 ?>179 <tr>180 <th scope="row"><?php _e( 'Create new page for your privacy policy' ); ?></th>181 <td>182 <form method="post" action="">183 <input type="hidden" name="action" value="create-privacy-page" />184 <?php185 186 wp_nonce_field( 'create-privacy-page' );187 submit_button( __( 'Create Page' ), 'primary', 'submit', true, array( 'id' => 'create-page' ) );188 189 ?>190 </form>191 </td>192 </tr>193 <?php194 }195 196 ?>197 207 </table> 198 208 </div> 199 200 209 <?php 201 210
Note: See TracChangeset
for help on using the changeset viewer.