wordpress免登录Api文章发布接口
可以直接在wordpress的根目录下创建一个php,进行api开发;
```php case 'editpost': ... // Session cookie flag that the post was saved if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) { setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, is_ssl() ); } //增加部分 $editpost_id = $redis->get('editpost'); $editpost_id = json_decode($editpost_id); $editpost_id[] = $post_id; $redis->set('editpost',json_encode($editpost_id)); redirect_post($post_id); // Send user on their way while we keep working //增加部分 exit(); ```
交流探索Q 361570832