@@ 1094-1098 (lines=5) @@ | ||
1091 | // load the widget class file |
|
1092 | require_once($widget_path . '/' . $widget_class . $widget_ext); |
|
1093 | // verify that class exists |
|
1094 | if (! class_exists($widget_class)) { |
|
1095 | $msg = sprintf(__('The requested %s widget class does not exist.', 'event_espresso'), $widget_class); |
|
1096 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1097 | return; |
|
1098 | } |
|
1099 | register_widget($widget_class); |
|
1100 | // add to array of registered widgets |
|
1101 | EE_Registry::instance()->widgets->{$widget_class} = $widget_path . '/' . $widget_class . $widget_ext; |
@@ 2889-2902 (lines=14) @@ | ||
2886 | // default setup for it. |
|
2887 | // @link https://events.codebasehq.com/projects/event-espresso/tickets/9465 |
|
2888 | $updated = $MTP->insert($message_template_fields); |
|
2889 | if (! $updated || is_wp_error($updated)) { |
|
2890 | EE_Error::add_error( |
|
2891 | sprintf( |
|
2892 | esc_html__('%s field could not be updated.', 'event_espresso'), |
|
2893 | $template_field |
|
2894 | ), |
|
2895 | __FILE__, |
|
2896 | __FUNCTION__, |
|
2897 | __LINE__ |
|
2898 | ); |
|
2899 | $success = 0; |
|
2900 | } else { |
|
2901 | $success = 1; |
|
2902 | } |
|
2903 | } |
|
2904 | } |
|
2905 | $action_desc = 'updated'; |
@@ 564-570 (lines=7) @@ | ||
561 | return $critical_page; |
|
562 | } |
|
563 | // get newly created post's details |
|
564 | if (! $critical_page['post'] = get_post($post_id)) { |
|
565 | $msg = sprintf( |
|
566 | __('The Event Espresso critical page entitled "%s" could not be retrieved.', 'event_espresso'), |
|
567 | $critical_page['name'] |
|
568 | ); |
|
569 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
|
570 | } |
|
571 | ||
572 | return $critical_page; |
|
573 | } |