/
home
/
techb158
/
balacoffee.com
/
wp-content
/
plugins
/
polylang-pro-1
/
js
/
build
/
/home/techb158/balacoffee.com/wp-content/plugins/polylang-pro-1/js/build
mkdir
upload
Name
Size
Mode
Actions
acf.js
1354
0644
edit
dl
rm
acf.min.js
600
0644
edit
dl
rm
admin.js
14301
0644
edit
dl
rm
admin.min.js
4292
0644
edit
dl
rm
block-editor-plugin.js
33407
0644
edit
dl
rm
block-editor-plugin.min.js
5553
0644
edit
dl
rm
block-editor.js
11447
0644
edit
dl
rm
block-editor.min.js
3694
0644
edit
dl
rm
blocks.js
54766
0644
edit
dl
rm
blocks.min.js
12823
0644
edit
dl
rm
bulk-translate.js
2532
0644
edit
dl
rm
bulk-translate.min.js
1322
0644
edit
dl
rm
classic-editor.js
15628
0644
edit
dl
rm
classic-editor.min.js
5225
0644
edit
dl
rm
confirmation-modal.js
4284
0644
edit
dl
rm
confirmation-modal.min.js
1493
0644
edit
dl
rm
languages-step.js
10783
0644
edit
dl
rm
languages-step.min.js
3499
0644
edit
dl
rm
metabox-autocomplete.js
2309
0644
edit
dl
rm
metabox-autocomplete.min.js
897
0644
edit
dl
rm
metabox-button.js
1306
0644
edit
dl
rm
metabox-button.min.js
709
0644
edit
dl
rm
nav-menu.js
3978
0644
edit
dl
rm
nav-menu.min.js
1583
0644
edit
dl
rm
navigation-editor-plugin.js
19194
0644
edit
dl
rm
navigation-editor-plugin.min.js
1666
0644
edit
dl
rm
post.js
5602
0644
edit
dl
rm
post.min.js
2082
0644
edit
dl
rm
sidebar.js
118170
0644
edit
dl
rm
sidebar.min.js
38956
0644
edit
dl
rm
term.js
8046
0644
edit
dl
rm
term.min.js
3049
0644
edit
dl
rm
user.js
1222
0644
edit
dl
rm
user.min.js
452
0644
edit
dl
rm
widget-editor-plugin.js
18433
0644
edit
dl
rm
widget-editor-plugin.min.js
1050
0644
edit
dl
rm
widgets.js
4336
0644
edit
dl
rm
widgets.min.js
1659
0644
edit
dl
rm
Edit:
/home/techb158/balacoffee.com/wp-content/plugins/polylang-pro-1/js/build/post.js
(5602B)
var __webpack_exports__ = {}; /** * @package Polylang */ /** * Tag suggest in quick edit */ jQuery( function( $ ) { $.ajaxPrefilter( function( options, originalOptions, jqXHR ) { if ( 'string' === typeof options.data && -1 !== options.data.indexOf( 'action=ajax-tag-search' ) && ( lang = $( ':input[name="inline_lang_choice"]' ).val() ) ) { options.data = 'lang=' + lang + '&' + options.data; } } ); } ); /** * Quick edit */ jQuery( function( $ ) { const handleQuickEditInsertion = ( mutationsList ) => { for ( const mutation of mutationsList ) { const form = mutation.addedNodes[0]; if ( 0 < mutation.addedNodes.length && form.classList.contains( 'inline-editor' ) ) { // WordPress has inserted the quick edit form. const post_id = Number( form.id.substring( 5 ) ); if ( post_id > 0 ) { // Get the language dropdown. const select = form.querySelector( 'select[name="inline_lang_choice"]' ); const lang = document.querySelector( '#lang_' + String( post_id ) ).innerHTML; select.value = lang; // Populates the dropdown with the post language. filter_terms( lang ); // Initial filter for category checklist. filter_pages( lang ); // Initial filter for parent dropdown. // Modify category checklist and parent dropdown on language change. select.addEventListener( 'change', function( event ) { const newLang = event.target.value; filter_terms( newLang ); filter_pages( newLang ); } ); } } /** * Filters the category checklist. */ function filter_terms( lang ) { if ( "undefined" != typeof( pll_term_languages ) ) { $.each( pll_term_languages, function( lg, term_tax ) { $.each( term_tax, function( tax, terms ) { $.each( terms, function( i ) { id = '#' + tax + '-' + pll_term_languages[ lg ][ tax ][ i ]; lang == lg ? $( id ).show() : $( id ).hide(); } ); } ); } ); } } /** * Filters the parent page dropdown list. */ function filter_pages( lang ) { if ( "undefined" != typeof( pll_page_languages ) ) { $.each( pll_page_languages, function( lg, pages ) { $.each( pages, function( i ) { v = $( '#post_parent option[value="' + pll_page_languages[ lg ][ i ] + '"]' ); lang == lg ? v.show() : v.hide(); } ); } ); } } } } const table = document.getElementById( 'the-list' ); const config = { childList: true, subtree: true }; const observer = new MutationObserver( handleQuickEditInsertion ); observer.observe( table, config); } ); /** * Update rows of translated posts when the language is modified in quick edit * Acts on ajaxSuccess event */ jQuery( function( $ ) { $( document ).ajaxSuccess( function( event, xhr, settings ) { function update_rows( post_id ) { // collect old translations var translations = new Array(); $( '.translation_' + post_id ).each( function() { translations.push( $( this ).parent().parent().attr( 'id' ).substring( 5 ) ); } ); var data = { action: 'pll_update_post_rows', post_id: post_id, translations: translations.join( ',' ), post_type: $( "input[name='post_type']" ).val(), screen: $( "input[name='screen']" ).val(), _pll_nonce: $( "input[name='_inline_edit']" ).val() // reuse quick edit nonce }; // get the modified rows in ajax and update them $.post( ajaxurl, data, function( response ) { if ( response ) { // Since WP changeset #52710 parseAjaxReponse() return content to notice the user in a HTML tag with ajax-response id. // Not to disturb this behaviour by executing another ajax request in the ajaxSuccess event, we need to target another unexisting id. var res = wpAjax.parseAjaxResponse( response, 'pll-ajax-response' ); $.each( res.responses, function() { if ( 'row' == this.what ) { // data is built with a call to WP_Posts_List_Table::single_row method // which uses internally other WordPress methods which escape correctly values. // For Polylang language columns the HTML code is correctly escaped in PLL_Admin_Filters_Columns::post_column method. $( "#post-" + this.supplemental.post_id ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith } } ); } } ); } if ( 'string' == typeof( settings.data ) ) { // Need to check the type due to block editor sometime sending FormData objects var data = wpAjax.unserialize( settings.data ); // what were the data sent by the ajax request? if ( 'undefined' != typeof( data['action'] ) && 'inline-save' == data['action'] ) { update_rows( data['post_ID'] ); } } } ); } ); /** * Media list table * When clicking on attach link, filters find post list per media language */ jQuery( function( $ ) { $.ajaxPrefilter( function ( options, originalOptions, jqXHR ) { if ( 'string' === typeof options.data && -1 !== options.data.indexOf( 'action=find_posts' ) ) { options.data = 'pll_post_id=' + $( '#affected' ).val() + '&' + options.data; } } ); } );
Save
cmd:
run