Creating Post via code
-
I am writing a widgit that inserts a post into a protected area (only one special user can edit)
However, I am rather new to php.
Right now, my assumption is that as I build $post I will need to do something like:
‘post_edit_cap’ => ??????
but I have no idea what ?????? should be.
I tried
‘post_edit_cap’ => get_user_label (“userlabel_1_uncleprotected”)
but that did not work. Upon further examination I am not surprised it did not work. As I mentioned, I am very new to php. Based on limited knowledge it seems to me that post_edit_cap is more than a mere integer.
Can you help me on this? Not only would you be helping me with your own plugin, you would also be giving great insight into php for a noob.
- The topic ‘Creating Post via code’ is closed to new replies.