* @license GPL-2.0+
* @link https://wpadvancedads.com
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
*
* @var WP_List_Table|false $wp_list_table the groups list table
* @var WP_Taxonomy $tax ad group taxonomy
* @var bool $is_search true if a group is searched.
*/
$ad_groups_list = new Advanced_Ads_Groups_List();
?>
create_group();
// display error message.
if ( is_wp_error( $create_result ) ) {
// potential error comes from WP_Error and is no user input.
// phpcs:ignore
$error_string = $create_result->get_error_message();
echo '
' . esc_html( $error_string ) . '
';
} else {
echo '
' . esc_html__( 'Ad Group successfully created', 'advanced-ads' ) . '
';
}
}
// save updated groups.
if ( isset( $_REQUEST['advads-group-update-nonce'] ) ) {
$udpate_result = $ad_groups_list->update_groups();
// display error message.
if ( is_wp_error( $udpate_result ) ) {
$error_string = $udpate_result->get_error_message();
// potential error comes from WP_Error and is no user input.
// phpcs:ignore
echo '
';
} else {
echo '
' . esc_html__( 'Ad Groups successfully updated', 'advanced-ads' ) . '
';
}
}
?>