Title: thomaswp's Replies | WordPress.org

---

# thomaswp

  [  ](https://wordpress.org/support/users/thomaswp/)

 *   [Profile](https://wordpress.org/support/users/thomaswp/)
 *   [Topics Started](https://wordpress.org/support/users/thomaswp/topics/)
 *   [Replies Created](https://wordpress.org/support/users/thomaswp/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/thomaswp/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/thomaswp/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/thomaswp/engagements/)
 *   [Favorites](https://wordpress.org/support/users/thomaswp/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Lightbox with PhotoSwipe] Sage 9 starter theme incompatibility](https://wordpress.org/support/topic/sage-9-starter-theme-incompatibility/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/sage-9-starter-theme-incompatibility/#post-12500008)
 * I’m nearly sure I had it working on a sage theme with the beta in this issue/
   thread: [https://wordpress.org/support/topic/new-version-of-the-plugin-not-working-properly/](https://wordpress.org/support/topic/new-version-of-the-plugin-not-working-properly/)
   But for now I can’t get it to work anymore, maybe it was with an older wp version(
   just one or 2 minor versions older).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Lightbox with PhotoSwipe] Sage 9 starter theme incompatibility](https://wordpress.org/support/topic/sage-9-starter-theme-incompatibility/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/sage-9-starter-theme-incompatibility/#post-12499966)
 * I have the same problem, also been trying to fix with ob_end_flush, no success
   till now. Hope to fix it, so we can start using this (excellent) plugin. We use
   sage 9 for many websites.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Lightbox with PhotoSwipe] New version of the plugin not working properly](https://wordpress.org/support/topic/new-version-of-the-plugin-not-working-properly/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/new-version-of-the-plugin-not-working-properly/#post-12356364)
 * I had some trouble after the update to 2.5, gally images not loadign, only in
   chrome. Confirm the beta solved this.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Woo Donations] Not working after cart update](https://wordpress.org/support/topic/not-working-after-cart-update/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/not-working-after-cart-update/#post-11353241)
 * Same here. The onclick is not ajax proof, change the code in woo-donations.php
 * from:
 * `jQuery('.wdgk_add_donation').click(function(){`
 * to:
    `jQuery(document).on('click','.wdgk_add_donation',function(){`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC Fields Factory] make wccpf_unique_key conditional](https://wordpress.org/support/topic/make-wccpf_unique_key-conditional/)
 *  Thread Starter [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/make-wccpf_unique_key-conditional/#post-7142894)
 * Thnx!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Products Per Page for WooCommerce] PPP not working with storefront theme](https://wordpress.org/support/topic/ppp-not-working-with-storefront-theme/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/ppp-not-working-with-storefront-theme/#post-6994592)
 * Same problem here, also latest versions of WP, Woocommerce and Storefront theme,
   the code snippet works, which also pointed me to the fix.
 * Get rid of the conflicting Storefront loop_shop_per_page filter by adding this
   code to your functions.php
 * `remove_filter( 'loop_shop_per_page', 'storefront_products_per_page' );`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Enhanced Media Library] Auto category selection](https://wordpress.org/support/topic/auto-category-selection/)
 *  Thread Starter [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/auto-category-selection/#post-6678311)
 * hi [@webbistro](https://wordpress.org/support/users/webbistro/)
    Custom coding
   is no problem, if you can point me in the right direction (which hooks to use
   etc.).
 * I’ts not urgent, but I’m just suprised that this functionality doesn’t exists
   yet.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gravity Forms: Post Updates] How to update w/o new entry?](https://wordpress.org/support/topic/how-to-update-wo-new-entry/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/how-to-update-wo-new-entry/page/2/#post-4970883)
 * Ok, sorry, forgot the crucial part
 *     ```
       add_action( 'gform_after_submission_3', 'mysite_gform_after_submission_3', 10, 2 );
   
       function mysite_gform_after_submission_3 ( $entry, $form ) {
           delete_old_etries_by_post_id( $entry['post_id'], $entry['id']);
       } 
   
       function get_old_etries_by_post_id( $post_id, $entry_exclude, $form = 3 ) {
           $search_criteria = array();
           $search_criteria['field_filters'][] = array("key" => "post_id", value => $post_id);
           $search_criteria['field_filters'][] = array("key" => "id", "operator" => 'isnot', value => $entry_exclude);
           $entries = GFAPI::get_entries( $form,  $search_criteria);
           return $entries;
       }
       function delete_old_etries_by_post_id( $post_id, $entry_exclude_id, $form = 3 ) {
          $entries = get_old_etries_by_post_id( $post_id, $entry_exclude_id, $form);
          foreach ($entries as &$entry) {
           GFAPI::delete_entry( $entry['id'] );
          }
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tabify Edit Screen] Main editor layout issue](https://wordpress.org/support/topic/main-editor-layout-issue/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/main-editor-layout-issue/#post-5994458)
 * same (minor) issue here, besides that: nice plugin!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gravity Forms: Post Updates] How to update w/o new entry?](https://wordpress.org/support/topic/how-to-update-wo-new-entry/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/how-to-update-wo-new-entry/page/2/#post-4970882)
 * I remove all other entries attached to the current form an post-id, except the
   newest entry.
 *     ```
       add_action( 'gform_after_submission_3', 'mysite_gform_after_submission_3', 10, 2 );
   
       function mysite_gform_after_submission_3 ( $entry, $form ) {
           delete_old_etries_by_post_id( $entry['post_id'], $entry['id']);
       } 
   
       function get_old_etries_by_post_id( $post_id, $entry_exclude, $form = 3 ) {
           $search_criteria = array();
           $search_criteria['field_filters'][] = array("key" => 'post_id', value => $post_id);
           $entries = GFAPI::get_entries( 3,  $search_criteria);
           return $entries;
       }
       function delete_old_etries_by_post_id( $post_id, $entry_exclude_id, $form = 3 ) {
          $entries = get_old_etries_by_post_id( $post_id, $entry_exclude_id, $form);
          foreach ($entries as &$entry) {
           GFAPI::delete_entry( $entry['id'] );
          }
       }
       ```
   
 * Replace the 3 with the id of yout form.
    In my use case, this is better than 
   deleting all entries. Althought updating the first/original entry would be better,
   anybody managed to fix this? Feel free to share your code.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Force Login] wp-cli not working](https://wordpress.org/support/topic/wp-cli-not-working/)
 *  [thomaswp](https://wordpress.org/support/users/thomaswp/)
 * (@thomaswp)
 * [11 years ago](https://wordpress.org/support/topic/wp-cli-not-working/#post-5868115)
 * Nice plugin, althought same issue with wp-cli here, hade to make a minor change
   to your gist. Would be great to incorporate this in a new version of the plugin.
 *     ```
       function v_is_cli() {
         if(php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR']) || $_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
           return true;
         } else {
           return false;
         }
       }
       ```
   

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