Читать книгу Professional WordPress Plugin Development - Brad Williams - Страница 82

Deleting Options

Оглавление

Now that you understand how to create, update, and retrieve options, let's look at deleting an option. Deleting an option needs a self‐explanatory function call.

<?php delete_option( 'pdev_plugin_options' ); ?>

This function call returns false if the option to delete cannot be found and returns true otherwise. You will mostly delete options when writing uninstall functions or files (see Chapter 2).

Professional WordPress Plugin Development

Подняться наверх