I am trying to insert polls from pgsql database touch. However i successfully Inserted polls with Manual ids like Option1ID:"POSTID+001" Option2ID:"POSTID+002"
Polls Markdown not generating data in the posts_custom_fields on rebake. I am trying to import data in this table directly creating manually.
The data generated by plugin look like this.
{"1234":{"options":[{"id":"effcb6be017a521329814839ecc1028e","html":"here","votes":0},{"id":"e6faee8cf7ebd9a622bf57d59193cb04","html":"there","votes":0},{"id":"24482e8fdd7a0103b0937ee60d7b8c15","html":"nowhere","votes":0}],"voters":0,"status":"open","name":"1234","type":"regular"}}
Here is how manually i achived it
Insert this ijn Posts.Row
<div class="poll" data-poll-status="open" data-poll-name="12345" data-poll-type="regular">
<div>
<div class="poll-container"><ul>
<li data-poll-option-id="1001">here</li>
<li data-poll-option-id="1002">there</li>
<li data-poll-option-id="1003">nowhere</li>
</ul></div>
<div class="poll-info"><p><span class="info-number">0</span><span class="info-text">voters</span></p></div>
</div>
<div class="poll-buttons"><a title="Display the poll results">Show results</a></div>
</div>
Inserted This in posts_custom_fields table with correct post id and content name "polls" .
{"12345 ":{"options":[{"id":"1001","html":"here","votes":0},{"id":"1002","html":"there","votes":0},{"id":"1003","html":"nowhere","votes":0}],"voters":0,"status":"open","name":"1234","type":"regular"}}
Inserted This in posts_custom_fields table with correct post id and content name "polls-votes" .
{"1":{"12345":["1001"]}}
I updated and rebaked 0.3 million posts, Polls are working now, but for more naturality i want to know how these ids are generated in polls plugin.