Brian Henry
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Thank You for WooCommerce] Unable to uninstall“Simply”
The order of the arguments needs to be swapped. Change
/includes/view/frontend/general.php:75
fromif (method_exists('is_empty', WC()->cart) && WC()->cart->is_empty()) {
to
if ( method_exists( WC()->cart, 'is_empty' ) && WC()->cart->is_empty() ) {
as per https://www.php.net/manual/en/function.method-exists.php
Forum: Plugins
In reply to: [Maintenance Redirect] Exclude URLsThanks. Here’s how I’m using it:
https://gist.github.com/BrianHenryIE/520724d8bc69aa058c1af89e16e8bf51
It redirects visitors only when they are in the USA, and not requests to the push-notifications-for-wordpress endpoint.
Forum: Plugins
In reply to: [Error Log Viewer by BestWebSoft] Invalid argument supplied for foreachThis is really bad.
Because of this bug the foreach loop isn’t entered.
The line immediately after is:
if ( empty( $message ) ) { $message = __( 'No new errors on your site', 'error-log-viewer' );
The plugin then emails the site administrator saying there are no errors on the site, regardless of any errors, including this very error.
foreach ( $rrrlgvwr_options['file_path'] as $key => $file ) {
is the offending line. In my case, the value offile_path
is just/
.Forum: Plugins
In reply to: [Blocks CSS: CSS Editor for Gutenberg Blocks] Breaks flex-posts block.I made a PR on GitHub with a fix that seems to work well:
Forum: Plugins
In reply to: [Error Log Viewer by BestWebSoft] Invalid argument supplied for foreachThis is still an issue with v1.1.0:
PHP Warning: Invalid argument supplied for foreach() in /home/user/public_html/wp-content/plugins/error-log-viewer/error-log-viewer.php on line 1037
Here’s a fix:
/** * Add the "Blocks CSS: CSS Editor for Gutenberg Blocks" plugin attributes to the Flex Posts attributes so the WordPress * REST API schema validates. * * @hooked flex_posts_attributes * @see https://www.ads-software.com/plugins/blocks-css/ * @see flex_posts_register_block() block.php:31 * @see register_block_type() * * @param array $attributes The validation schema as registered with register_block_type(). * @return array $attributes */ add_filter( 'flex_posts_attributes', function( $attributes ) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; if( is_plugin_active( 'blocks-css/blocks-css.php' ) ) { $attributes['hasCustomCSS'] = array( 'type' => 'boolean', 'default' => false, ); $attributes['customCSS'] = array( 'type' => 'string', 'default' => '', ); } return $attributes; });
…and I’ve created a PR to fix it for all plugins:
https://github.com/Codeinwp/blocks-css/pull/5- This reply was modified 5 years ago by Brian Henry.
Forum: Plugins
In reply to: [Blocks CSS: CSS Editor for Gutenberg Blocks] Breaks flex-posts block.I’ll follow the issue on GitHub, thank you.
I was also going to request a feature of having document level CSS.
That would allow for another workaround, where the native “Additional CSS Class(es)” field could be used to apply styles defined there.You might consider proposing a filter in
WP_Block_Type->prepare_attributes_for_render()
where your plugin could then remove the fields you have added, before they trigger a problem.I have reported it:
https://www.ads-software.com/support/topic/breaks-flex-posts-block/
Forum: Plugins
In reply to: [Maintenance Redirect] Exclude URLsLine 231
if( count( $wpjf3_matches ) == 0 ) {
checks has any reason been given NOT to process redirect. The plugin’s existing reasons are checked earlier in that function and added to thewpjf3_matches
array e.g.$wpjf3_matches[] = "<!-- WPJF_MR: IP MATCH -->";
. It doesn’t seem the reasons are passed anywhere else to be used, but adding anything to the array would stop the redirect from happening. If you change line 153 to$wpjf3_matches = apply_filters( 'wpjf3_matches', array() );
it won’t affect the running of the existing code unless a filter is added by another plugin or in the user’sfunctions.php
.- This reply was modified 5 years, 2 months ago by Brian Henry.
Forum: Plugins
In reply to: [Plugin Notes Plus] Select-all checkbox broken on updates pageThat fixed the issue, thank you very much!
Forum: Plugins
In reply to: [Plugin Notes Plus] Select-all checkbox broken on updates pageHey,
I love your plugin btw. The same functionality should be on basically everything on the Internet. Here’s an error in the console. I’m using Firefox on Mac. Sorry I didn’t look earlier!
TypeError: can't convert undefined to object plugin-notes-plus-updates.js:15:35 <anonymous> https://mydomain.com/wp-content/plugins/plugin-notes-plus/admin/js/plugin-notes-plus-updates.js?ver=1.2.0:15 jQuery 2 each each <anonymous> https://mydomain.com/wp-content/plugins/plugin-notes-plus/admin/js/plugin-notes-plus-updates.js?ver=1.2.0:13 jQuery 4 i fireWith ready J
I do have loads of other plugins installed. If that info isn’t enough I’ll spend more time diagnosing.
- This reply was modified 5 years, 3 months ago by Brian Henry.
That’s not what “resolved” means.
Forum: Plugins
In reply to: [Yoast SEO] Post Meta Description Not Showing Up on FacebookAntony, install WordFence and run a scan, correct any problems it finds. You likely have outdated plugins and one was exploited.
Forum: Plugins
In reply to: [Push Notifications for WordPress (Lite)] Premium plugin features?That’s clearly a pre-sale question. If you want to earn more money. Answer the questions.