| @@ 163-165 (lines=3) @@ | ||
| 160 | 		if ( empty( $addon_name ) || ! is_array( $setup_args )) { | |
| 161 | throw new EE_Error( __( 'In order to register an EE_Addon with EE_Register_Addon::register(), you must include the "addon_name" (the name of the addon), and an array of arguments.', 'event_espresso' )); | |
| 162 | } | |
| 163 | 		if ( ! isset($setup_args[ 'main_file_path' ]) || empty( $setup_args[ 'main_file_path' ] ) ){ | |
| 164 | 			throw new EE_Error( sprintf( __( 'When registering an addon, you didn\'t provide the "main_file_path", which is the full path to the main file loaded directly by Wordpress. You only provided %s', 'event_espresso' ), implode(",", array_keys( $setup_args ) ) ) ); | |
| 165 | } | |
| 166 | // check that addon has not already been registered with that name | |
| 167 | 		if ( isset( self::$_settings[ $addon_name ] ) && ! did_action( 'activate_plugin' ) ) { | |
| 168 | throw new EE_Error( sprintf( __( 'An EE_Addon with the name "%s" has already been registered and each EE_Addon requires a unique name.', 'event_espresso' ), $addon_name )); | |
| @@ 2688-2690 (lines=3) @@ | ||
| 2685 | 					//then $possible_array_of_params looks something like array('<','DTT_sold',true) | |
| 2686 | //indicating that $possible_array_of_params[1] is actually a field name, | |
| 2687 | //from which we should extract query parameters! | |
| 2688 | 					if( ! isset($possibly_array_of_params[0], $possibly_array_of_params[1] ) ) { | |
| 2689 | 						throw new EE_Error(sprintf(__("Improperly formed query parameter %s. It should be numerically indexed like array('<','DTT_sold',true); but you provided %s", "event_espresso"),$query_param_type,implode(",",$possibly_array_of_params))); | |
| 2690 | } | |
| 2691 | $this->_extract_related_model_info_from_query_param($possibly_array_of_params[1], $model_query_info_carrier, $query_param_type); | |
| 2692 | } | |
| 2693 | } | |