2017 © Pedro PelΓ‘ez
 

library admin-column-manager

This plugin provides an easy way to add, remove and manage columns from WordPress administration screens for post, users and taxonomy listing.

image

htmlburger/admin-column-manager

This plugin provides an easy way to add, remove and manage columns from WordPress administration screens for post, users and taxonomy listing.

  • Monday, June 27, 2016
  • by htmlburger-git
  • Repository
  • 0 Watchers
  • 0 Stars
  • 2,432 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 24 % Grown

The README.md

Carbon Admin Columns Manager

This plugin provides an easy way to add, remove and manage columns from WordPress administration screens for post, users and taxonomy listing., (*1)


Usage

Modify pages list columns
Remove date and author columns from page listing screen, and add 2 extra columns (color and view count). The values for the extra columns are fetched from certain post meta fields., (*2)

Code:, (*3)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page') )
  ->remove( array('date', 'author') )
  ->add( array(
        Carbon_Admin_Column::create('Color')
           ->set_field('color'),
        Carbon_Admin_Column::create('Views Count')
           ->set_field('views_count'),
     ));

Print column values with callback function
Add an extra column to page listing screen: views. Every page with more than 1000 views is rendered with a special CSS class popular-page., (*4)

This is achieved by using a custom callback function for printing the content of the column for the particular post_id., (*5)

Code:, (*6)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page') )
  ->add( array(
        Carbon_Admin_Column::create('Views Count')
           ->set_callback('crb_admin_render_view_count_col'),
     ));

function crb_admin_render_view_count_col( $post_id ) {
    $views_count = get_post_meta($post_id, 'views_count', 1);
    $views_count = intval($views_count);

    if ($views_count > 1000) {
        $views_count = '<span class="popular-page">' . $views_count . '</span>';
    }

    return $views_count;
}

Modify custom post type columns
Remove date and author columns from the crb_cars custom post type listing screen, and add 2 extra columns (model and price). The values for the extra columns are fetched from certain post meta fields., (*7)

Code:, (*8)

Carbon_Admin_Columns_Manager::modify_columns('post', array('crb_cars') )
  ->remove( array('date', 'author') )
  ->add( array(
        Carbon_Admin_Column::create('Model')
           ->set_field('_crb_car_model'),
        Carbon_Admin_Column::create('Price')
           ->set_field('_crb_car_price'),
     ));

Render featured image in the listing table, (*9)

To show the featured image for the post, page and crb_cars post types, use a custom callback function that accepts the $post_id as a parameter., (*10)

Code:, (*11)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page', 'post', 'crb_cars') )
  ->add( array(
        Carbon_Admin_Column::create('Thumbnail')
           ->set_callback('crb_column_render_post_thumbnail'),
     ));

function crb_column_render_post_thumbnail( $post_id ) {
    if ( has_post_thumbnail( $post_id ) ) {
        $thumbnail = get_the_post_thumbnail( $post_id, 'my_backend_image_size' );
    } else {
        $thumbnail = '';
    }

    return $thumbnail;
}

Modify taxonomy columns, (*12)

Remove slug and count columns from categories and tags listing screens, and add 2 extra columns (image and subtitle). The values for the extra columns are fetched from certain term meta fields. Showing the term image is achieved by using a custom callback function and showing the term subtitle is achieved by using the field meta key., (*13)

Code:, (*14)

Carbon_Admin_Columns_Manager::modify_columns('taxonomy', array('category', 'post_tag') )
  ->remove( array('description', 'posts') )
  ->add( array(
        Carbon_Admin_Column::create('Subtitle')
           ->set_field('crb_term_subtitle'),
        Carbon_Admin_Column::create('Image')
           ->set_callback('crb_column_render_term_image'),
     ));

function crb_column_render_term_image( $term_id ) {
    if ( $term_image_id = carbon_get_term_meta( $term_id, 'crb_term_image' ) ) {
        $term_image = wp_get_attachment_image( $term_image_id, 'my_backend_image_size' );
    } else {
        $term_image = '';
    }

    return $term_image;
}

Modify user columns, (*15)

Remove posts, role and e-mail columns from users listing screen, and add 2 extra columns (is user active and user registration date). The values for the extra columns are fetched from user meta fields. Showing the user status (active / inactive) is achieved by using the field meta key, while showing the user registration date is achieved by using a custom callback function., (*16)

Code:, (*17)

