Changeset 53198
- Timestamp:
- 04/17/2022 03:35:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/meta-boxes.php
r52978 r53198 1187 1187 * @global object $link 1188 1188 * 1189 * @param string $ class1190 * @param string $ value1189 * @param string $xfn_relationship 1190 * @param string $xfn_value 1191 1191 * @param mixed $deprecated Never used. 1192 1192 */ 1193 function xfn_check( $ class, $value = '', $deprecated = '' ) {1193 function xfn_check( $xfn_relationship, $xfn_value = '', $deprecated = '' ) { 1194 1194 global $link; 1195 1195 … … 1201 1201 $rels = preg_split( '/\s+/', $link_rel ); 1202 1202 1203 if ( '' !== $ value && in_array( $value, $rels, true ) ) {1203 if ( '' !== $xfn_value && in_array( $xfn_value, $rels, true ) ) { 1204 1204 echo ' checked="checked"'; 1205 1205 } 1206 1206 1207 if ( '' === $value ) { 1208 if ( 'family' === $class && strpos( $link_rel, 'child' ) === false && strpos( $link_rel, 'parent' ) === false && strpos( $link_rel, 'sibling' ) === false && strpos( $link_rel, 'spouse' ) === false && strpos( $link_rel, 'kin' ) === false ) { 1207 if ( '' === $xfn_value ) { 1208 if ( 'family' === $xfn_relationship 1209 && strpos( $link_rel, 'child' ) === false 1210 && strpos( $link_rel, 'parent' ) === false 1211 && strpos( $link_rel, 'sibling' ) === false 1212 && strpos( $link_rel, 'spouse' ) === false 1213 && strpos( $link_rel, 'kin' ) === false 1214 ) { 1209 1215 echo ' checked="checked"'; 1210 1216 } 1211 if ( 'friendship' === $class && strpos( $link_rel, 'friend' ) === false && strpos( $link_rel, 'acquaintance' ) === false && strpos( $link_rel, 'contact' ) === false ) { 1217 1218 if ( 'friendship' === $xfn_relationship 1219 && strpos( $link_rel, 'friend' ) === false 1220 && strpos( $link_rel, 'acquaintance' ) === false 1221 && strpos( $link_rel, 'contact' ) === false ) { 1212 1222 echo ' checked="checked"'; 1213 1223 } 1214 if ( 'geographical' === $class && strpos( $link_rel, 'co-resident' ) === false && strpos( $link_rel, 'neighbor' ) === false ) { 1224 1225 if ( 'geographical' === $xfn_relationship 1226 && strpos( $link_rel, 'co-resident' ) === false 1227 && strpos( $link_rel, 'neighbor' ) === false 1228 ) { 1215 1229 echo ' checked="checked"'; 1216 1230 } 1217 if ( 'identity' === $class && in_array( 'me', $rels, true ) ) { 1231 1232 if ( 'identity' === $xfn_relationship 1233 && in_array( 'me', $rels, true ) 1234 ) { 1218 1235 echo ' checked="checked"'; 1219 1236 }
Note: See TracChangeset
for help on using the changeset viewer.