Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @martijn94 martijn94 revised this gist Apr 13, 2016. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions wp-admin-add-posts-state.php
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    <?php

    //======================================================================
    // Add post state to the profile edit page
    // Add post state to the projects page
    //======================================================================

    add_filter( 'display_post_states', 'ecs_add_post_state', 10, 2 );

    function ecs_add_post_state( $post_states, $post ) {
    if( $post->post_name == 'onderzoeken' ) {
    $post_states[] = 'Onderzoeken Pagina';

    if( $post->post_name == 'edit-profile' ) {
    $post_states[] = 'Profile edit page';
    }

    return $post_states;
  2. @martijn94 martijn94 revised this gist Apr 13, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions wp-admin-add-posts-state.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    //======================================================================
    // Add post state to the profile edit page
    //======================================================================
  3. @martijn94 martijn94 created this gist Apr 13, 2016.
    13 changes: 13 additions & 0 deletions wp-admin-add-posts-state.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    //======================================================================
    // Add post state to the profile edit page
    //======================================================================

    add_filter( 'display_post_states', 'ecs_add_post_state', 10, 2 );

    function ecs_add_post_state( $post_states, $post ) {
    if( $post->post_name == 'onderzoeken' ) {
    $post_states[] = 'Onderzoeken Pagina';
    }

    return $post_states;
    }