Carbon_Admin_Columns_Manager::modify_columns('user')
  ->remove( array('email', 'role', 'posts') )
  ->add( array(
        Carbon_Admin_Column::create('Is Active')
           ->set_field('crb_user_status'),
        Carbon_Admin_Column::create('Registration Date')
           ->set_callback('crb_column_get_user_registration_date'),
     ));

function crb_column_get_user_registration_date( $user_id ) {
    $user = get_user_by( 'id', $user_id );
    $user_registration_date = $user->data->user_registered;

    $friendly_date_text = date( 'd F, Y', strtotime( $user_registration_date ) );

    return $friendly_date_text;
}

How to deal with the responsive version of the WordPress admin, (*18)

By default WordPress hides all additional columns when the device width is equal or less than 800 pixels. However, the unnecessary columns can be removed or their values can be combined into a single column by using a callback function., (*19)

The example below removes the date, author and comments columns from page listing screen, and adds a single column showing the author, comments, date and thumbnail. In this example we will use the regular post function to retrieve the information. Each column will display the post data that corresponds to the listed entry., (*20)

Code:, (*21)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page') )
    ->remove( array('date', 'author', 'comments') )
    ->add( array(
        Carbon_Admin_Column::create('Page Information')
            ->set_callback('crb_column_page_information'),
    ) );

function crb_column_page_information( $page_id ) {
    ob_start();
    ?>
    <ul>
        <?php if ( has_post_thumbnail() ): ?>
            <li>
                <?php the_post_thumbnail( 'thumbnail' ) ?>
            </li>
        <?php endif ?>
        <li>
            Posted on : <?php the_time('F jS, Y ') ?>
        </li>
        <li>
             <?php printf(__('Posted by : %s', 'crb'), get_the_author()) ?>
        </li>
        <li>
            <?php comments_popup_link( __('No Comments', 'crb'), __('1 Comment', 'crb'), __('% Comments', 'crb') ); ?>
        </li>
    </ul>
    <?php
    $page_information_content = ob_get_clean();

    return $page_information_content;
}

Create a sortable column in the WordPress admin, (*22)

Create a sortable column on page listing screen that sorts the pages by their views count., (*23)

Code:, (*24)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page') )
    ->add( array(
        Carbon_Admin_Column::create('Page Information')
            ->set_sort_field('views_count'), # that value will be accessible as 'orderby' get parameter.
            ->set_callback('crb_column_page_information'),
    ) );

add_action('pre_get_posts', 'crb_sort_pages_by_their_views_count');
function crb_sort_pages_by_their_views_count( $query ) {

    if ( 
        is_admin() 
        && $query->is_main_query() 
        && get_query_var( 'post_type' )==='page'
        && !empty( $_GET['orderby'] )
        && $_GET['orderby']==='orderby_custom_column'
    ) {

        $query->set('orderby', 'meta_value_num');
        $query->set('meta_key', '_crb_page_views');
    }

    return $query;
}

Create a sortable column on user listing screen that sorts the users by their status (active / inactive)., (*25)

Code:, (*26)

Carbon_Admin_Columns_Manager::modify_columns('user')
    ->add( array(
        Carbon_Admin_Column::create('Is User Active')
            ->set_field('_crb_is_user_active')
            ->set_sort_field('orderby_status'),
    ) );

add_action( 'pre_get_users', 'crb_pre_user_query' );
function crb_pre_user_query( $user_query ) {
    global $wpdb;

    if (
        is_admin()
        && !empty($_GET['orderby']) 
        && $_GET['orderby']==='orderby_status'
    ) {
        $user_query->set('meta_key', '_crb_is_user_active');
        $user_query->set('orderby', 'meta_value');
    }
}

Set custom width to a column in the WordPress admin, (*27)

Set different width to Color, Views Count and Status columns for the page listing screen. Color column width is in percents while the View Count column width is in pixels. The width for the Status column is passed as an integer, which will automatically treat it as a pixel value., (*28)

Code:, (*29)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page') )
    ->remove( array('date', 'author') )
    ->add( array(
        Carbon_Admin_Column::create('Color')
            ->set_width( '80%' )
            ->set_field('color'),
        Carbon_Admin_Column::create('Views Count')
            ->set_width( '25px' )
            ->set_field('views_count'),
        Carbon_Admin_Column::create('Status')
            ->set_width( 100 )
            ->set_field('status'),
    ));

Please, note that WordPress administration is responsive and you should use a reasonable number of columns, as well as reasonable width for each one of them. For example, having a column width of 600 pixels might cause issues on mobile devices., (*30)

