`process_my_pledges_form()` is actually called on page load in `render_my_pledges()`.
So to prevent the unnecessary get_post() queries, let’s just return early if the form wasn’t really submitted.
See #87
This way when the form is submitted, the page loads at the location
where the success or error message will be shown, skipping the content
above the form.
Fixes#67
df78e3de80 started allowing `user_nicename`s in the form field, but we need to always create the contributor posts with the `user_login`, because there are many other places in the code that expect the `post_title` to be the `user_login` and not the `user_nicename`.
See #57
- Add a single-pledge view so we can separate out the pending from published
- Update layout and styles of my pledges list
- Adds link and danger button styles
Uses action hooks to capture relevant events as log entries on a per-pledge basis. This provides a running history of a pledge and can be used as an audit log if questions arise about changes to a pledge or there are weird bugs.
Fixes#39
* Theme: Create template part for single pledge
* Plugin: Add functions for handling xprofile data
* Plugin: Add helper function for getting contributor user objects
* Theme: Display aggregated contributor data on single pledge view
* Theme: Add functions, markup, and styles to show team badges
* Theme: Add badge for Test team
* Theme: Add tentative URL for report a pledge link
* Theme: Add support for post thumbnails
* Theme: Add org logo to single pledge view
* Theme: Update `$content_width` to 960
This matches the width of the content in the global header and
the About page.
* Move pledge template to a file used by the template heirarchy
* Clean up some PHPCS errors
* Move pledge structure out to just the list items
* Create file for single pledge styles
* style badge grid into a grid.
* Add a custom image size for the logo
* Update styles
* Un-hide pledges with no confirmed contributors
* Fix content width
* Allow image uploads
* Add the logo as "generated" meta
This will be attached after we've processed the `$_FILES` object into an upload.
* Load image into media library, attach to the submitted pledge as a featured image.
* Move where image handling happens so we can pass back errors
* Pass back error if upload fails
* Create a validation function to do basic checking of form data
* Move logo uploading to a separate function, and rely on core checks for mime & filesize checking
* Tweak function name to be more clear
* Remove bmp, tiff, and ico file types