Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules/widgets
File: twitter-timeline-admin.js
jQuery( function ( $ ) {
[0] Fix | Delete
function twitterWidgetTypeChanged( widgetTypeSelector ) {
[1] Fix | Delete
var selectedType = $( widgetTypeSelector ).val();
[2] Fix | Delete
$( widgetTypeSelector )
[3] Fix | Delete
.closest( '.jetpack-twitter-timeline-widget-type-container' )
[4] Fix | Delete
.next( '.jetpack-twitter-timeline-widget-id-container' )
[5] Fix | Delete
.find( 'label' )
[6] Fix | Delete
.css( 'display', function () {
[7] Fix | Delete
var labelType = $( this ).data( 'widget-type' );
[8] Fix | Delete
if ( selectedType === labelType ) {
[9] Fix | Delete
return '';
[10] Fix | Delete
}
[11] Fix | Delete
return 'none';
[12] Fix | Delete
} );
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
function twitterWidgetTweetDisplayChanged( event ) {
[16] Fix | Delete
var $tweetDisplaySelector = $( event.target );
[17] Fix | Delete
var selectedTweetDisplay = $tweetDisplaySelector.val();
[18] Fix | Delete
var $form = $tweetDisplaySelector.closest( 'form' );
[19] Fix | Delete
var $heightContainer = $form.find( '.jetpack-twitter-timeline-widget-height-container' );
[20] Fix | Delete
var $tweetLimitContainer = $form.find(
[21] Fix | Delete
'.jetpack-twitter-timeline-widget-tweet-limit-container'
[22] Fix | Delete
);
[23] Fix | Delete
var $scrollbarInput = $form.find( 'input[id*=chrome-noscrollbar]' );
[24] Fix | Delete
switch ( selectedTweetDisplay ) {
[25] Fix | Delete
case 'fixed':
[26] Fix | Delete
$heightContainer.hide();
[27] Fix | Delete
$tweetLimitContainer.show();
[28] Fix | Delete
$scrollbarInput.prop( 'disabled', true );
[29] Fix | Delete
break;
[30] Fix | Delete
case 'dynamic':
[31] Fix | Delete
$tweetLimitContainer.hide();
[32] Fix | Delete
$heightContainer.show();
[33] Fix | Delete
$scrollbarInput.prop( 'disabled', false );
[34] Fix | Delete
break;
[35] Fix | Delete
}
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
// We could either be in wp-admin/widgets.php or the Customizer.
[39] Fix | Delete
var $container = $( '#customize-controls' );
[40] Fix | Delete
if ( ! $container.length ) {
[41] Fix | Delete
$container = $( '#wpbody' );
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
// Observe widget settings for 'change' events of the 'type' property for
[45] Fix | Delete
// current and future Twitter timeline widgets.
[46] Fix | Delete
$container.on( 'change', '.jetpack-twitter-timeline-widget-type', function () {
[47] Fix | Delete
twitterWidgetTypeChanged( this );
[48] Fix | Delete
} );
[49] Fix | Delete
[50] Fix | Delete
// Set the labels for currently existing widgets (including the "template"
[51] Fix | Delete
// version that is copied when a new widget is added).
[52] Fix | Delete
$container.find( '.jetpack-twitter-timeline-widget-type' ).each( function () {
[53] Fix | Delete
twitterWidgetTypeChanged( this );
[54] Fix | Delete
} );
[55] Fix | Delete
[56] Fix | Delete
// Observe widget settings for 'change' events of the 'tweet-display' property for
[57] Fix | Delete
// current and future Twitter timeline widgets.
[58] Fix | Delete
$container.on(
[59] Fix | Delete
'change',
[60] Fix | Delete
'.jetpack-twitter-timeline-widget-tweet-display-radio',
[61] Fix | Delete
twitterWidgetTweetDisplayChanged
[62] Fix | Delete
);
[63] Fix | Delete
} );
[64] Fix | Delete
[65] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function