Skip to content

Instantly share code, notes, and snippets.

@michael-cannon
Created September 9, 2013 01:28
Show Gist options
  • Save michael-cannon/6490325 to your computer and use it in GitHub Desktop.
Save michael-cannon/6490325 to your computer and use it in GitHub Desktop.
<?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