This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Navigate to a wordpress edit page for any post and run one of the code sections below in a javascript console to get the names/info for all blocks available to gutenberg on your site. */ | |
/* log all block info to console */ | |
console.log(wp.data.select( "core/blocks" ).getBlockTypes()); | |
/* log all block names to console */ | |
wp.data.select( "core/blocks" ).getBlockTypes().forEach(function(element) { | |
console.log(element['name']); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* NOTE: Please execute this function only once. After resetting the views, remove the whole code snippet. | |
*/ | |
function awsm_jobs_reset_views_count() { | |
$args = array( | |
'post_type' => 'awsm_job_openings', | |
'post_status' => array( 'publish', 'expired', 'future', 'draft', 'pending' ), | |
'posts_per_page' => -1, |