Is it possible for a plugin to force reading and writing of uploaded images to a database instead of to a filesystem?

Yes, you should have quite reasonable options to customize upload, there are plenty of existing solutions around. As for specifics I am not sure on “database” as image storage option. They typical solutions that I’ve heard of are: dedicated location behind CDN (or some variation of); dedicated image storage service, such as Amazon S3.

detect your custom post type in WordPress

are you looking for get_post_type? You can use it to get any CPT type by slug and use it conditionally For instance: function filter_the_content( $content ) { if ( ! is_user_logged_in() && ‘my_cpt’ == get_post_type() ) { return “Content reserved to logged in users”; } return $content; } add_filter( ‘the_content’, ‘filter_the_content’ ); The docs: https://developer.wordpress.org/reference/functions/get_post_type/

Custom license for WordPress plugin

In my opinion this is impossible, while keeping plugin GPL-compatible (which is considered cultural norm for WP extensions, legal claims aside for now). Much of open source licensing in general is to accommodate concept of derivative work. That is for it to really be open source other should be allowed to change it. If they … Read more

WP Enqueue style on all plug-in pages

If you want enqueue style on all admin pages You can use the following code function load_custom_wp_admin_style() { wp_enqueue_style( ‘custom_wp_admin_css’, plugins_url(‘css/style.css’, __FILE__) ); } add_action( ‘admin_enqueue_scripts’, ‘load_custom_wp_admin_style’ ); Or if you want enqueue style on specific pages, You can use the following code function load_custom_wp_admin_style($hook) { if($hook != ‘toplevel_page_myplugin’ || $hook != ‘widgets.php’ || $hook … Read more

Bulk update wordpress posts

One implementation detail of how WP works with database is that it always drags all query results into PHP values and memory space. In other words it is highly unlikely to throw any heavy query at WP and not have it collapse. Notably any plugins that deal with large queries (such as database backup ones) … Read more