How to set custom column name and to add specific style to it?, (*31)

By default the column names are generated randomly unless custom name is specified., (*32)

Setting up custom name for Image column on page listing screen and setting maximum image width., (*33)

Code:, (*34)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page') )
    ->remove( array('date', 'author') )
    ->add( array(
        Carbon_Admin_Column::create('Color')
            ->set_name( 'crb-column-page-thumbnail' )
            ->set_width( '100px' )
            ->set_field('color'),
     ));

CSS:, (*35)

<style type="text/css">
    /* column heading */
    #carbon-crb-column-page-thumbnail {
        font-weight : bold;
    }

    /* column value */
    .crb-column-page-thumbnail img {
        max-width : 100%;
        height : auto;
    }
</style>

How to reorder the columns on the admin listing screeen?, (*36)

Moving page thumbnail column between the post checkbox and title columns. It's required that you set a column name with set_name() and then to specify the new order with sort(). All columns that are not specified in the array that you pass to the sort() method will be moved to the end, keeping their default order., (*37)

Code:, (*38)

Carbon_Admin_Columns_Manager::modify_columns('post', array('page') )
    ->sort( array('cb', 'crb-thumbnail-column') )
    ->add( array(
        Carbon_Admin_Column::create('Thumbnail')
            ->set_name( 'crb-thumbnail-column' )
            ->set_callback('crb_column_thumbnail'),
     ));

Useful Callback Functions

The functions below are just for reference and are not defined in the plugin., (*39)

Page/Post Thumbnail
Use the following callback function to display the post thumbnail photo., (*40)

Code :, (*41)

function crb_column_thumbnail( $post_id ) {
    if ( has_post_thumbnail( $post_id ) ) {
        return get_the_post_thumbnail( $post_id, 'admin_thumbnails' );
    }
}

Page Template
Use the following callback function to display the page template name., (*42)

Code :, (*43)

function crb_column_page_template( $page_id ) {
    $page_template_name = array_search(
        get_post_meta( $page_id, '_wp_page_template', true ),
        get_page_templates()
    );

    if ( $page_template_name === false ) {
        $page_template_name = 'Default';
    }

    return $page_template_name;
}

Page Sidebar
Use the following callback function to display the sidebar that is selected for each page., (*44)

Code :, (*45)

function crb_column_page_template( $page_id ) {

    $sidebar = get_post_meta( $page_id, 'crb_custom_sidebar', true );

    if ( empty($sidebar) ) {
        $sidebar = 'Default Sidebar';
    }

    return $page_template_name;
}

Package Summary

Columns Manager
There are three types of manager for Posts, Taxonomies and Users listing pages., (*46)

Posts Manager, (*47)

Code :, (*48)

$post_types = array( 'post_type_one', 'post_type_two' );

$columns_to_remove = array( 'column_one', 'column_two' );

$custom_column_order = array( 'column_name_five', 'column_name_four', 'column_name_three' );

$columns_to_add = array( $columns_code_goes_here );

Carbon_Admin_Columns_Manager::modify_columns('post', $post_types )
    ->remove( $columns_to_remove ) # remove unnecessary columns
    ->sort( $custom_column_order ) # set custom column order
    ->add( $columns_to_add ) # add new columns

Taxonomy Manager, (*49)

Code :, (*50)

$taxonomies = array( 'taxonomy_name_one', 'taxonomy_name_two' );

$columns_to_remove = array( 'column_one', 'column_two' );

$custom_column_order = array( 'column_name_five', 'column_name_four', 'column_name_three' );

$columns_to_add = array( $columns_code_goes_here );

Carbon_Admin_Columns_Manager::modify_columns('taxonomy', $taxonomies )
    ->remove( $columns_to_remove ) # remove unnecessary columns
    ->sort( $custom_column_order ) # set custom column order
    ->add( $columns_to_add ) # add new columns

Users Manager, (*51)

Code :, (*52)

$columns_to_remove = array( 'column_one', 'column_two' );

$custom_column_order = array( 'column_name_five', 'column_name_four', 'column_name_three' );

$columns_to_add = array( $columns_code_goes_here );

Carbon_Admin_Columns_Manager::modify_columns('user')
    ->remove( $columns_to_remove ) # remove unnecessary columns
    ->sort( $custom_column_order ) # set custom column order
    ->add( $columns_to_add ) # add new columns

Column, (*53)

Column that lists meta value by a given meta key, (*54)

Code :, (*55)

$column_name = __('My Column Name', 'crb');

