Adjust Invite Directions to include info about max invites
We recently changed the maximum number of invites to 20 (it used to be 7). However, there is no notation on the page that informs users of this maximum.
I suggest the following edits:
Enter email addresses below, one per line. You can only invite people whose email addresses end in one of the following domains: *.cuny.edu cuny.tv
Enter email addresses below, one per line. You can only invite people whose email addresses end in one of the following domains: *.cuny.edu cuny.tv. You can invite a maximum of 20 people each time you send invites.
#2 Updated by Dominic Giglio almost 9 years ago
You were correct in your assumption. The template was located at
/groups/single/invite-anyone.php in bp-nelo. However, that template creates a link to the page that displays the text in question. Took me a little bit to find it, but that text is ultimately output by a function in the plugin itself, located at
Therefore the fix to this issue needs to be integrated into the plugin. I see on the plugin repo that you are the maintainer. Is there a git repo where you'd like to make these changes? They aren't very involved. I've created a topic branch and pushed it to our repo so you can see the edits I've made. You could even copy/paste and push an update pretty quickly, it's only a few lines.
Let me know how you'd like to proceed on this one.
#3 Updated by Boone Gorges almost 9 years ago
- Assignee changed from Dominic Giglio to Boone Gorges
The way you've concatenated sentences in your commit will not work correctly in different languages. You'll need to use the
sprintf() function, which does argument replacement. Something like this:
<?php echo sprintf( 'You can invite a maximum of %s people each time you send invites', 'bp-invite-anyone' ), invite_anyone_max_invites() ); ?>
That way, the translator can use whatever grammar they want.
The repo I use for this plugin is https://github.com/boonebgorges/invite-anyone. This is a small fix, so I'll go ahead and make the changes directly. Reassigning to myself.
#4 Updated by Dominic Giglio almost 9 years ago
Sorry, just saw this update because you reassigned to yourself.
I thought about sprintf() but I wasn't sure if it cooperated with the WP i18n functions so I left it out.
Are you sure you wrote the example above correctly?
invite_anyone_max_invites() is not included inside the call to sprintf(). How does WP know it can swap out translations inside sptinf()?
Shouldn't it look more like this:
<?php echo sprintf( __( 'You can invite a maximum of %s people each time you send invites', 'bp-invite-anyone' ), invite_anyone_max_invites() ); ?>
#8 Updated by Boone Gorges almost 9 years ago
- Status changed from Assigned to Resolved
Updated in Invite Anyone at https://github.com/boonebgorges/invite-anyone/commit/dfc196489272efac92190d347ae9416a55573574
Update in CAC repo at https://github.com/castiron/cac/commit/fb1323ec4bb790f4cfd176d878f27732297ecdaf