1234
This commit is contained in:
@@ -49,40 +49,6 @@ class Igny8AdminColumns {
|
||||
add_action('wp_ajax_igny8_send_to_igny8', array($this, 'send_to_igny8'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render taxonomy column
|
||||
*
|
||||
* @param int $post_id Post ID
|
||||
*/
|
||||
private function render_taxonomy_column($post_id) {
|
||||
$taxonomy = get_post_meta($post_id, '_igny8_taxonomy_id', true);
|
||||
|
||||
if ($taxonomy) {
|
||||
echo '<span class="igny8-badge igny8-badge-igny8" title="' . esc_attr__('Synced Taxonomy', 'igny8-bridge') . '">';
|
||||
echo esc_html($taxonomy);
|
||||
echo '</span>';
|
||||
} else {
|
||||
echo '<span class="igny8-empty">—</span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render attribute column
|
||||
*
|
||||
* @param int $post_id Post ID
|
||||
*/
|
||||
private function render_attribute_column($post_id) {
|
||||
$attribute = get_post_meta($post_id, '_igny8_attribute_id', true);
|
||||
|
||||
if ($attribute) {
|
||||
echo '<span class="igny8-badge igny8-badge-igny8" title="' . esc_attr__('Synced Attribute', 'igny8-bridge') . '">';
|
||||
echo esc_html($attribute);
|
||||
echo '</span>';
|
||||
} else {
|
||||
echo '<span class="igny8-empty">—</span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom columns
|
||||
*
|
||||
@@ -90,18 +56,8 @@ class Igny8AdminColumns {
|
||||
* @return array Modified columns
|
||||
*/
|
||||
public function add_columns($columns) {
|
||||
$new_columns = array();
|
||||
|
||||
foreach ($columns as $key => $value) {
|
||||
$new_columns[$key] = $value;
|
||||
|
||||
if ($key === 'title') {
|
||||
$new_columns['igny8_taxonomy'] = __('Taxonomy', 'igny8-bridge');
|
||||
$new_columns['igny8_attribute'] = __('Attribute', 'igny8-bridge');
|
||||
}
|
||||
}
|
||||
|
||||
return $new_columns;
|
||||
// Removed custom taxonomy and attribute columns - posts now use native WordPress taxonomies (categories, tags, etc.)
|
||||
return $columns;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,15 +67,8 @@ class Igny8AdminColumns {
|
||||
* @param int $post_id Post ID
|
||||
*/
|
||||
public function render_column_content($column_name, $post_id) {
|
||||
switch ($column_name) {
|
||||
case 'igny8_taxonomy':
|
||||
$this->render_taxonomy_column($post_id);
|
||||
break;
|
||||
|
||||
case 'igny8_attribute':
|
||||
$this->render_attribute_column($post_id);
|
||||
break;
|
||||
}
|
||||
// Removed custom column rendering - posts now use native WP taxonomies
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user