BdN3504
Forum Replies Created
-
Forum: Plugins
In reply to: How to create a random Number for menu_order in MySQLOn the mysql irc channel this code was suggested:
SET @rank := 0; UPDATE posts SET menu_order = @rank := @rank + 1 where gmr_posts.post_type = 'my_cpt' ORDER BY RAND();
This works well enough, although i don’t really understand the code and i don’t know how to specify the range.Forum: Plugins
In reply to: [Donations via PayPal] Paypal button too smallHello, I would also really like to use a custom button, but the current version 1.8.5 does not seem to like my choice. I cannot select the option due to an erroneous use of single and double quotation marks. I have uploaded a diff to pastebin, apply it to 1.8.5/src/PayPalDonations/Admin.php: Admin.diff.
I think the best solution to the problem of being able to create custom paypal buttons would be to give the user full control over the element by creating a filter hook in 1.8.5/views/paypal-button.php. That’s what this diff does: paypal-button.diff
Users can then simply include a filter function in their functions file and have whatever button they want:
add_filter( 'paypal_donations_custom_button', 'custom_paypal_button', 10, 2 ); function custom_paypal_button( $indent, $button_url ){ $paypal_btn = $indent.'<input type="text" name="submit" value="Donate via PayPal" />'.PHP_EOL; return $paypal_btn; }
On a side note: I asked paypal support if it was okay to change the default look of the button and was told that it is okay, as long as it is clear that the button is a paypal button.
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Feature Request: Configure Slide on page startHi Phil,
thanks for the prompt response, thanks for making clear why you used the extra javascript and thanks for including the feature request. Keep up the good work.
One thing I forgot to mention is that the contextual help screen for your plugin is being shown on every backend page. I also fixed that in the diff.Forum: Plugins
In reply to: [Add From Server] A note about securityThanks for clearing that up.