Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rb192 #197

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Rb192 #197

wants to merge 8 commits into from

Conversation

ryskajakub
Copy link
Contributor

So this is the reworked pull-request.

It contains three issues:
#194
ryskajakub#1
ryskajakub#2

  • I also did some refactoring along the way as I noticed, that the default arguments to the eo_get_venues_map are specified two times.
  • I used tabs instead of spaces everywhere
  • I also ran the grunt uglify task for minification of the frontend.js file, all the other .js files got changed for some reason, too.

@stephenharris
Copy link
Owner

Eeep, sorry, I've only just got round to looking at this. (Pro 1.8.0 is now out the door, so I'm focussing on the next major of Event Organiser).

Could I ask that you make the PR on the develop, I'm currently restructuring on how the repo is organised. The master branch will (eventually) be the "stable" version of the plug-in, with each commit being a release. (Also current develop branch has minified resources removed from version control, there should never have been there in the first place.)

Also, with regards to defining functions, prefix functions with eventorganiser_ (if it's not for public user - e.g. most 'helper' functions) or eo_ if it is for public use. Also functions should not be defined within functions, and general helper-functions should live in event-organiser-utility-functions.php. I'm thinking in particular cast_to_boolean_if_possible.

I'll add some additional comments

Thanks for your help :).

foreach( $bool_options as $option ){
$args[$option] = ( $args[$option] == 'false' ? false : true );
// Cast options as boolean:
$boolean_keys = array_filter(eo_venue_map_defaults(), "is_bool");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how the boolean keys are treated, but I think the defaults should be an array rather than a separate function. That way the default values are obvious within the function.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see, defaults are used in two separate places. I see the reasoning now...

The default values, however are different for the function/shortcode (tooltip as far as I can tell).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants