pgc_run(); register_deactivation_hook( __FILE__, PGC_PREFIX . 'unregister_settings' ); function pgc_unregister_settings(){ global $wpdb; $tbl = $wpdb->prefix . 'options'; $search_string = PGC_PREFIX .'%'; $sql = $wpdb->prepare( "SELECT option_name FROM $tbl WHERE option_name LIKE %s", $search_string ); $options = $wpdb->get_results( $sql , OBJECT ); if(is_array($options) && count($options)) { foreach( $options as $option ) { delete_option( $option->option_name ); delete_site_option( $option->option_name ); } } } /* * Add settings link */ add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'pgc_add_plugin_page_settings_link'); function pgc_add_plugin_page_settings_link( $links ) { $links[] = '' . __('Settings') . ''; return $links; }

Home Sales on the go

Text me the app!