Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 301 through 315 (of 3,702 total)
  • Author
    Posts
  • Anh TranAnh Tran
    Keymaster

    Hi,

    The plugin doesn't support hiding fields by user roles/IDs. You can try to add your own JS callback or use MB Include Exclude extension. This extension works with user roles/IDs, but works for showing/hiding meta boxes, not fields.

    Anh TranAnh Tran
    Keymaster

    Hi Martin,

    I open your page and see an error in the console, saying that the JS file (https://mydsk.co.za/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-user-profile/assets/user-profile.js?ver=1.4.3) is not loaded. Can you check if that file is available? Maybe it's missed when uploading/updating the plugin. Can you please try re-installing the plugin?

    Anh TranAnh Tran
    Keymaster

    Hi, I got the problem. The query args inherits all parameters from get_users() function, which has a parameter include that you can use in case of editing a membership.

    This is a pseudo-code I could imagine:

    $include = [];
    if ( $_GET['post'] ) { // Edit a post
        $post_id = $_GET['post'];
        $user_id = get_post_meta( $post_id, 'user_id', true );
        $include[] = $user_id;
    }
    // Then in the query args, just add 'include'
    ..
    'query_args' => [
        'include' => $include,
        ..
    ],
    in reply to: Map marker event to update Lat/Long #18317
    Anh TranAnh Tran
    Keymaster

    Hi, we use $.data to set the controller for the element. This is a jQuery function and it sets an object (controller), which I guess is not available via Element.dataset. The jQuery docs says:

    Using the data() method to update data does not affect attributes in the DOM. To set a data-* attribute value, use attr.

    in reply to: You are not allowed to edit this post. #18316
    Anh TranAnh Tran
    Keymaster

    Hi,

    We added the check for permission in the latest version of MB Frontend Submission. Users can edit posts only if:

    • They are the author of those posts, or
    • They have proper privileges (edit_posts or edit_other_posts)

    If you allows a user to edit others' posts, they must have edit_other_posts privilege, which is available for Editor role.

    in reply to: Fatal error and cannot access admin or recovery mode #18301
    Anh TranAnh Tran
    Keymaster

    Hi Thomas, can you please enable debug mode and see if there's any error appeared?

    in reply to: Add Comments Metabox to wp-admin Edit Entry Interface #18299
    Anh TranAnh Tran
    Keymaster

    Hi Jacob, can you please give me more details on the comments meta box? Which screen do you want to add it to? If that's a post type screen, you can add post type support for comments.

    in reply to: Select2 ajax delay option #18298
    Anh TranAnh Tran
    Keymaster

    Hi Ryan, I've just fixed it here. Now your code will work.

    in reply to: Post author field supported? #18297
    Anh TranAnh Tran
    Keymaster

    Hi Ryan, we use the default search functionality from WP. See the search param here. So it searches users by email address, URL, ID, username or display_name.

    in reply to: Advanced Settings meta box not showing #18296
    Anh TranAnh Tran
    Keymaster

    Hi, can you check here: https://prnt.sc/r2ky43?

    in reply to: Admin column behaviour #18295
    Anh TranAnh Tran
    Keymaster

    No problem. Just added it.

    in reply to: Map marker event to update Lat/Long #18294
    Anh TranAnh Tran
    Keymaster

    Hi,

    The map controller (JS object, an instance of MapField) is stored in the field data-mapController, and I think you can access to that object to perform custom triggers:

    var $mapField = $( '.rwmb-map-field' ); // Set specific selector to target the map you want.
    
    var controller = $mapField.data( 'mapController' );
    
    // Then you can run
    var map = controller.map;
    google.maps.event.addListener( map, 'click', function ( event ) {
        controller.marker.setPosition( event.latLng );
        controller.updateCoordinate( event.latLng );
    } );
    in reply to: Settings are not saving while throwing this error in console #18293
    Anh TranAnh Tran
    Keymaster

    Hi Akram,

    If possible, can you send me a temporary admin account to check the issue? Does it cause any break in your site?

    in reply to: Settings are not saving while throwing this error in console #18270
    Anh TranAnh Tran
    Keymaster

    Hi Akram,

    Can you please enable debug mode and see if there's any PHP error? And can you please take a screenshot of the console?

    And please tell me how do you setup your settings page.

    in reply to: Post author field supported? #18269
    Anh TranAnh Tran
    Keymaster

    Hi Ryan,

    Yes, that's doable. You need to set the field ID to post_author and hook to not save it to post meta. Please see this tutorial for doing that.

Viewing 15 posts - 301 through 315 (of 3,702 total)