$meta_key = '_crb_meta_key';

Carbon_Admin_Column::create( $column_name )
    ->set_field( $meta_key ),

Column that prints its value through callback function, (*56)

Code :, (*57)

$column_name = __('My Column Name', 'crb');

$callback_function_name = 'crb_callback_function';

Carbon_Admin_Column::create( $column_name )
    ->set_callback( $callback_function_name ),

/**
 * Callback Function
 *
 * @param $object_id Post ID, Term ID or User Id according to the Manager
 */
function crb_callback_function( $object_id ) {
    # posts
    return get_post_meta( $object_id, '_crb_meta_key', true );

    # terms
    return carbon_get_term_meta( $object_id, '_crb_meta_key' );

    # users
    return get_user_meta( $object_id, '_crb_meta_key', true );
}

Available Column Functions, (*58)

  • ::create( $param ), string, column label
  • set_field( $param ), string, meta key, cannot be used along with set_callback()
  • set_callback( $param ), string, callback function name, cannot be used along with set_field()
  • set_name( $param ), string, unque column name that can be used for column sorting or styling. by default the column name is generated randomly
  • set_sort_field( $param ), string, $_GET['orderby'] value

Code :, (*59)

Carbon_Admin_Column::create( $column_label )
    ->set_field( $meta_key )
    ->set_callback( $callback_function_name )
    ->set_name( $column_name )
    ->set_sort_field( $crb_sorting_value )

FAQ

Врябва Π»ΠΈ Π΄Π° Π²ΠΊΠ»ΡŽΡ‡Π° Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ°Ρ‚Π°, Π·Π° я ΠΏΠΎΠ»Π·Π²Π°ΠΌ?
Π—Π° всички Π½ΠΎΠ²ΠΈ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΈ Ρ‚Π°Π·ΠΈ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ° Ρ‰Π΅ бъдС част ΠΎΡ‚ lib ΠΏΠ°ΠΏΠΊΠ°Ρ‚Π°. Π—Π° ΠΏΠΎ-стари ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΈ Ρ‰Π΅ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ Π΄Π° я ΠΏΠΎΠ»Π·Π²Π°Ρ‚Π΅ слСд изпълнСниС Π½Π° drone upgrade-lib Π² ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° си, ΠΊΠ°Ρ‚ΠΎ Ρ‰Π΅ трябва Ρ€ΡŠΡ‡Π½ΠΎ Π΄Π° Π΄ΠΎΠ±Π°Π²ΠΈΡ‚Π΅ Ρ„Π°ΠΉΠ»Π° Π·Π° ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅ Π² /options ΠΈ Π΄Π° Π³ΠΎ include-Π½Π΅Ρ‚Π΅ във functions.php., (*60)

Има Π»ΠΈ особСност ΠΏΡ€ΠΈ ΠΈΠ·ΠΏΠΎΠ»Π·Π²Π°Π½Π΅ Π½Π° Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ°Ρ‚Π° Π² плъгини ΠΈΠ»ΠΈ Π² Π΄Ρ€ΡƒΠ³ΠΈ Ρ‚Π΅ΠΌΠΈ?
Π–Π΅Π»Π°Ρ‚Π΅Π»Π½ΠΎ Π΅ ΠΏΡ€ΠΈ Π²ΠΌΡŠΠΊΠ²Π°Π½Π΅Ρ‚ΠΎ Π½Π° Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ°Ρ‚Π° Π΄Π° провСряватС Π΄Π°Π»ΠΈ Π²Π΅Ρ‡Π΅ Π½Π΅ сС вмъква ΠΎΡ‚ плъгин ΠΈΠ»ΠΈ ΠΎΡ‚ Ρ‚Π΅ΠΌΠ°Ρ‚Π° с ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° Π·Π° Π²Π΅Ρ‡Π΅ Π²ΠΌΡŠΠΊΠ½Π°Ρ‚Π° Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ° с class_exists., (*61)

Code :, (*62)

if ( !class_exists(Carbon_Admin_Columns_Manager) ) {
    include_once( PATH_TO_LIBRARY . 'carbon-admin-columns-manager.php');
}

