Changeset 2651864
- Timestamp:
- 01/02/2022 04:47:44 PM (4 years ago)
- Location:
- aspiesoft-church-sermon-video-list/trunk
- Files:
-
- 3 edited
-
aspiesoft-church-sermon-video-list.php (modified) (1 diff)
-
main.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
aspiesoft-church-sermon-video-list/trunk/aspiesoft-church-sermon-video-list.php
r2651847 r2651864 6 6 /* 7 7 Plugin Name: AspieSoft Church Sermon Video List 8 Version: 1.3. 18 Version: 1.3.2 9 9 Description: An easy way for a church to list there sermon videos on their website. 10 10 Author: AspieSoft -
aspiesoft-church-sermon-video-list/trunk/main.php
r2651748 r2651864 54 54 } 55 55 56 if ($attr['url'] && preg_match('/ [\\w_\\-.]\\/[\\w_\\-.]/', $attr['url'])) {56 if ($attr['url'] && preg_match('/^[\\w_\\-.]+\\/[\\w_\\-]+$/', $attr['url'])) { 57 57 $urlParts = explode('/', $attr['url']); 58 $attr['fb-profile'] = $urlParts[0]; 59 $attr['fb-id'] = $urlParts[1]; 60 $attr['url'] = false; 61 }else if($attr['url'] && preg_match('/^https?:\\/\\/(?:www\\.|)facebook\\.com\\/([\\w_\\-.]+)\\/videos\\/([\\w_\\-]+)\\/?$/', $attr['url'])){ 62 $urlParts = preg_replace('/^https?:\\/\\/(?:www\\.|)facebook\\.com\\/([\\w_\\-.]+)\\/videos\\/([\\w_\\-]+)\\/?$/', '$1/$2', $attr['url']); 63 $urlParts = explode('/', $urlParts); 58 64 $attr['fb-profile'] = $urlParts[0]; 59 65 $attr['fb-id'] = $urlParts[1]; … … 127 133 } 128 134 129 if ($content){135 if ($attr['list']) { 130 136 $this->enqueue(); 131 $content = do_shortcode(sanitize_text_field($content)); 132 }else if($attr['list']){ 133 $this->enqueue(); 137 $oldContent = $content; 134 138 $content = ''; 135 139 136 140 $sermonList = sanitize_textarea_field(get_option('AspieSoftChurchSermonVideoList')); 137 141 $sermonList = json_decode($sermonList, true); 138 foreach ($sermonList as $item){142 foreach ($sermonList as $item) { 139 143 $content .= '[cs-video'; 140 if (!$item['visible']){144 if (!$item['visible']) { 141 145 $content .= ' hide=true'; 142 146 } … … 144 148 } 145 149 150 if($oldContent){ 151 $content .= $oldContent; 152 } 153 154 $content = do_shortcode(sanitize_text_field($content)); 155 }else if($content){ 156 $this->enqueue(); 146 157 $content = do_shortcode(sanitize_text_field($content)); 147 158 }else{ -
aspiesoft-church-sermon-video-list/trunk/readme.txt
r2651847 r2651864 4 4 Requires at least: 3.0.1 5 5 Tested up to: 5.8.2 6 Stable tag: 1.3. 16 Stable tag: 1.3.2 7 7 Requires PHP: 5.2.4 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.