Support » Plugin: P2 Resolved Posts » Change Words Un-Resolved and Resolved

Viewing 1 replies (of 1 total)
  • Dion Hulse

    (@dd32)

    Core Developer

    Hi,

    There’s two methods you can use to add or remove states:

    Here’s a rough example of how to use it within a plugin:

    add_action( 'plugins_loaded', function() {
       P2_Resolved_Posts::instance()->remove_state( 'unresolved' );
       P2_Resolved_Posts::instance()->remove_state( 'resolved' );
    
       P2_Resolved_Posts::instance()->add_state( 'open', 'Open', 'first' );
       P2_Resolved_Posts::instance()->add_state( 'closed', 'Closed' );
    } );

    Unfortunately I don’t have an install handy right this moment to test on, so hopefully I don’t have any typo’s in that and it’ll just work 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Change Words Un-Resolved and Resolved’ is closed to new replies.