Има Π»ΠΈ ΠΎΠ³Ρ€Π°Π½ΠΈΡ‡Π΅Π½ΠΈΠ΅ Π² броят Π½Π° ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅?
ΠžΠ³Ρ€Π°Π½ΠΈΡ‡Π΅Π½ΠΈΠ΅ ΠΎΡ‚ страна Π½Π° ΠΊΠΎΠ΄Π° няма, Ρ€Π°Π·Π±ΠΈΡ€Π° сС, Π½Π΅ Π΅ Ρ…ΡƒΠ±Π°Π²ΠΎ Π΄Π° сС злоупотрСбява ΠΈ Π²ΠΈΠ½Π°Π³ΠΈ трябва Π΄Π° сС провСрява ΠΊΠ°ΠΊ сС Π΄ΡŠΡ€ΠΆΠ°Ρ‚ ΠΏΡ€ΠΈ ΠΏΠΎ-ниски Ρ€Π΅Π·ΠΎΠ»ΡŽΡ†ΠΈΠΈ., (*63)

Мога Π»ΠΈ Π΄Π° Π·Π°Π΄Π°ΠΌ ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π° ΡˆΠΈΡ€ΠΈΠ½Π° Π½Π° ΠΊΠΎΠ»ΠΎΠ½Π°Ρ‚Π°?
Π’ΡŠΠ·ΠΌΠΎΠΆΠ½ΠΎ Π΅ Π·Π°Π΄Π°Π²Π°Π½Π΅ Π½Π° ΡˆΠΈΡ€ΠΈΠ½ΠΈ Π² пиксСли ΠΈ Π² ΠΏΡ€ΠΎΡ†Π΅Π½Ρ‚ΠΈ. Описано Π΅ Π² ΠΏΡ€ΠΈΠΌΠ΅Ρ€ ΠΏΠΎ-Π³ΠΎΡ€Π΅., (*64)

Как ΠΌΠΎΠ³Π° Π΄Π° стилвам ΡΡŠΠ΄ΡŠΡ€ΠΆΠ°Π½ΠΈΠ΅Ρ‚ΠΎ Π½Π° ΠΊΠΎΠ»ΠΎΠ½Π°Ρ‚Π°?
НСобходимо Π΅ Π΄Π° сС Π·Π°Π΄Π°Π΄Π΅ ΡƒΠ½ΠΈΠΊΠ°Π»Π½ΠΎ ΠΈΠΌΠ΅ Π½Π° ΠΊΠΎΠ»ΠΎΠ½Π°Ρ‚Π° слСд, ΠΊΠΎΠ΅Ρ‚ΠΎ Π΅ възмоТно Π½Π΅ΠΉΠ½ΠΎΡ‚ΠΎ стилванС ΠΏΠΎ ΠΈΠΌΠ΅. Описано Π΅ Π² ΠΏΡ€ΠΈΠΌΠ΅Ρ€ ΠΏΠΎ-Π³ΠΎΡ€Π΅., (*65)

Мога Π»ΠΈ Π΄Π° промСням стойността Π½Π° Π²Π΅Ρ‡Π΅ ΡΡŠΡ‰Π΅ΡΡ‚Π²ΡƒΠ²Π°Ρ‰Π° ΠΊΠΎΠ»ΠΎΠ½Π°?
Π—Π° ΠΌΠΎΠΌΠ΅Π½Ρ‚Π° Π½Π΅ Π΅ възмоТно, Ρ‚ΡŠΠΉ ΠΊΠ°Ρ‚ΠΎ post/taxonomy ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅ ΠΏΡ€ΠΈΠ½Ρ‚ΠΈΡ€Π°Ρ‚ стойността ΠΈ Π±Π΅Π· 'Ρ…Π°ΠΊΠ°Π½Π΅' Π½Π΅ ΠΌΠΎΠΆΠ΅ Π΄Π° станС ΠΏΠΎ Ρ…ΡƒΠ±Π°Π² Π½Π°Ρ‡ΠΈΠ½., (*66)

Π—Π°Ρ‰ΠΎ ΠΊΠΎΠ»ΠΎΠ½Π°Ρ‚Π° Π²Ρ€ΡŠΡ‰Π° стойността Π½Π°Π΄ Ρ‚Π°Π±Π»ΠΈΡ†Π°Ρ‚Π°?
Π’ΠΎΠ·ΠΈ ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌ възниква само ΠΏΡ€ΠΈ потрСбитСлскитС ΠΊΠΎΠ»ΠΎΠ½ΠΈ, ΠΊΠΎΠ³Π°Ρ‚ΠΎ стойността Π½Π° callback функцията сС ΠΏΡ€ΠΈΠ½Ρ‚ΠΈΡ€Π° echo. НСобходимо Π΅ стойността Π΄Π° сС Π²Ρ€ΡŠΡ‰Π° return., (*67)

