This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Functions that you'll need | |
function get_free_version() { /* ... */ } | |
function get_premium_version() { /* ... */ } | |
function is_free_plugin($plugin_basename) { /* ... */ } | |
// Filter the value of the transient where WordPress stores pending updates | |
add_filter('site_transient_update_plugins', function ($value) { | |
// Only proceed if the transient has responses from update servers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
file_put_contents(__FILE__, substr(file_get_contents(__FILE__), 7), FILE_APPEND); |