| @@ 600-606 (lines=7) @@ | ||
| 597 | * @return string on success, FALSE on fail |
|
| 598 | */ |
|
| 599 | private function generate_filename ( $export_name = '' ) { |
|
| 600 | if ( $export_name != '' ) { |
|
| 601 | $filename = get_bloginfo('name') . '-' . $export_name; |
|
| 602 | $filename = sanitize_key( $filename ) . '-' . $this->today; |
|
| 603 | return $filename; |
|
| 604 | } else { |
|
| 605 | EE_Error::add_error(__("No filename was provided", "event_espresso"), __FILE__, __FUNCTION__, __LINE__ ); |
|
| 606 | } |
|
| 607 | return false; |
|
| 608 | } |
|
| 609 | ||
| @@ 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'] ) ) { |
|