function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin() && !check_user_role('bdr_staff')) { show_admin_bar(false); } }
function ex_password_form() { global $post; if (!check_user_role('administrator')) { $msg = ''; $label = 'pwbox-' . (empty($post->ID) ? rand() : $post->ID); $o = '<form action="' . esc_url(site_url('wp-login.php?action=postpass', 'login_post')) . '" method="post">'; //$o .= __( "Enter the password below:" ); //$o .= '<div class="form-item">'; $o .= '<label for="' . $label . '">Password</label>'; if (isset($_COOKIE['wp-postpass_' . COOKIEHASH])) { $o .= '<input name="post_password" class="error" id="' . $label . '" type="password" size="20" maxlength="20" placeholder="Password"/>'; $o .= '<p class="error">Please re-enter your password</p>'; //$o .= '<p class="error">Ah, ah, ah... You didn\'t say the magic word!</p>'; } else { $o .= '<input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" placeholder="Password"/>'; } $o .= '<input type="submit" name="Submit" class="button" value="' . esc_attr__("Enter") . '" /></form>'; return $o; } else { return $post->post_content; } }
function wpua_subscriber_offlimits() { global $current_user, $pagenow, $wpua_edit_avatar; if ((bool) $wpua_edit_avatar == 1) { $offlimits = array('edit.php', 'edit-comments.php', 'post-new.php', 'tools.php'); } else { $offlimits = array('edit.php', 'edit-comments.php', 'post.php', 'post-new.php', 'tools.php'); } if (check_user_role('subscriber', $current_user->ID)) { if (in_array($pagenow, $offlimits)) { do_action('admin_page_access_denied'); wp_die(__('You do not have sufficient permissions to access this page.')); } } }
} .client-wrap .project-info h5{font-size:28px;} } </style> <div class="content_wrapper clear"> <section role="main" class="main"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <?php if (post_password_required() && !check_user_role('administrator')) { ?> <div class="clear"> <a href="<?php echo home_url(); ?> " class="right ex-logo"> <!-- svg logo - toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script --> <!--<img src="http://assets.primitivespark.com/img/logo.svg" alt="Logo" class="logo-img hideMobile">--> <img src="http://assets.primitivespark.com/img/logo.png" alt="Logo" class="logo-img"> </a> </div> <div class="ex-login"> <h4>CLIENT EXTRANET</h4> <h2><?php the_title();