WordPress.org

Ready to get started?Download WordPress

Forums

Frontend Uploader
[resolved] Adding custom attribute to input field (2 posts)

  1. Chintaru
    Member
    Posted 6 months ago #

    Hi,

    I'd like to add a placeholder attribute to certain input fields, and since the form fields are generated through php (why is this?) I can't simply override the form with a template in my theme folder. So I resorted to trying to hack it into the core file frontend-uploader.php (yeah yeah I know, bad practice but it won't be updated anyway since it's for a short-term project) and added it to $atts and included it in the shortcode. It's in the $atts array, has a value, but it just won't show up in the output, unlike the class and id in the same array. Is there any other way (a hook for functions.php perhaps?) to solve this?

    http://wordpress.org/plugins/frontend-uploader/

  2. Chintaru
    Member
    Posted 6 months ago #

    Aaaand just as I posted it I found the solution at the bottom of /lib/php/class-html-helper.php

    If I may make a suggestion for the next update: please add some templating functionality in the next version... So core files don't have to be hacked into for such a simple addition.

Reply

You must log in to post.

About this Plugin

About this Topic