Last active
November 21, 2017 14:12
-
-
Save rahularyan/5fb2c5078fe8fde4fc87ce247698b15a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_ap_the_title( $title, $ID ) { | |
$post = ap_get_post( $ID ); | |
if ( 'question' === $post->post_type && ! empty( ap_selected_answer( $ID ) ) ) { | |
return $title . ' [solved]'; | |
} | |
} | |
add_filter( 'the_title', 'my_ap_the_title', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment