WP Users list
- refactored and fixed listing issues (related to Segments) - removed bulk actions from segments - added synchronize methods for WP users - Update action in segments only for WP Users list - added "type" column to segments (default, wp_users, dynamic...) - added "status" column to subscriber_segment table (useful soon)
This commit is contained in:
@ -77,7 +77,20 @@ class Segment extends Model {
|
||||
}
|
||||
|
||||
static function getWPUsers() {
|
||||
return self::findOne(1);
|
||||
$segment = self::where('type', 'wp_users')->findOne();
|
||||
|
||||
if($segment === false) {
|
||||
// create the wp users list
|
||||
$segment = self::create();
|
||||
$segment->hydrate(array(
|
||||
'name' => __('WordPress Users'),
|
||||
'type' => 'wp_users'
|
||||
));
|
||||
$segment->save();
|
||||
return self::findOne($segment->id());
|
||||
}
|
||||
|
||||
return $segment;
|
||||
}
|
||||
|
||||
static function search($orm, $search = '') {
|
||||
|
Reference in New Issue
Block a user