Modify user profile data through scripting?

You should allow for a custom field in your unity profile which will be linked to the WordPress profile. You could then run a JavaScript function to call an AJAX script to execute a PHP file inside WordPress to update a specific profile. Here’s some pseudo-code: JavaScript function updateProfile(parameters) { var xhttp = new XMLHttpRequest(); … Read more

Custom default filtering in the user admin panel disables the other sortable columns

First, use $query->query_vars and not $query->query. Secondly, you should run this conditional check before overriding the corresponding query var: empty( $_REQUEST[‘{VAR}’] ) || !isset($query->query_vars[‘{VAR}’]) where {VAR} corresponds to the query var’s name/key such as orderby. So try this, which worked for me: // Set default `orderby` to ‘registered’. if( empty( $_REQUEST[‘orderby’] ) || !isset($query->query_vars[‘orderby’]) ) … Read more

Adding custom class to get_avatar() image doesn&https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/#39;t work

The following worked for me: <?php echo get_avatar( $comment, 60, ”, ”, $args = array( ‘scheme’ => ‘https’, ‘class’ => ‘myclass’ ) ); ?> Your use of $args[‘avatar_size’] should be an int and you may have confused the use of this parameter (unless you have a variable $args, and it is an array).