| @@ 1105-1113 (lines=9) @@ | ||
| 1102 | // add class prefix |
|
| 1103 | $widget_class = 'EEW_' . $widget; |
|
| 1104 | // does the widget exist ? |
|
| 1105 | if (! is_readable($widget_path . DS . $widget_class . $widget_ext)) { |
|
| 1106 | $msg = sprintf( |
|
| 1107 | __( |
|
| 1108 | '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', |
|
| 1109 | 'event_espresso' |
|
| 1110 | ), |
|
| 1111 | $widget_class, |
|
| 1112 | $widget_path . DS . $widget_class . $widget_ext |
|
| 1113 | ); |
|
| 1114 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
| 1115 | return; |
|
| 1116 | } |
|
| @@ 144-155 (lines=12) @@ | ||
| 141 | // add class prefix |
|
| 142 | $shortcode_class = 'EES_' . $shortcode; |
|
| 143 | // does the shortcode exist ? |
|
| 144 | if ( ! is_readable($shortcode_path . DS . $shortcode_class . $shortcode_ext)) { |
|
| 145 | $msg = sprintf( |
|
| 146 | esc_html__( |
|
| 147 | 'The requested %s shortcode file could not be found or is not readable due to file permissions. It should be in %s', |
|
| 148 | 'event_espresso' |
|
| 149 | ), |
|
| 150 | $shortcode_class, |
|
| 151 | $shortcode_path . DS . $shortcode_class . $shortcode_ext |
|
| 152 | ); |
|
| 153 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
| 154 | return false; |
|
| 155 | } |
|
| 156 | // load the shortcode class file |
|
| 157 | require_once($shortcode_path . $shortcode_class . $shortcode_ext); |
|
| 158 | // verify that class exists |
|