license check in plugin

You can use a strategy referred to as “freemium” where you distribute a free version of your technology but require users to pay for an enhanced version (often with more features and support). To implement the paid license is a topic more complicated and diverse than can be answered in-depth here. But the short & … Read more

Bulk edit existing shortcode within custom field

In phpMyAdmin: update wp_postmeta set meta_value = replace(meta_value,'[idx-listings’,'[idx-listings showlargerphotos=”true”‘); As long as you’ve always typed the shortcode starting with [idx-listings and not, say, [ idx-listings, this will add your new attribute everywhere the shortcode has been used.

Stuck on image in an Advanced Custom Field loop

This may be obvious, but the issue is in <img src=”https://wordpress.stackexchange.com/questions/354153/<?php the_sub_field(“tool_image’);?>”>. the_sub_field(‘field_name’) will output the field’s content, which I think in your case will be an image tag. In your case you should use get_sub_field(‘field_name’). using the get_ will return the value. Returning the value will be handy for #1 below. I haven’t looked … Read more

Programatically download a plugin

WP CLI is best tool out there to manage plugins/ themes through command line, instead of uploading plugins through FTP or admin panel. Once you Install WP-CLI on your machine then run below command and see magic. wp plugin install bbpress –activate Please check WP-CLI official documentation for further understanding.

WordPress Multisite user activation hook from email

As discussed in the comments the fix is to put your wpmu_activate_user hook into a must-use plugin under /wp-content/mu-plugins/. The problem is that the email’s activation link handler, wp-activate.php, defines define( ‘WP_INSTALLING’, true ); (I guess to cover the case it’s running in the context of a newly provisioned site?) and wp-load will not load … Read more

Multisite custom user activation emails – html

Per the filter’s documentation, the $content should be formatted for use by wp_mail(). In the wp_mail() documentation, I find this: The default charset is based on the charset used on the blog. The charset can be set using the wp_mail_charset filter. So it appears you need to explicitly allow WordPress to send HTML mail. See … Read more

How to make a customize role and view a specific plugins base on that role?

You can a custom admin page with add_menu_page function. The function has a argument $capability which you can set the which users will be able to view and access the page add_menu_page https://developer.wordpress.org/reference/functions/add_menu_page/ Roles and capabilities https://wordpress.org/support/article/roles-and-capabilities/