Issue calling my functions on Plugin activate in WordPress

Please try below code my-plugin.php file <?php /** Plugin Name: My Plugin Plugin URI: http://##### Description: This plugin just for test Author: Chetan Vaghela Version: 1.0.0 Author URI: http://che##la.###/ */ if ( ! defined(‘ABSPATH’) ){ die; } if(!defined(‘MY_PLUGIN_PATH’)) { define( ‘MY_PLUGIN_PATH’, plugin_dir_path(__FILE__) ); } function mbp_activate(){ flush_rewrite_rules(); add_option( ‘my_plugin_activated’, time() ); } require_once MY_PLUGIN_PATH .’inc/mbp-plugin-activate.php’; … Read more

Implementing Scrollable Images

I was implemented it for images, which shows lists of images inside a container like pdf viewer..I just overide the css property of bloc gallery class, and adding an additional class… .image-list{ position: relative !important; padding-bottom: 140% !important; overflow: hidden !important; border: 1px solid #ddd !important; } .blocks-gallery-grid{ position: absolute; left: 0; top: 0; width: … Read more

How to deprecate a hook used in a plugin?

Firstly, you will need to lave the hook there. Deprecation just signals to developers that they should not use it, and that it will be removed in future. So you’re stuck with it for now. So really deprecation is a communications issue, not really a code issue. One helpful thing WordPress does provide in this … Read more