Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Adding a second element for posting with an activity.


gabrielcrowe
Member

@gabrielcrowe

in summary:

when you post items from a modified post-form.php you’re sending them through some ajax, and functions inside global.js.

what i had to do was edit the values that were passed into the ajax inside global js.

i have 3 fields, artist, track and cover.

j.post( ajaxurl, {

action: ‘post_update’,

‘cookie’: encodeURIComponent(document.cookie),

‘_wpnonce_post_update’: j(“input#_wpnonce_post_update”).val(),

‘content’: content,

‘artist’: artist, <<<

‘track’: track, <<<

‘cover’: cover, <<<

‘object’: object,

‘item_id’: item_id

},

(arrows added for effect)

after that, a function in bp-custom.php can pick them up and use them as metas for the post.

Skip to toolbar