Skip to content

Instantly share code, notes, and snippets.

@todd-uams
todd-uams / custom-status.js
Created April 17, 2020 19:39
Fix for Edit Flow custom status JS
jQuery(document).ready(function() {
var i18n = window.__ef_localize_custom_status;
jQuery('label[for=post_status]').show();
jQuery('#post-status-display').show();
if ( jQuery('select[name="_status"]').length == 0 ) { // not on quick edit
if ( current_user_can_publish_posts || ( current_status == 'publish' && current_user_can_edit_published_posts ) ) {
<?php
fb_list_authors(7, true);
function fb_list_authors($userlevel = 'all', $show_fullname = true) {
global $wpdb;
/*
all = Display all user
0 = subscriber
1 = contributor
@todd-uams
todd-uams / gist:336235d7e4002cee7855b0e4b2846c47
Last active November 6, 2019 17:26
Generate Users List per site for WPMU
function tell_all() {
global $wpdb;
$all_sites = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs} WHERE archived = FALSE" ); // Hide archived sites
$list = array();
foreach( $all_sites as $site ) {
$args = array(
'blog_id' => $site,
'fields' => 'user_email',
'role' => 'Editor',
);