Forum Replies Created

Viewing 8 Topics - 1 through 8 (of 8 total)
Author Posts
February 6, 2015 at 1:04 am in reply to: Publish any post from dashboard of admin user role 35911
Rebecca Rebecca

Forgot the last bit – sorry!
function wpufe_dashboard_show_all_to_admin( $args ) {
if ( current_user_can( ‘update_themes’ ) ) {
unset( $args[‘subscriber’] );
}

return $args;
}
add_filter( ‘wpuf_dashboard_query’, ‘wpufe_regular_admin_dashboard’ );

I’ve tried, in the unset line author and subscriber

February 6, 2015 at 1:03 am in reply to: Publish any post from dashboard of admin user role 35910
Rebecca Rebecca

Hello! It’s been 8 months and I’m trying to do this again on a new site. Unfortunately my prior functions.php alterations are throwing errors on the new site. Here’s what I put in:

// Functions relating to WP User Frontend Pro

function dlp_wpuf_editor_post_status( $postarr ) {

$user = wp_get_current_user();
$role = reset( $user->roles );

if ( $role = ‘subscriber’ ) {
$postarr[‘post_status’] = ‘publish’;
}

return $postarr;
}

add_filter( ‘wpuf_add_post_args’, ‘dlp_wpuf_editor_post_status’ );
add_filter( ‘wpuf_update_post_args’, ‘dlp_wpuf_editor_post_status’ );

Any idea why?

February 6, 2015 at 12:47 am in reply to: Error showing in on subscription.php 35909
Rebecca Rebecca This reply has been marked as private.
February 6, 2015 at 12:29 am in reply to: Error showing in on subscription.php 35908
Rebecca Rebecca

Well this problem is resolved without any changes on my end? I do have one more issue, I’m unable to assign a subscription pack to a user.

Here is a screenshot: No pack to assign

February 4, 2015 at 9:22 pm in reply to: Publish any post from dashboard of admin user role 35775
Rebecca Rebecca This reply has been marked as private.
June 12, 2014 at 9:00 pm in reply to: Automated Email sent on Post Approval by Admin 21862
Rebecca Rebecca

That was such a simple fix – thanks for the lead! I ended up using “wordpress publish post email notification” since it’s a bit more customizable on the message you send and is compatible with newer versions of WordPress.

May 4, 2014 at 9:09 pm in reply to: Publish any post from dashboard of admin user role 19873
Rebecca Rebecca

As suggested in this ticket: http://wedevs.com/support/topic/post-status-for-roles/, I used this snippet with the modification of “author” now “administrator”.

function dlp_wpuf_editor_post_status( $postarr ) {
     
    $user = wp_get_current_user();
    $role = reset( $user->roles );
 
    if ( $role == 'administrator' ) {
        $postarr['post_status'] = 'publish';
    }
  
    return $postarr;
}
  
add_filter( 'wpuf_add_post_args', 'dlp_wpuf_editor_post_status' );
add_filter( 'wpuf_update_post_args', 'dlp_wpuf_editor_post_status' );

added in this to make all posts visible to admin as suggested in the help forums:

function wpufe_dashboard_show_all_to_admin( $args ) {
    if ( current_user_can( 'manage_options' ) ) {
        unset( $args['author'] );
    }
 
    return $args;
}

And now I’m going to start researching how to make a drop-down for admin to set the status next to the “Update” button. Any suggestions or prior tickets with solutions welcomed. Thanks!

May 4, 2014 at 6:18 am in reply to: Publish any post from dashboard of admin user role 19847
Rebecca Rebecca

Isn’t this the way things work? I just fixed it myself. Thanks.

Viewing 8 Topics - 1 through 8 (of 8 total)