Title: hughc's Replies | WordPress.org

---

# hughc

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 34 total)

1 [2](https://wordpress.org/support/users/hughc/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/hughc/replies/page/3/?output_format=md) 
[→](https://wordpress.org/support/users/hughc/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Getwid - Gutenberg Blocks] Post Carousel – Custom Field Filter – Today’s date](https://wordpress.org/support/topic/post-carousel-custom-field-filter-todays-date/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/post-carousel-custom-field-filter-todays-date/#post-18889354)
 * This is how I fixed it, but I’d be curious if there is a better way to do it,
   this feels like a kludge.
 *     ```wp-block-code
       /** fixes date queries in getwid carousel *  - ignore post dates *  - relies on the dummy TODAYS_DATE_XXXX query key being preconfigured *  - adds a meta query to filter posts by a nominated meta field * */function modify_getwid_query($query){    $config = [        [            'existing_key' => 'TODAYS_DATE_EVENTS',            'target_key' => 'end_date'        ],        [            'existing_key' => 'TODAYS_DATE_OPPORTUNITIES',            'target_key' => 'closing_date'        ]    ];    $meta = $query->get('meta_query');    if (!$meta || count($meta) == 0) return $query;    foreach ($meta as $meta_q) {        if (isset($meta_q[0]) && isset($meta_q[0]['key'])) {            foreach ($config as $item) {                if ($meta_q[0]['key'] === $item['existing_key']) {                    $query->set("meta_query", [                        [                            'value'   => date('Ymd'),                            'compare' => '>=',                            'type'    => 'DATE',                            'key'     => $item['target_key'],                        ]                    ]);                    // Found a match and updated the query, no need to check other configs or meta queries.                    return;                }            }        }    }}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gutenberg Block Editor Toolkit – EditorsKit] Filter for custom classes](https://wordpress.org/support/topic/filter-for-custom-classes/)
 *  [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/filter-for-custom-classes/#post-12059404)
 * [@phpbits](https://wordpress.org/support/users/phpbits/) my bad, a trailing space
   in the filter name was all it was. Thanks for trying to help me out.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gutenberg Block Editor Toolkit – EditorsKit] Filter for custom classes](https://wordpress.org/support/topic/filter-for-custom-classes/)
 *  [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/filter-for-custom-classes/#post-12041624)
 * Not getting any love on this either – I’m adding the filter in the functions.
   php of my theme, but it’s never called.
 * I was wondering if the function was being registered too late, so I tried to 
   examine the plugin source itself, to establish when the apply_filter() was being
   called, but I couldn’t see where the parent filter (added in the constructor 
   for `EditorsKit_Custom_CSS_Classes` was being called either, ie:
 * `add_filter( 'block_editor_settings', array( $this, 'block_editor_settings' ),
   10, 2 );`
 * I’ve read the blog post, and tried your example too, as well as my own code.
 * [https://jeffreycarandang.com/introducing-editorskit-block-styling-utility-classes/](https://jeffreycarandang.com/introducing-editorskit-block-styling-utility-classes/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Download Monitor] Gutenberg – fatal error if block is left ’empty’](https://wordpress.org/support/topic/gutenberg-fatal-error-if-block-is-left-empty/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/gutenberg-fatal-error-if-block-is-left-empty/#post-11802970)
 * I can see this has already been logged as an issue:
 * [https://github.com/download-monitor/download-monitor/issues/601](https://github.com/download-monitor/download-monitor/issues/601)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Adding a section to the WooCommerce settings ‘Shipping’ tab](https://wordpress.org/support/topic/adding-a-section-to-the-woocommerce-settings-shipping-tab/)
 *  [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-a-section-to-the-woocommerce-settings-shipping-tab/#post-10829532)
 * The linked article states:
 * > When creating an extension for WooCommerce, think about where your settings
   > belong before you create them. The key to building a useful product is making
   > it easy to use for the end user, so appropriate setting placement is crucially
   > important.
 * It’s not clear why this restriction exists?
 * I’m writing a plugin that assists in backend shipping fulfilment – its options
   should be a section under the Shipping tab. Instead, my options are to place 
   it as a heading under ‘shipping options’ (where it will be buried), or create
   a fresh tab (overkill).
 * Can we please get the linked docs page updated? This statement:
 * > The important thing about the woocommerce_get_sections_products filter, is 
   > that the last part products, is the tab you’d like to add a section to. So 
   > if you want to add a new tab to accounts section, you would hook into the woocommerce_get_sections_accounts
   > filter.
 * needs a disclaimer to indicate that `woocommerce_get_sections_shipping` is not
   a hook that the user should use, as the corresponding `woocommerce_get_setting_shipping`
   does not get called anywhere except on the shipping options section. Reading 
   the source of `class-wc-settings-shipping.php` I think I can see why (sections
   under Shipping are reserved for options registered by different shipping methods?).
   But the docs should say so.
    -  This reply was modified 7 years, 11 months ago by [hughc](https://wordpress.org/support/users/hughc/).
      Reason: cleaned up language
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Query Monitor] failure to load 3rd party jquery plugin](https://wordpress.org/support/topic/failure-to-load-3rd-party-jquery-plugin/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/failure-to-load-3rd-party-jquery-plugin/#post-10264623)
 * As an update, I’ve had further grief with the other (font resizer) plugin, turned
   out the previous dev was conditionally unhooking jquery and hooking a CDN version
   of it. I had to disable this code in order to get the other plugin running OK.
   Unsure if that helps at all in your efforts to work out what’s going on.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] Where is Manual Scan button](https://wordpress.org/support/topic/where-is-manual-scan-button/)
 *  [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/where-is-manual-scan-button/#post-10234125)
 * I’m using 7.1.3 and it’s even harder to find what should be a really simple option.
 * The dashboard link for ‘manage scan’ does *not* link to the manage_scans subpage.
   Instead, it goes to:
 * `/wp-admin/admin.php?page=WordfenceScan&subpage=scan_options&source=dashboard`
 * I went round in circles for a similar amount of time as the OP. All I wanted 
   was to manually initiate a scan, something I often do after installing the plugin.
 * It was only when I madea guess, and manually entered the URL
 * `/wp-admin/admin.php?page=WordfenceScan&subpage=manage_scan&source=dashboard`
 * that I was able to see the manual scan options. There doesn’t seem to be a link
   to this anywhere in the plugin.
 * I’ve been long time user of the plugin, and this sort of UX is baffling. In <
   v7, sure things didn’t look pretty, but they were at least able to be found. 
   Surely it’s a bug?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Woocommerce Extra Registration Fields] This plugin stores passwords in plain text](https://wordpress.org/support/topic/this-plugin-stores-passwords-in-plain-text/)
 *  [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/this-plugin-stores-passwords-in-plain-text/#post-9200534)
 * Thanks for the snippet – I had discovered this independently, and it was leading
   to a number of emails being sent announcing password resets, because a password
   was coming out of the database every time a customer object was hydrated on checkout.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[The Events Calendar] Illegal string offsets ‘_EventCost’ in event metadata](https://wordpress.org/support/topic/illegal-string-offsets-_eventcost-in-event-metadata/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/illegal-string-offsets-_eventcost-in-event-metadata/#post-9110924)
 * A very similar issue has just cropped up with another client. In this case, it’s
   a method from the premium plugin causing a fatal error – an examination of the
   database shows exactly the same issue – until recently it was correctly storing
   values as serialised arrays, now it’s storing strings…?
 *     ```
       [09-May-2017 01:56:12 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Tribe__Events__Pro__Recurrence__Series_Rules_Factory::build_from() must be of the type array, string given, called in /home/xxxxx/public_html/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 1056 and defined in /home/xxxxx/public_html/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Series_Rules_Factory.php:32
       ```
   
 * I’ll be raising a Pro support ticket for this one, but these sort of low-level,
   fundamental errors, with what looks like corrupted data in the database, are 
   shaking my confidence in the Event Calendar and its Pro variation.
 * This is on a different host, and different version of PHP and MySQL
 * WP 4.7.4
    EV 4.5.1 EV-Pro 4.4.7 PHP 7.0.18 MySQL 5.6.35
 * Here is what the data looks like in the database:
 * [https://www.dropbox.com/s/aifbxjdswexe3og/sshot-914.png?dl=0](https://www.dropbox.com/s/aifbxjdswexe3og/sshot-914.png?dl=0)
 * Even if a patch fixes the issue, moving forward, what can I do with data that’s
   already stored incorrectly in the database?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder] Post Popups not working anymore ?](https://wordpress.org/support/topic/post-popups-not-working-anymore/)
 *  [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/post-popups-not-working-anymore/#post-8963486)
 * Hi,
    I’m new to the plugin, and I’m not a novice dev, and I’ve struck exactly
   the same issue, same error message.
 * I’m trying to generate both a popup and trigger button on the fly. The popup 
   is not pre-defined in the popup list (and I couldn’t see anywhere in the docs
   that this was stated).
 * Trigger shortcode:
    `[popup_trigger tag='button' id='new-enquiry']<li><span class
   ="title">9ct</span> - <span class="price">$1,490</span></li>[/popup_trigger]`
 * Popup shortcode:
    `[popup id="new-enquiry" theme_id="3098"][gravityform title
   ='false' description='false' ajax='true' id='1'][/popup]`
 * rendering these gives me the buttons, as expected, and I can see the popup, with
   the gravity form inside it, hidden in the DOM.
 * With no other popups present on the page (apart from the one defined by the shortcode),
   clicking a trigger button does nothing – assume this is because the relevant 
   JS is not loaded?
 * If a pre-defined popup is in the DOM, with its ID targeted by the trigger buttons,
   it works. If it has the same ID as the shortcode generated one, then it shows(
   not the shortcode one).
 * But if the button targets the shortcode generated popup only, clicking the button
   gives the same JS error.
 * In `site.js` on line 1182:
 * `if (settings.mobile_disabled !== undefined && settings.mobile_disabled) {`
 * settings is undefined which means $popup.popmake(‘getSettings’) is returning 
   nothing.
    I’m stumped. Unsure if I’m outside the bounds of the plugin content.
 * As an aside, I tried turning on debug, but I get a different console error as
   the page loads:
 * \`
    case “click_open”: pum_debug.click_trigger(t, o.settings), console.log(i.
   label_cookie, o.settings.cookie.name) }`
 *  cannot read property ‘name’ of undefined
    -  This reply was modified 9 years, 6 months ago by [hughc](https://wordpress.org/support/users/hughc/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Random Content] nested shortcodes?](https://wordpress.org/support/topic/nested-shortcodes-9/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/nested-shortcodes-9/#post-8549626)
 * This question was based on a misunderstanding of how the plugin works – I thought
   it used multiple enclosing [random_content][/random_content] tags to define the
   content groups online on the page – understand now that it’s a CPT of its own
   with full editor (and shortcode) support. Worked a treat for my use case. Feel
   free to mark resolved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Menus - Nav Menu Visibility] breaks Avada](https://wordpress.org/support/topic/breaks-avada/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/breaks-avada/#post-8361414)
 * Sorry, you’re right – someone else has already installed [another plugin](https://wordpress.org/plugins/nav-menu-roles/)
   doing a similar thing .
 * Please mark resolved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Menus - Nav Menu Visibility] breaks Avada](https://wordpress.org/support/topic/breaks-avada/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/breaks-avada/#post-8355387)
 * Menu before plugin activation:
    [https://www.dropbox.com/s/gcd5plkkewnd6wv/sshot-648.png?dl=0](https://www.dropbox.com/s/gcd5plkkewnd6wv/sshot-648.png?dl=0)
 * Menu after plugin activation:
    [https://www.dropbox.com/s/uuveg7mjtvfe946/sshot-649.png?dl=0](https://www.dropbox.com/s/uuveg7mjtvfe946/sshot-649.png?dl=0)
 * Menu options for first item, with plugin enabled:
    [https://www.dropbox.com/s/j3ch2dplrs6g5zn/sshot-650.png?dl=0](https://www.dropbox.com/s/j3ch2dplrs6g5zn/sshot-650.png?dl=0)
 * As mentioned, I haven’t actually started working with the plugin’s options at
   this point, so my expectation was that the defaults would leave existing menu
   items untouched, but for some reason with my version of Avada, that’s not the
   case.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Unsplash WP] XAMPP issues (Windows)](https://wordpress.org/support/topic/xampp-issues-windows/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [10 years ago](https://wordpress.org/support/topic/xampp-issues-windows/#post-8208437)
 * I have to stress that, as a fix, it’s pretty nasty hack, as https & peer verification
   are used for a reason, and disabling it is regarded as a Very Bad Idea, as it
   leaves you open to MITM attacks etc, but given the small scope here, I guess 
   it’s OK.
 * I guess my main issue with the choice of tmp directory location it is that, if
   WordPress is operating in an environment with limited permissions for the web
   server user (and I’ve occasionally struck this, where restrictive permissions
   masks are applied, and WordPress / plugins can’t be auto-updated for instance),
   the wp-content/uploads/ folder is almost always excluded from these, to allow
   media uploads to function correctly.
 * For Windows users, XAMPP is almost always running as the current local user, 
   unless its running as a service, so unless you’ve put XAMPP in the `C:\Program
   Files\` directory, and then tried to install WordPress under it, you’re unlikely
   to strike a permissions issue.
 * Perhaps it might pay to rewrite the error message when the test write works, 
   but the real file does not save? People might be chasing their tails otherwise.
 * Nice plugin by the way! I’m a big fan of Unsplash, it’s great to be able to add
   some placeholder imagery when I’m comping up layouts, without having to browse/
   download / upload again.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] live search plugins and relevanssi_modify_wp_query](https://wordpress.org/support/topic/relevanssi-live-search/)
 *  Thread Starter [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/relevanssi-live-search/#post-7311138)
 * D’oh, the /wp-admin in the AJAX URL was the giveaway – enabling ‘Use search for
   admin’ was all that was required for this to work.

Viewing 15 replies - 1 through 15 (of 34 total)

1 [2](https://wordpress.org/support/users/hughc/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/hughc/replies/page/3/?output_format=md) 
[→](https://wordpress.org/support/users/hughc/replies/page/2/?output_format=md)