Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
add_filter( 'cbqe_quick_scripts_extra', array( $this, 'scripts_extra' ), 10, 6 );
public function scripts_extra( $scripts_extra, $post_type, $column_name, $field_name, $field_type, $field_name_var ) {
switch ( $field_type ) {
case 'date':
$key = Custom_Bulkquick_Edit::get_field_key( $post_type, $field_name );
$date_format = cbqe_get_option( $key, 'mm/dd/yy' );
$scripts_extra[ $column_name ] = "$( '.datepicker' ).datepicker({ dateFormat: '{$date_format}' });";
break;
}
return $scripts_extra;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment