Home Forums WTI Like Post PRO Adding option/field and saving

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #609
    danny_p15
    Participant

    Hi, I am looking to modify some elements and add new fields/options but can’t find options.php which is the admin form settings. Can you please let me know how to add new fields and how/where does it save in db. Thanks

    #610
    Webtechideas
    Keymaster

    Hi,
    Here are the instructions.

    – You need to register the option in WtiLikePostAdminRegisterSettings function present inside wti-like-post-pro.php file.
    – You need to add the option with default value in SetAllOptionsWtiLikePost function present in above file.
    – You need to add an entry for deleting the option in UnsetAllOptionsWtiLikePost function in above file.

    – All the options load from WtiLikePostAdminContent function present inside wti-like-post-admin.php file. So you will have to add the field for your option there.
    – There is a javascript function confirmReset which is used to reset the fields’ data. You will have to add your default value entry there.
    – All the options get stored in wordpress options table.

    Note:
    – We follow a specific naming convention wti_like_post_ prefix for the options so that it won’t conflict with any other plugins/themes options. So please follow that.

    Do let us know if you need any other input.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘WTI Like Post PRO’ is closed to new topics and replies.