Мога Π»ΠΈ Π΄Π° промСням стойността Π½Π° Π²Π΅Ρ‡Π΅ ΡΡŠΡ‰Π΅ΡΡ‚Π²ΡƒΠ²Π°Ρ‰Π° ΠΊΠΎΠ»ΠΎΠ½Π°?
Π—Π° ΠΌΠΎΠΌΠ΅Π½Ρ‚Π° Π½Π΅ Π΅ възмоТно, Ρ‚ΡŠΠΉ ΠΊΠ°Ρ‚ΠΎ post/taxonomy ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅ ΠΏΡ€ΠΈΠ½Ρ‚ΠΈΡ€Π°Ρ‚ стойността ΠΈ Π±Π΅Π· 'Ρ…Π°ΠΊΠ°Π½Π΅' Π½Π΅ ΠΌΠΎΠΆΠ΅ Π΄Π° станС ΠΏΠΎ Ρ…ΡƒΠ±Π°Π² Π½Π°Ρ‡ΠΈΠ½., (*68)

Искам Π΄Π° ΠΏΡ€Π΅ΠΌΠ°Ρ…Π½Π° ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π° ΠΊΠΎΠ»ΠΎΠ½Π°, Π½ΠΎ Π½Π΅ ΠΈ Π·Π½Π°ΠΌ ΠΈΠΌΠ΅Ρ‚ΠΎ. ΠžΡ‚ΠΊΡŠΠ΄Π΅ ΠΌΠΎΠ³Π° Π΄Π° Π³ΠΎ видя?
ОбикновСно Ρ‚ΠΎ Π΅ ID-Ρ‚ΠΎ ΠΊΠΎΠ»ΠΎΠ½Π°Ρ‚Π°. МоТС Π΄Π° сС ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΈ с browser dev tool-Π°., (*69)

Мога Π»ΠΈ Π΄Π° ΠΈΠ·ΠΏΠΎΠ»Π·Π²Π°ΠΌ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ°Ρ‚Π° Π½Π° ΠΌΡƒΠ»Ρ‚ΠΈΠ΅Π·ΠΈΡ‡Π΅Π½ сайт?
Π Π°Π·Π±ΠΈΡ€Π° сС., (*70)

Има Π»ΠΈ ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π° структура ΠΏΡ€ΠΈ ΠΈΠ½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€Π°Π½Π΅ Π½Π° ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅?
ΠžΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π° структура няма. По авторско ΠΌΠ½Π΅Π½ΠΈΠ΅ Π±ΠΈ Π±ΠΈΠ»ΠΎ ΠΆΠ΅Π»Π°Ρ‚Π΅Π»Π½ΠΎ Π΄Π° сС слСдва слСдния ΠΌΠΎΠ΄Π΅Π»:, (*71)

Code :, (*72)

if ( !class_exists('Carbon_Admin_Columns_Manager') ) {
    return;
}

add_action( 'init', 'crb_admin_columns' );
function crb_admin_columns(){

    // columns code goes here

}

Мога Π»ΠΈ Π΄Π° сортирам ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅ Π² ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½ Ρ€Π΅Π΄?
Π’ΡŠΠ·ΠΌΠΎΠΆΠ½ΠΎ Π΅ ΠΏΡ€Π΅Π½Π°Ρ€Π΅ΠΆΠ΄Π°Π½Π΅ Π½Π° ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅ ΠΊΠ°Ρ‚ΠΎ ΠΊΠΎΠ»ΠΎΠ½ΠΈΡ‚Π΅, ΠΊΠΎΠΈΡ‚ΠΎ Π½Π΅ са Π·Π°Π΄Π°Π΄Π΅Π½ΠΈ Π² масива ΠΎΡ‚ ΠΊΠΎΠ»ΠΎΠ½ΠΈ Ρ‰Π΅ Π±ΡŠΠ΄Π°Ρ‚ послСдни. ΠŸΡ€ΠΈΠΌΠ΅Ρ€ΡŠΡ‚ Π΅ описан ΠΏΠΎ-Π³ΠΎΡ€Π΅., (*73)

The Versions

27/06 2016

dev-master

9999999-dev

This plugin provides an easy way to add, remove and manage columns from WordPress administration screens for post, users and taxonomy listing.

  Sources   Download

GPL-2.0

27/06 2016

v1.0.0

1.0.0.0

This plugin provides an easy way to add, remove and manage columns from WordPress administration screens for post, users and taxonomy listing.

  Sources   Download

GPL-2.0