| @@ -16,10 +16,8 @@ | ||
| 16 | 16 | } |
| 17 | 17 | preg_match_all("/{[^}]*}/" ,$str,$matches); |
| 18 | 18 | $matches = array_unique($matches[0]); |
| 19 | 19 | $flag =false; |
| 20 | -$page_setting = get_option( 'wppm-page-settings' ); | |
| 21 | -$view = $page_setting['project-url-page']; | |
| 22 | 20 | foreach($matches as $match){ |
| 23 | 21 | switch($match){ |
| 24 | 22 | //Current User Name |
| 25 | 23 | case '{user_name}': |
| @@ -91,15 +89,9 @@ | ||
| 91 | 89 | break; |
| 92 | 90 | |
| 93 | 91 | // Project Description |
| 94 | 92 | case '{project_description}': |
| 95 | - $str = preg_replace('/{project_description}/', sanitize_text_field($wppm_project_data['description']), $str); | |
| 96 | - break; | |
| 97 | - case '{project_url}': | |
| 98 | - $project_url = '<a class="wppm_link" href="' . $this->get_project_url($project_id,$view) . '" target="_blank">' . $this->get_project_url($project_id,$view) . '</a>'; | |
| 99 | - $str = preg_replace('/{project_url}/', $project_url, $str); | |
| 100 | - break; | |
| 101 | - | |
| 93 | + $str = preg_replace('/{project_description}/', sanitize_text_field($wppm_project_data['description']), $str); | |
| 102 | 94 | } |
| 103 | 95 | } |
| 104 | 96 | if($flag == true){ |
| 105 | 97 | if(!empty($attachments)){ |