@@ 25-32 (lines=8) @@ | ||
22 | * @return string |
|
23 | */ |
|
24 | public static function add_query_args_and_nonce( $args = array(), $url = '', $exclude_nonce = false ) { |
|
25 | if ( empty( $url ) ) { |
|
26 | $user_msg = __('An error occurred. A URL is a required parameter for the add_query_args_and_nonce method.', 'event_espresso' ); |
|
27 | $dev_msg = $user_msg . "\n" . sprintf( |
|
28 | __('In order to dynamically generate nonces for your actions, you need to supply a valid URL as a second parameter for the %s::add_query_args_and_nonce method.', 'event_espresso' ), |
|
29 | __CLASS__ |
|
30 | ); |
|
31 | EE_Error::add_error( $user_msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
32 | } |
|
33 | // check that an action exists and add nonce |
|
34 | if ( ! $exclude_nonce ) { |
|
35 | if ( isset( $args['action'] ) && ! empty( $args['action'] ) ) { |
@@ 578-584 (lines=7) @@ | ||
575 | * @return string on success, FALSE on fail |
|
576 | */ |
|
577 | private function generate_filename ( $export_name = '' ) { |
|
578 | if ( $export_name != '' ) { |
|
579 | $filename = get_bloginfo('name') . '-' . $export_name; |
|
580 | $filename = sanitize_key( $filename ) . '-' . $this->today; |
|
581 | return $filename; |
|
582 | } else { |
|
583 | EE_Error::add_error(__("No filename was provided", "event_espresso"), __FILE__, __FUNCTION__, __LINE__ ); |
|
584 | } |
|
585 | return false; |
|
586 | } |
|
587 |