// Remove inactive forms from form switcher
add_filter( 'gform_form_switcher_forms', function( $forms ) {
$forms = array_filter( $forms, function( $form ) {
return rgobj( $form, 'is_active' );
} );
return $forms;
} );
Replace Numbered Months with Named Months in Date Field
<?php // Replace the numbered months with named months in a Gravity Forms dropdown date field
add_action( 'wp_footer', function () { ?>
<script type="text/javascript">
jQuery(document).ready(function( $ ) {
$('.gfield_date_dropdown_month select option').each( function(i, option) {
switch( option.value ) {
case '1': option.innerHTML = 'January'; break;
case '2': option.innerHTML = 'February'; break;
case '3': option.innerHTML = 'March'; break;
case '4': option.innerHTML = 'April'; break;
case '5': option.innerHTML = 'May'; break;
case '6': option.innerHTML = 'June'; break;
case '7': option.innerHTML = 'July'; break;
case '8': option.innerHTML = 'August'; break;
case '9': option.innerHTML = 'September'; break;
case '10': option.innerHTML = 'October'; break;
case '11': option.innerHTML = 'November'; break;
case '12': option.innerHTML = 'December'; break;
}
});
});
</script>
<?php } );
Skip New Themes & Plugins Bundled With WordPress
// Prevent auto installation of newly bundled WP themes & plugins
define('CORE_UPGRADE_SKIP_NEW_BUNDLED', true);