@@ 186-189 (lines=4) @@ | ||
183 | * @return EED_Module | NULL |
|
184 | */ |
|
185 | public static function module_factory( $module_name ) { |
|
186 | if ( $module_name == 'EED_Module' ) { |
|
187 | EE_Error::add_error( sprintf( __( 'EED_Module is an abstract parent class an can not be instantiated. Please provide a proper module name.', 'event_espresso' ), $module_name ), __FILE__, __FUNCTION__, __LINE__ ); |
|
188 | return NULL; |
|
189 | } |
|
190 | // let's pause to reflect on this... |
|
191 | $mod_reflector = new ReflectionClass( $module_name ); |
|
192 | // ensure that class is actually a module |
@@ 166-169 (lines=4) @@ | ||
163 | ||
164 | //loop through the existing registry and see if the classname is already present. |
|
165 | foreach ( self::$_registry as $ref => $args ) { |
|
166 | if ( $args['classname'] == $classname ) { |
|
167 | EE_Error::add_error( sprintf( __('The %s template pack that you just activated cannot be registered with the messages system because there is already a template pack active using the same classname. Contact the author of this template pack to let them know of the conflict. To stop seeing this message you will need to deactivate this template pack.', 'event_espresso' ), (string) $setup_args['classname'] ), __FILE__, __LINE__, __FUNCTION__ ); |
|
168 | return false; |
|
169 | } |
|
170 | } |
|
171 | return true; |
|
172 | } |
@@ 409-413 (lines=5) @@ | ||
406 | if ( $critical_page['post'] === null ) { |
|
407 | $critical_page = EEH_Activation::create_critical_page( $critical_page ); |
|
408 | // REALLY? Still nothing ??!?!? |
|
409 | if ( $critical_page['post'] === null ) { |
|
410 | $msg = __( 'The Event Espresso critical page configuration settings could not be updated.', 'event_espresso' ); |
|
411 | EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
412 | break; |
|
413 | } |
|
414 | } |
|
415 | } |
|
416 | // track post_shortcodes |
|
@@ 531-538 (lines=8) @@ | ||
528 | */ |
|
529 | private static function _track_critical_page_post_shortcodes( $critical_page = array() ) { |
|
530 | // check the goods |
|
531 | if ( ! $critical_page['post'] instanceof WP_Post ) { |
|
532 | $msg = sprintf( |
|
533 | __( 'The Event Espresso critical page shortcode for the page %s can not be tracked because it is not a WP_Post object.', 'event_espresso' ), |
|
534 | $critical_page['name'] |
|
535 | ); |
|
536 | EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
537 | return; |
|
538 | } |
|
539 | $EE_Core_Config = EE_Registry::instance()->CFG->core; |
|
540 | // map shortcode to post |
|
541 | $EE_Core_Config->post_shortcodes[ $critical_page['post']->post_name ][ $critical_page['code'] ] = $critical_page['post']->ID; |