Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions add-ons/agents/includes/class-taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,17 @@ public function create_taxonomy( $args = [] ) {

// Check permissions.
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html_e( 'Manage options capabilities required to create a taxonomy.', 'impress_agents' ) );
wp_die( esc_html__( 'Manage options capabilities required to create a taxonomy.', 'impress_agents' ) );
}
/** No empty fields */
if ( ! isset( $args['id'] ) || empty( $args['id'] ) ) {
wp_die( esc_html_e( 'Please complete all required fields.', 'impress_agents' ) );
wp_die( esc_html__( 'Please complete all required fields.', 'impress_agents' ) );
}
if ( ! isset( $args['name'] ) || empty( $args['name'] ) ) {
wp_die( esc_html_e( 'Please complete all required fields.', 'impress_agents' ) );
wp_die( esc_html__( 'Please complete all required fields.', 'impress_agents' ) );
}
if ( ! isset( $args['singular_name'] ) || empty( $args['singular_name'] ) ) {
wp_die( esc_html_e( 'Please complete all required fields.', 'impress_agents' ) );
wp_die( esc_html__( 'Please complete all required fields.', 'impress_agents' ) );
}

extract( $args );
Expand Down Expand Up @@ -168,11 +168,11 @@ public function delete_taxonomy( $id = '' ) {

// Check permissions.
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html_e( 'Manage options capabilities required to delete a taxonomy.', 'impress_agents' ) );
wp_die( esc_html__( 'Manage options capabilities required to delete a taxonomy.', 'impress_agents' ) );
}
/** No empty ID */
if ( ! isset( $id ) || empty( $id ) ) {
wp_die( esc_html_e( "Nice try, partner. But that taxonomy doesn't exist. Click back and try again.", 'impress_agents' ) );
wp_die( esc_html__( "Nice try, partner. But that taxonomy doesn't exist. Click back and try again.", 'impress_agents' ) );
}

$options = get_option( $this->settings_field );
Expand All @@ -181,7 +181,7 @@ public function delete_taxonomy( $id = '' ) {
if ( array_key_exists( $id, (array) $options ) ) {
unset( $options[$id] );
} else {
wp_die( esc_html_e( "Nice try, partner. But that taxonomy doesn't exist. Click back and try again.", 'impress_agents' ) );
wp_die( esc_html__( "Nice try, partner. But that taxonomy doesn't exist. Click back and try again.", 'impress_agents' ) );
}

/** Update the DB */
Expand All @@ -193,17 +193,17 @@ public function edit_taxonomy( $args = [] ) {

// Check permissions.
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html_e( 'Manage options capabilities required to edit a taxonomy.', 'impress_agents' ) );
wp_die( esc_html__( 'Manage options capabilities required to edit a taxonomy.', 'impress_agents' ) );
}
/** No empty fields */
if ( ! isset( $args['id'] ) || empty( $args['id'] ) ) {
wp_die( esc_html_e( 'Please complete all required fields.', 'impress_agents' ) );
wp_die( esc_html__( 'Please complete all required fields.', 'impress_agents' ) );
}
if ( ! isset( $args['name'] ) || empty( $args['name'] ) ) {
wp_die( esc_html_e( 'Please complete all required fields.', 'impress_agents' ) );
wp_die( esc_html__( 'Please complete all required fields.', 'impress_agents' ) );
}
if ( ! isset( $args['singular_name'] ) || empty( $args['singular_name'] ) ) {
wp_die( esc_html_e( 'Please complete all required fields.', 'impress_agents' ) );
wp_die( esc_html__( 'Please complete all required fields.', 'impress_agents' ) );
}

extract( $args );
Expand Down
6 changes: 3 additions & 3 deletions add-ons/listings/includes/class-taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function create_taxonomy( $args = array() ) {

// Check permissions.
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html_e( 'Manage options capabilities required to create a taxonomy.', 'wp_listings' ) );
wp_die( esc_html__( 'Manage options capabilities required to create a taxonomy.', 'wp_listings' ) );
}
/** No empty fields */
if ( ! isset( $args['id'] ) || empty( $args['id'] ) ) {
Expand Down Expand Up @@ -161,7 +161,7 @@ public function delete_taxonomy( $id = '' ) {

// Check permissions.
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html_e( 'Manage options capabilities required to delete a taxonomy.', 'wp_listings' ) );
wp_die( esc_html__( 'Manage options capabilities required to delete a taxonomy.', 'wp_listings' ) );
}
/** No empty ID */
if ( ! isset( $id ) || empty( $id ) ) {
Expand All @@ -186,7 +186,7 @@ public function edit_taxonomy( $args = array() ) {

// Check permissions.
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html_e( 'Manage options capabilities required to edit a taxonomy.', 'wp_listings' ) );
wp_die( esc_html__( 'Manage options capabilities required to edit a taxonomy.', 'wp_listings' ) );
}
/** No empty fields */
if ( ! isset( $args['id'] ) || empty( $args['id'] ) ) {
Expand Down