We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for the video example:
a) The installation script: wp-content/plugins/test-plugin/plugin.php
<?php echo sprintf( '<a href="%s" title="%s">%s</a>', admin_url( 'admin.php?page=addressbook'), __( 'Back to list', 'wedevs' ), __( 'Back to list', 'wedevs' ) ); ?>
c) remove Move to Trash
wp-content/plugins/test-plugin/includes/class-address-list-table.php
/** * Set the bulk actions * * @return array */ function get_bulk_actions() { $actions = array( //'trash' => __( 'Move to Trash', 'wedevs' ), ); return $actions; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
for the video example:
a) The installation script:
prefix . 'addressbook'; $charset_collate = $wpdb->get_charset_collate(); $sql = "CREATE TABLE $table_name ( id mediumint(9) NOT NULL AUTO_INCREMENT, name varchar(255) DEFAULT '' NOT NULL, phone varchar(255) NULL, email varchar(255) NULL, website varchar(255) NULL, address text NULL, date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, UNIQUE KEY id (id) ) $charset_collate;"; require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); dbDelta( $sql ); ``` b) Delete items wp-content/plugins/test-plugin/includes/address-functions.php add in the end /** - delete a single address from database * - @param int $id * - @return array */ function test_delete_address( $id = 0 ) { global $wpdb; return $wpdb->get_row( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'addressbook WHERE id = %d', $id ) ); } wp-content/plugins/test-plugin/includes/class-address-admin-menu.php add to the plugin_page() function the delete case: ``` public function plugin_page() { $action = isset( $_GET['action'] ) ? $_GET['action'] : 'list'; $id = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0; switch ($action) { case 'view': $template = dirname( __FILE__ ) . '/views/address-single.php'; break; case 'edit': $template = dirname( __FILE__ ) . '/views/address-edit.php'; break; case 'new': $template = dirname( __FILE__ ) . '/views/address-new.php'; break; case 'delete': test_delete_address( $id ); $template = dirname( __FILE__ ) . '/views/address-was-delete.php'; break; default: $template = dirname( __FILE__ ) . '/views/address-list.php'; break; } if ( file_exists( $template ) ) { include $template; } } ``` Create the file wp-content/plugins/test-plugin/includes/views/address-was-delete.phpwp-content/plugins/test-plugin/plugin.php
c) remove Move to Trash
wp-content/plugins/test-plugin/includes/class-address-list-table.php
/**
* Set the bulk actions
*
* @return array
*/
function get_bulk_actions() {
$actions = array(
//'trash' => __( 'Move to Trash', 'wedevs' ),
);
return $actions;
}
The text was updated successfully, but these errors were encountered: