Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter BdN3504

    (@bdn3504)

    On 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.

    Hello, 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.

    Thread Starter BdN3504

    (@bdn3504)

    Hi 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.

    Thread Starter BdN3504

    (@bdn3504)

    Thanks for clearing that up.

Viewing 4 replies - 1 through 4 (of 4 total)