Support » Plugin: Advanced Post Manager » How to add columns

  • Resolved ruipdguerra

    (@ruipdguerra)


    You say in your files:

    // PUBLIC API METHODS

    /**
    * Sets the columns to be shown in the list view for associated post type
    * See documentation for column array construction
    * @param $columns array of column arrays
    */

    And

    /**
    * Adds columns to the current set of registered columns
    * See documentation for column array construction
    * @param $columns array of column arrays
    */

    But there’s nothing in the documents where you refer to Column Array.
    Can you help? I need to add specific columns to be displayed by default, and let the user to add more or not.

    https://wordpress.org/plugins/advanced-post-manager/

Viewing 1 replies (of 1 total)
  • Hey @ruipdguerra,

    Are you referring to where the $columns argument is defined?

    If so, it’s originally in the constructor for Tribe_Columns and gets passed to the set_columns() and add_columns() methods, which are the ones whose comment blocks you highlighted in your here.

    This $columns property is itself the columns property in the main Tribe_APM class in tribe-apm.php. You see it called around line 80 or so, with code like this:

    $this->columns = new Tribe_Columns( $this->post_type, $this->get_column_args() );

    So, in those functions whose comment blocks you cited, $columns is ultimately the value of $this->get_column_args() in Tribe_APM

    I hope this helps a bit.

    Cheers,
    George

Viewing 1 replies (of 1 total)
  • The topic ‘How to add columns’ is closed to new replies.