Kde bych nasel nejakou dokumentaci k
add_filter( 'manage_edit-{CPT}_sortable_columns', 'planX_sortable_columns');
Jedna se mi o rovnani v edit screenu pro CPT, ktery mi nejak nefunguje, rovna, ale ne podle toho co tam mam vypsany, tak nevim.
// Add CV Groups column for the All CV Events screen
add_filter( "manage_curiculum_posts_columns", "planX_change_columns" );
function planX_change_columns( $cols )
{
$cols = array_merge( $cols, array(
'cb' => '<input type="checkbox" />',
'cv_groups_col' => __( 'CV Groups', 'Avada' ),
)
);
return $cols;
}
// Give the CV Groups column some content
add_action( 'manage_posts_custom_column', 'planX_custom_columns', 10, 2);
function planX_custom_columns( $column, $post_id )
{
switch ( $column )
{
case "cv_groups_col":
$CV_group = get_the_terms( $post_id, 'cv_groups');
// echo "<pre>" . print_r($CV_group, true) . "</pre>";
echo $CV_group[0]->name;
break;
}
}
// Make the CV Groups column sortable
add_filter( 'manage_edit-curiculum_sortable_columns', 'planX_sortable_columns');
function planX_sortable_columns( $cols)
{
$cols['cv_groups_col'] = 'cv_groups';
return $cols;
}