Daniel Kirby Ray

Latest posts by Daniel Kirby Ray (see all)

Add Custom Icons To your Plugins' Auto Updater for WordPress Auto updates

Sample code to add to your project!

icons for updater:
——————————–

code
if ( is_object( $response ) && ! empty( $response ) ) {
// Feed the update data into WP updater
$response->icons = Array(
'2x' => esc_url( CUSTOM_PLUGIN__PATH_URL . '/assets/icon-256x256.png' ),
'1x' => esc_url( Function CUSTOM_PLUGIN__PATH_URL . '/assets/icon-128x128.png' )
);
$transient->response[ $this->plugin_path ] = $response;</code> return $transient; }

Add Custom Icons To your Plugins' Auto Updater for WordPress Auto updates

public function setup_constants() {

if ( ! defined( 'WOO_KUNAKI_LIGHT_VERSION' ) ) {
define( 'WOO_KUNAKI_LIGHT_VERSION', $this->version );
}

if ( ! defined( 'WOO_KUNAKI_LIGHT_PLUGIN_PATH' ) ) {
define( 'WOO_KUNAKI_LIGHT_PLUGIN_PATH', plugin_dir_path( __FILE__ ) . '../' );
}

if ( ! defined( 'WOO_KUNAKI_LIGHT_PLUGIN_URL' ) ) {
define( 'WOO_KUNAKI_LIGHT_PLUGIN_URL', plugin_dir_url( __FILE__ ) . '../' );
}

}

Output of your clients/customers wordpress updates dashboard

[starbox id=adminprime]