Making WordPress.org


Ignore:
Timestamp:
04/02/2014 10:45:02 PM (12 years ago)
Author:
coffee2code
Message:

jobs.wordpress.net: Add custom columns via 'manage_posts_columns’ filter instead of ‘manage_job_posts_columns’ so custom column ordering can be achieved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/jobs.wordpress.net/public_html/wp-content/plugins/jobswp/jobswp.php

    r496 r497  
    9898        $this->days_until_pruning = apply_filters( 'jobswp_days_until_pruning', 21 );
    9999
    100         add_filter( 'manage_job_posts_columns',       array( $this, 'posts_columns' ) );
     100        add_filter( 'manage_posts_columns',           array( $this, 'posts_columns' ), 8, 2 );
    101101        add_action( 'manage_job_posts_custom_column', array( $this, 'custom_posts_columns' ), 10, 2 );
    102102
     
    165165     * @return array Amended associated array of column names and labels
    166166     */
    167     function posts_columns( $columns ) {
     167    function posts_columns( $columns, $post_type ) {
     168        if ( 'job' !== $post_type ) {
     169            return $columns;
     170        }
    168171        $columns['poster']       = __( 'Poster', 'jobswp' );
    169172        $columns['poster_email'] = __( 'Poster Email', 'jobswp' );
Note: See TracChangeset for help on using the changeset viewer.