9
|
1 |
/** |
|
2 |
* Generates the XHTML Friends Network 'rel' string from the inputs. |
|
3 |
* |
|
4 |
* @deprecated 3.5.0 |
|
5 |
* @output wp-admin/js/xfn.js |
|
6 |
*/ |
5
|
7 |
jQuery( document ).ready(function( $ ) { |
|
8 |
$( '#link_rel' ).prop( 'readonly', true ); |
|
9 |
$( '#linkxfndiv input' ).bind( 'click keyup', function() { |
|
10 |
var isMe = $( '#me' ).is( ':checked' ), inputs = ''; |
|
11 |
$( 'input.valinp' ).each( function() { |
|
12 |
if ( isMe ) { |
|
13 |
$( this ).prop( 'disabled', true ).parent().addClass( 'disabled' ); |
0
|
14 |
} else { |
5
|
15 |
$( this ).removeAttr( 'disabled' ).parent().removeClass( 'disabled' ); |
|
16 |
if ( $( this ).is( ':checked' ) && $( this ).val() !== '') { |
|
17 |
inputs += $( this ).val() + ' '; |
|
18 |
} |
0
|
19 |
} |
|
20 |
}); |
5
|
21 |
$( '#link_rel' ).val( ( isMe ) ? 'me' : inputs.substr( 0,inputs.length - 1 ) ); |
0
|
22 |
}); |
|
23 |
}); |