mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-02 16:59:35 +01:00
87db5b833d
Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429]. Props Clorith. See #51812. Built from https://develop.svn.wordpress.org/trunk@50547 git-svn-id: http://core.svn.wordpress.org/trunk@50160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
24 lines
740 B
JavaScript
24 lines
740 B
JavaScript
/**
|
|
* Generates the XHTML Friends Network 'rel' string from the inputs.
|
|
*
|
|
* @deprecated 3.5.0
|
|
* @output wp-admin/js/xfn.js
|
|
*/
|
|
jQuery( function( $ ) {
|
|
$( '#link_rel' ).prop( 'readonly', true );
|
|
$( '#linkxfndiv input' ).on( 'click keyup', function() {
|
|
var isMe = $( '#me' ).is( ':checked' ), inputs = '';
|
|
$( 'input.valinp' ).each( function() {
|
|
if ( isMe ) {
|
|
$( this ).prop( 'disabled', true ).parent().addClass( 'disabled' );
|
|
} else {
|
|
$( this ).removeAttr( 'disabled' ).parent().removeClass( 'disabled' );
|
|
if ( $( this ).is( ':checked' ) && $( this ).val() !== '') {
|
|
inputs += $( this ).val() + ' ';
|
|
}
|
|
}
|
|
});
|
|
$( '#link_rel' ).val( ( isMe ) ? 'me' : inputs.substr( 0,inputs.length - 1 ) );
|
|
});
|
|
});
|