Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Yoheri

    (@yoheri)

    Hi everyody,

    i answer myself becouse i found the solution !!!.

    The plugin have a filter “json_insert_post” that fire “attach_thumbnail”, but that function only associate the “featured_image” field if the post ID exist in the data base, so you can not use it when insert the post for first time.

    To do, you have to add you own filter “json_insert_post” and execute in the called function the system function set_post_thumbnail, with $post[ID] and $data[featured_image]. Becouse this filter is called after the JSON_plugin … the post exist and the are not problem.

    Meybe this can help to someone.

    Regards,
    Heriberto.

    Hi aryanduntley,

    thanks for your fast reply !!! ??

    Ok, i’m going to use it in my own pluging. I think it’s more clean.

    Regards,
    Heriberto

    Hi aryanduntley,

    i’m newbie in wordpress code, but have experience with PHP.

    May i use this add_action (and function) in my own plugin, or i have to put it inside some file of the Json Rest Plugin?

    Regards,
    Heriberto

Viewing 3 replies - 1 through 3 (of 3 total)