Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programmieren:wordpress:plugin_updates_unterbinden [2022/12/17 12:28] – external edit 127.0.0.1programmieren:wordpress:plugin_updates_unterbinden [2023/01/25 12:06] (current) jgehrke
Line 4: Line 4:
  
 <code php> <code php>
-/* +/*
- S T Y L E S + DISABLE SPECIFIC PLUGIN UPDATES
  */  */
  
-function lh_theme_styles() { +function filter_plugin_updates$value ) { 
-  + ifis_object( $value ) { 
- $theme_object = wp_get_theme(); +     unset( $value->response['meta-box/meta-box.php')/* Example disable Plugin-Updates for: 'Meta Box*/ 
- $version      = $theme_object["Version"]; +     unset$value->response['meta-box-group/meta-box-group.php'); /* Example disable Plugin-Updates for: 'Meta Box Group' */ 
-  +
- wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css',  array()$version ); +    return $value;
 } }
-add_action( 'wp_enqueue_scripts', 'lh_theme_styles' );+add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
 </code> </code>
  
-Hinweis: Man sollte eine Meldung einbauen, damit der Nutzer das etwas unterbunden ist, oder auch an Erinnerung an sich selbst+Hinweis: Man sollte eine Meldung einbauen, damit der Nutzer sieht, dass etwas unterbunden ist, oder auch an Erinnerung an sich selbst
  
 <code php> <code php>

Page Tools