__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
window.onload = function() {
wp.blockLibrary.registerCoreBlocks();
const blocks = wp.blocks.getBlockTypes();
const disabledBlocks = dgb_object.disabledBlocks;
const nonce = dgb_object.nonce;
jQuery( '.block-count' ).text( jQuery( blocks ).size() );
blocks.sort( function( a, b ) {
const textA = a.name.toUpperCase();
const textB = b.name.toUpperCase();
return ( textA < textB ) ? -1 : ( textA > textB ) ? 1 : 0;
} );
blocks.forEach( function( block ) {
const id = block.name ? block.name : '';
const name = block.title ? block.title : '';
const description = block.description ? block.description : '';
const category = block.category ? block.category : '';
let html = '';
let isDisabledBlock = false;
Object.keys( disabledBlocks ).forEach( function( key ) {
if ( disabledBlocks[ key ] === id ) {
isDisabledBlock = true;
}
} );
if ( isDisabledBlock ) {
html += '<tr class="disabled">';
} else {
html += '<tr>';
}
html += '<th scope="row" class="check-column">';
html += '<input type="checkbox" name="bulk-change[]" value="' + id + '"></th>';
html += '<td class="name column-name has-row-actions column-primary" data-colname="Name">';
html += '<strong>' + name + '</strong>';
html += '<div class="row-actions">';
if ( isDisabledBlock ) {
html += '<span class="enable"><a href="?page=disable-blocks&action=enable&block=' + id + '&_wpnonce=' + nonce + '">' + dgb_strings.enable + '</a></span>';
} else {
html += '<span class="disable"><a href="?page=disable-blocks&action=disable&block=' + id + '&_wpnonce=' + nonce + '">' + dgb_strings.disable + '</a></span>';
}
html += '</div>';
html += '</td>';
html += '<td class="id column-id" data-colname="ID">' + id + '</td>';
html += '<td class="description column-description" data-colname="Description">' + description + '</td>';
html += '<td class="category column-category" data-colname="Category">' + category + '</td>';
html += '</tr>';
const table = jQuery( '.wp-list-table' );
table.append( html );
} );
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| admin.js | File | 2.03 KB | 0644 |
|
| scripts-old.js | File | 370 B | 0644 |
|
| scripts.js | File | 366 B | 0644 |
|