最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - User meta query using Wildcard

programmeradmin2浏览0评论

I have created a custom plugin which writes new user meta data.

Each user has an array PER post so the meta_keys look like:

custompostid eg: custom3456, custom4565, custom 3576 etc

Each key holds an array:

custom3456( custom1=>postid custom2=>We are open custom3=>5 custom4=>250 )

I am now trying to create a dashboard to output this info in one place.

EDIT: Logic Walkthrough

  1. Get all user meta data:
    $user = get_current_user_id();
    $data = get_user_meta($user);
  1. For each key in $data starting with "custom" - print values

I need help with number 2.

For clarity, for the current logged in user I am looking to output all of the meta values (in turn) for each meta key named "custom%".

Could I have some guideance please.

发布评论

评论列表(0)

  1. 暂无评论