WPIntell

Source evidence

Nicely coded

Files Addon for Event Espresso 4 · review · 2016-11-29T18:58:00+00:00

praisesentiment
mediumseverity
0.38relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 27 rows with source links

25.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

20 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

review · 5 stars
Michael Nelson unresolved
I’m one of the Event Espresso core developers who primarily worked on the forms system. I’ve scanned over the code and it looks very similar to our ideal for what an addon would look like. Thanks! Is there a Github repo for this? That would be nice for collaboration IMO. FYI we’ve recently added a better way for enqueuing scripts and CSS with form inputs. You should basically put the contents of EE_SSA_FILE::ssa_enqueue_scripts() inside a new method EE_File_Display_Strategy::enqueue_js() (which overrides the parent’s enqueue_js() method). That way you’ll only enqueue js and css when the input will actually be displayed. Right now, you’ll be enqueueing the JS and CSS as soon as the input is created, regardless of whether it’s actually displayed during this request or not. This change may make it work not work with older versions of EE4, before the enqueue_js method on fields was called consistently. For that you might want to follow the model of our mock addon a little more closely, ie actually use EE_Register_Addon::register() to register your addon, register a module (eg name it something like EED_SSA_File_Input which sets up all the actions and filters your addon needs), and also set a minimum EE core version. This way, if someone tries to run your add-on with an older version of EE, they’ll get a notice saying it’s too old and then the actions/filters won’t be executed. But for the most part, this seems to work great. ​Hi Mike, Thank you for suggestions and review. We will try to integrate the suggested changes in next plugin update.

Comments

1 shown
wordgeniee 2016-12-01T11:06:00+00:00

​Hi Mike, Thank you for suggestions and review. We will try to integrate the suggested changes in next plugin update.