BuddyDev

Search

Buddyblog post title checker

  • Participant
    Level: Guru
    Posts: 741
    Tosin on #44550

    Hello,

    Please can you add similar feature to buddyblog https://wordpress.org/plugins/unique-title-checker/
    This would really help in preventing multiple authors or users from creating content with duplicate post titles.
    User generated content can be very difficult to manage but this feature would really help a lot

    Hope you consider

    Thanks

  • Participant
    Level: Guru
    Posts: 741
  • Keymaster
    (BuddyDev Team)
    Posts: 22218
    Brajesh Singh on #44563

    Hi Tosin,
    Thank you for the suggestion. We will add the support for one of these in near future.

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 741
    Tosin on #44566

    Awesome Brajesh

    Hope to see this feature soon

  • Participant
    Level: Guru
    Posts: 741
    Tosin on #46808

    Hello Brajesh

    I’ll like to remind you about this suggestion

  • Keymaster
    (BuddyDev Team)
    Posts: 22218
    Brajesh Singh on #46811

    Thank you.
    I will have an update next week about it.

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 741
    Tosin on #46901

    Wow thanks Brajesh, ill be looking forward to the new update

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2505
    Ravi on #46911

    Hello Tosin,

    Please check the following code:

    
    add_filter( 'bblpro_validation_errors', function ( $errors, $data ) {
    
    	if ( ! class_exists( 'Unique_Title_Checker' ) ) {
    		return $errors;
    	}
    
    	$title_checker = Unique_Title_Checker::get_instance();
    
    	if ( empty( $data['bbl_post_title'] ) ) {
    		return $errors;
    	}
    
    	$args = array(
    		'post_title' => sanitize_text_field( wp_unslash( $data['bbl_post_title'] ) ),
    		'post_type'  => sanitize_text_field( wp_unslash( $data['bbl_post_type'] ) ),
    	);
    
    	$validate_data = $title_checker->check_uniqueness( $args );
    
    	if ( 'error' == $validate_data['status'] ) {
    		$errors->add( 'bbl_post_title', $validate_data['message'] );
    	}
    
    	return $errors;
    }, 10, 3 );
    
    

    It works with “Unique Title Checker” By Bernhard Kau

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 741
    Tosin on #46912

    WOW REALLY AWESOME

    Just tested the code and it works perfectly

    Thanks Brajesh & Ravi

  • Keymaster
    (BuddyDev Team)
    Posts: 22218
    Brajesh Singh on #46913

    You are welcome. Thanks to @ravisharma for taking on this today.

    I am sorry that it got so much delay which could have been provided in couple of days.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved