| @@ 1079-1090 (lines=12) @@ | ||
| 1076 | // add class prefix | |
| 1077 | $widget_class = 'EEW_' . $widget; | |
| 1078 | // does the widget exist ? | |
| 1079 |         if (! is_readable($widget_path . '/' . $widget_class . $widget_ext)) { | |
| 1080 | $msg = sprintf( | |
| 1081 | __( | |
| 1082 | 'The requested %s widget file could not be found or is not readable due to file permissions. Please ensure the following path is correct: %s', | |
| 1083 | 'event_espresso' | |
| 1084 | ), | |
| 1085 | $widget_class, | |
| 1086 | $widget_path . '/' . $widget_class . $widget_ext | |
| 1087 | ); | |
| 1088 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); | |
| 1089 | return; | |
| 1090 | } | |
| 1091 | // load the widget class file | |
| 1092 | require_once($widget_path . '/' . $widget_class . $widget_ext); | |
| 1093 | // verify that class exists | |
| @@ 134-145 (lines=12) @@ | ||
| 131 | // add class prefix | |
| 132 | $shortcode_class = 'EES_' . $shortcode; | |
| 133 | // does the shortcode exist ? | |
| 134 |         if (! is_readable($shortcode_path . '/' . $shortcode_class . $shortcode_ext)) { | |
| 135 | $msg = sprintf( | |
| 136 | esc_html__( | |
| 137 | 'The requested %1$s shortcode file could not be found or is not readable due to file permissions. It should be in %2$s', | |
| 138 | 'event_espresso' | |
| 139 | ), | |
| 140 | $shortcode_class, | |
| 141 | $shortcode_path . '/' . $shortcode_class . $shortcode_ext | |
| 142 | ); | |
| 143 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); | |
| 144 | return false; | |
| 145 | } | |
| 146 | // load the shortcode class file | |
| 147 | require_once($shortcode_path . $shortcode_class . $shortcode_ext); | |
| 148 | // verify that class exists | |