Plugin Directory

Changeset 3321161


Ignore:
Timestamp:
07/02/2025 11:19:11 AM (9 months ago)
Author:
denishua
Message:

version 6.8.1.1

Location:
wpjam-basic/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpjam-basic/trunk/extends/wpjam-posts-per-page.php

    r3236921 r3321161  
    88class WPJAM_Posts_Per_Page extends WPJAM_Option_Model{
    99    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        }
    1113
    1214        return $value;
  • wpjam-basic/trunk/includes/class-wpjam-user.php

    r3320942 r3321161  
    744744    public static function on_admin_init(){
    745745        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)){
    747747                wpjam_add_menu_page([
    748748                    'parent'        => 'users',
     
    771771                    'title'     => '绑定账号',
    772772                    '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)
    774774                ])
    775775            ]);
Note: See TracChangeset for help on using the changeset viewer.