Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@michael-cannon
Created September 9, 2013 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michael-cannon/6490331 to your computer and use it in GitHub Desktop.
Save michael-cannon/6490331 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'cbqe_quick_scripts_quick', array( $this, 'scripts_quick' ), 10, 6 );
public function scripts_quick( $scripts_quick, $post_type, $column_name, $field_name, $field_type, $field_name_var ) {
switch ( $field_type ) {
case 'date':
$scripts_quick[ $column_name . '1' ] = "var {$field_name_var} = $( '.column-{$column_name}', post_row ).text();";
$scripts_quick[ $column_name . '2' ] = "$( ':input[name={$field_name}]', edit_row ).val( {$field_name_var} );";
break;
}
return $scripts_quick;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment