BuddyDev

Search

Replies

  • Participant
    Level: Guru
    Posts: 907

    Ravi thank you very much it worked. I’m really grateful for the outstanding support you provide.

    Im testing the features now, I will update you tomorrow.

  • Participant
    Level: Guru
    Posts: 907

    Thanks Ravi,

    After updating the plugin the (publish-post) page crashed, but i was eventually able to isolate the problem to the code you sent before. I think the code is not compatible with the latest pay per post update.

     /**
     * Enable BuddyBlog dropdown submission type.
     */
    add_action( 'bblpro_form_after_form_fields', function ( $form_id, $post ) {
    
            if ( ! bblpro_ppp_is_form_pay_per_post_enabled( $form_id ) || $post->post_status == 'published' ) {
                    return;
            }
        $submission_type = get_post_meta( $post->ID, '_bblpro_submission_type', true );
    
            ?>
        <div class="bbl-form-field-container bbl-form-field-type-submission-type-container">
            <div class="bbl-form-field bbl-form-field-select">
                <label for="bbl_custom_field"
                       class="bbl-field-label bbl-field-label-type-select"><?php esc_html_e( 'Submission Type', 'sb-buddyblog-custom' ); ?></label>
                <select name="bblpro-post-submission-type" id="bblpro-tax-selectbox-submission-type" class="postform">
                    <option value="free" <?php selected( $submission_type, 'free' ) ?>><?php esc_html_e( 'Free Post' ); ?></option>
                    <option value="sponsored" <?php selected( $submission_type, 'sponsored' ) ?>><?php esc_html_e( '30 Days | Sponsored Post - ₦50,000' ); ?></option>
                </select>
            </div>
        </div>
            <?php
    }, 10, 2 );
    
    add_action( 'bblpro_post_submitted', function ( $post_id, $form_id, $post_data ) {
    
            if ( ! bblpro_ppp_is_form_pay_per_post_enabled( $form_id ) ) {
                    return;
            }
    
            if ( isset( $_POST['bblpro-post-submission-type'] ) && 'free' == $_POST['bblpro-post-submission-type'] ) {
                    update_post_meta( $post_id, '_bblpro_submission_type', sanitize_text_field( $_POST['bblpro-post-submission-type'] ) );
                    add_filter( 'bblpro_ppp_skip_post_purchase', '__return_true' );
            }
    
    }, 9, 3 ); 
  • Participant
    Level: Guru
    Posts: 907

    I saw a solution to 1 at https://www.wpbeginner.com/plugins/how-to-restrict-media-library-access-to-users-own-uploads-in-wordpress/

     // Limit media library access
      
    add_filter( 'ajax_query_attachments_args', 'wpb_show_current_user_attachments' );
     
    function wpb_show_current_user_attachments( $query ) {
        $user_id = get_current_user_id();
        if ( $user_id && !current_user_can('activate_plugins') && !current_user_can('edit_others_posts
    ') ) {
            $query['author'] = $user_id;
        }
        return $query;
    }  
  • Participant
    Level: Guru
    Posts: 907

    Thank you for the feedback i’m really grateful for the effort you are giving

  • Participant
    Level: Guru
    Posts: 907

    Hello Ravi,

    How is the current version progressing.

    Thanks

  • Participant
    Level: Guru
    Posts: 907
    Tosin on in reply to: BuddyPress User Contact Form Privacy Settings #45645

    removing the visibility and allowing admins to decide if they wanted to let users select privacy would be the best as I have both public message and private message disabled.

  • Participant
    Level: Guru
    Posts: 907

    Hello Brajesh,

    I would like to ask if my former suggestion can be considered

    SUGGESTION
    Kindly see the screenshot below for some ideas

    https://ibb.co/jhqnK8D
    https://ibb.co/s1QYtJW

  • Participant
    Level: Guru
    Posts: 907
    Tosin on in reply to: buddyblog medium editor not displaying embeds #45572

    Kind reminder sir

  • Participant
    Level: Guru
    Posts: 907
    Tosin on in reply to: [Resolved] Remove activity filter option #45548

    I was wondering if its possible to add a new filter called (Trending) which will filter the activity based on posts with the most comments like this plugin https://wordpress.org/plugins/bp-whats-hot/

    What I simply mean if you can make turn this plugin (https://wordpress.org/plugins/bp-whats-hot/) into a dropdown filter option rather than a navigation tab menu.

    I removed the activity filter tab menu through a template override in child theme but now I want the trending feature be a filter dropdown option

  • Participant
    Level: Guru
    Posts: 907
    Tosin on in reply to: [Resolved] Remove activity filter option #45547

    Thanks Brajesh

    I worked perfectly