| @@ 820-824 (lines=5) @@ | ||
| 817 | $this->_redirect_after_action( FALSE, '', '', $query_args, TRUE ); | |
| 818 | } | |
| 819 | ||
| 820 | 		if ( $errors > 0 ) { | |
| 821 | 			EE_Error::add_error( sprintf( __('There were %d records that did not delete successfully', 'event_espresso'), $errors ), __FILE__, __FUNCTION__, __LINE__ ); | |
| 822 | 		} else { | |
| 823 | 			EE_Error::add_success( __('Records were successfully deleted', 'event_espresso') ); | |
| 824 | } | |
| 825 | ||
| 826 | $this->_redirect_after_action( FALSE, '', '', $query_args, TRUE ); | |
| 827 | } | |
| @@ 493-500 (lines=8) @@ | ||
| 490 | ||
| 491 | wp_enqueue_script( 'jquery' ); | |
| 492 | //let's make sure that all required scripts have been setup | |
| 493 | 			if ( function_exists( 'wp_script_is' ) && ! wp_script_is( 'jquery' )) { | |
| 494 | $msg = sprintf( | |
| 495 | __( '%sJquery is not loaded!%sEvent Espresso is unable to load Jquery due to a conflict with your theme or another plugin.', 'event_espresso' ), | |
| 496 | '<em><br />', | |
| 497 | '</em>' | |
| 498 | ); | |
| 499 | EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ ); | |
| 500 | } | |
| 501 | // load core js | |
| 502 | 			wp_register_script( 'espresso_core', EE_GLOBAL_ASSETS_URL . 'scripts/espresso_core.js', array('jquery'), EVENT_ESPRESSO_VERSION, TRUE ); | |
| 503 | wp_enqueue_script( 'espresso_core' ); | |
| @@ 926-945 (lines=20) @@ | ||
| 923 | 		} else { | |
| 924 | //can count how many sent by using the messages in the queue | |
| 925 | $sent_count = $sent_queue->count_STS_in_queue( EEM_Message::instance()->stati_indicating_sent() ); | |
| 926 | 			if ( $sent_count > 0 ) { | |
| 927 | EE_Error::add_success( | |
| 928 | sprintf( | |
| 929 | _n( | |
| 930 | 'There was %d message successfully sent.', | |
| 931 | 'There were %d messages successfully sent.', | |
| 932 | $sent_count, | |
| 933 | 'event_espresso' | |
| 934 | ), | |
| 935 | $sent_count | |
| 936 | ) | |
| 937 | ); | |
| 938 | 			} else { | |
| 939 | EE_Error::overwrite_errors(); | |
| 940 | EE_Error::add_error( | |
| 941 | __( 'No message was sent because of problems with sending. Either all the messages you selected were not a sendable message, they were ALREADY sent on a different scheduled task, or there was an error. | |
| 942 | If there was an error, you can look at the messages in the message activity list table for any error messages.', 'event_espresso' ), | |
| 943 | __FILE__, __FUNCTION__, __LINE__ | |
| 944 | ); | |
| 945 | } | |
| 946 | } | |
| 947 | return $sent_queue; | |
| 948 | } | |
| @@ 969-986 (lines=18) @@ | ||
| 966 | ||
| 967 | //get queue and count | |
| 968 | $queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue( EEM_Message::status_resend ); | |
| 969 | 		if ( $queue_count > 0 ) { | |
| 970 | EE_Error::add_success( | |
| 971 | sprintf( | |
| 972 | _n( | |
| 973 | '%d message successfully queued for resending.', | |
| 974 | '%d messages successfully queued for resending.', | |
| 975 | $queue_count, | |
| 976 | 'event_espresso' | |
| 977 | ), | |
| 978 | $queue_count | |
| 979 | ) | |
| 980 | ); | |
| 981 | 		} else { | |
| 982 | EE_Error::add_error( | |
| 983 | __( 'No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.', 'event_espresso' ), | |
| 984 | __FILE__, __FUNCTION__, __LINE__ | |
| 985 | ); | |
| 986 | } | |
| 987 | return (bool) $queue_count; | |
| 988 | } | |
| 989 | ||