Changeset 3321161
- Timestamp:
- 07/02/2025 11:19:11 AM (9 months ago)
- Location:
- wpjam-basic/trunk
- Files:
-
- 2 edited
-
extends/wpjam-posts-per-page.php (modified) (1 diff)
-
includes/class-wpjam-user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpjam-basic/trunk/extends/wpjam-posts-per-page.php
r3236921 r3321161 8 8 class WPJAM_Posts_Per_Page extends WPJAM_Option_Model{ 9 9 public static function sanitize_callback($value){ 10 wpjam_map(wpjam_pull($value, ['posts_per_page', 'posts_per_rss']), fn($v, $k)=> $v ? update_option($k, $v) : null); 10 foreach(wpjam_pull($value, ['posts_per_page', 'posts_per_rss']) as $k => $v){ 11 $v && update_option($k, $v); 12 } 11 13 12 14 return $value; -
wpjam-basic/trunk/includes/class-wpjam-user.php
r3320942 r3321161 744 744 public static function on_admin_init(){ 745 745 if($objects = self::get_registereds()){ 746 if($binds = array_filter($objects, fn($ o)=> $o->bind)){746 if($binds = array_filter($objects, fn($v)=> $v->bind)){ 747 747 wpjam_add_menu_page([ 748 748 'parent' => 'users', … … 771 771 'title' => '绑定账号', 772 772 'order' => 20, 773 'callback' => fn($user_id)=> implode('<br /><br />', wpjam_array($objects, fn($ object)=> ($openid = $object->get_openid($user_id)) ? $object->title.':<br />'.$openid : null), true)773 'callback' => fn($user_id)=> implode('<br /><br />', wpjam_array($objects, fn($k, $v)=> ($openid = $v->get_openid($user_id)) ? $v->title.':<br />'.$openid : null), true) 774 774 ]) 775 775 ]);
Note: See TracChangeset
for help on using the changeset viewer.