Changeset 2010502
- Timestamp:
- 01/11/2019 10:58:56 AM (7 years ago)
- Location:
- podigee
- Files:
-
- 7 added
- 4 edited
-
tags/0.7 (added)
-
tags/0.7/admin (added)
-
tags/0.7/admin/class-podigee-qp.php (added)
-
tags/0.7/admin/podigee-qp-admin.css (added)
-
tags/0.7/admin/podigee-qp-admin.js (added)
-
tags/0.7/podigee-quick-publish.php (added)
-
tags/0.7/readme.txt (added)
-
trunk/admin/class-podigee-qp.php (modified) (2 diffs)
-
trunk/admin/podigee-qp-admin.js (modified) (2 diffs)
-
trunk/podigee-quick-publish.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
podigee/trunk/admin/class-podigee-qp.php
r1971402 r2010502 58 58 $subdomain = $options['pfex_slug']; 59 59 $token = $options['pfex_token']; 60 if ($subdomain == false) $default = ""; else $default = "https://".$subdomain.".podigee.io/feed/mp3/"; 61 60 61 if ($subdomain == false) $default = ""; else { 62 $subdomain = explode(",", $subdomain); 63 64 if (count($subdomain) > 1) { 65 $sd_choice = "<label for=\"pfex-subdomain-select\">Choose subdomain:</label><br />"; 66 $sd_choice .= "<select name=\"pfex-subdomain-select\" id=\"pfex-subdomain-select\" class=\"postbox pfex-ep-input\">"; 67 foreach ($subdomain as $sd) { 68 $domain = "https://".$sd.".podigee.io/feed/mp3/"; 69 $sd_choice .= "<option value=\"$domain\">$sd</option>"; 70 } 71 $sd_choice .= "</select>"; 72 } else $default = $domain = "https://".$subdomain[0].".podigee.io/feed/mp3/"; 73 } 62 74 ?> 63 75 <div id="pfex-container"> 64 76 <div id="pfex-step-1" class=""> 77 <?php echo $sd_choice; ?> 65 78 <label for="pfex-feed-url">Feed URL:</label><br /> 66 79 <input name="pfex-feed-url" id="pfex-feed-url" class="postbox pfex-ep-input" readonly value="<?php echo $default; ?>" /><br /> 67 80 <input id="pfex-fetch" name="pfex-fetch" type="button" class="button button-primary pfex-feed-fetch-button" value="fetch feed" /><span id="pfex-feed-info"><?php 68 if ($this->check_authorization($subdomain , $token) == false) {81 if ($this->check_authorization($subdomain[0], $token) == false) { 69 82 echo "There seems to be a problem with your Podigee authorization. Please check your <a href=\"options-general.php?page=podigee-wpqp-plugin\">settings</a>."; 70 83 } … … 156 169 $token = $options['pfex_token']; 157 170 $subdomain = $options['pfex_slug']; 171 172 $subdomains = explode(",", $options['pfex_slug']); 173 $subdomain = $subdomains[0]; 158 174 159 175 if ($this->check_authorization($subdomain, $token) == false) { -
podigee/trunk/admin/podigee-qp-admin.js
r1971402 r2010502 194 194 195 195 196 /** 197 * Switching subdomain has to update the feed URL input field. 198 */ 199 $('#pfex-subdomain-select').on('change', function(){ 200 $('#pfex-feed-url').val($(this).val()); 201 localStorage['pfex-last-selection'] = $(this).val(); 202 }); 203 204 var lastselection = localStorage['pfex-last-selection'] || ''; 205 206 if (lastselection == "") { 207 $('#pfex-subdomain-select').trigger('change'); 208 } else { 209 $('#pfex-subdomain-select').val(lastselection); 210 $('#pfex-feed-url').val(lastselection); 211 } 196 212 }); 197 213 … … 291 307 } 292 308 309 293 310 /** 294 311 * Resetting input fields on change. -
podigee/trunk/podigee-quick-publish.php
r1986749 r2010502 4 4 * Plugin URI: https://podigee.com 5 5 * Description: Let's you import metadata from your Podigee podcast feed right into the Wordpress post editor. Not (yet) compatible to Gutenberg. Developed for Podigee by Jürgen Krauß (https://www.es-ist-ein-krauss.de/). 6 * Version: 0. 6.46 * Version: 0.7 7 7 * Author: Podigee 8 8 * Author URI: https://podigee.com … … 103 103 $options = get_option('pfex_plugin_options'); 104 104 echo "<input id='pfex_slug' name='pfex_plugin_options[pfex_slug]' size='40' type='text' value='{$options['pfex_slug']}' />"; 105 echo "<br /><small>Please do not enter the full podcast URL here – only the subdomain as configured in the <i>General</i> section of your podcast's settings.<br /><i>Example</i>: If your Podcast is located at <strong>https://mypreciouspodcast.podigee.io</strong> – you would only need to enter <strong>mypreciouspodcast</strong>.</small>"; 106 $mp3feed = "https://".$options['pfex_slug'].".podigee.io/feed/mp3/"; 107 if (isset($options['pfex_slug']) && trim($options['pfex_slug']) != "") echo " <br /><br /><small>If configured correctly, you should be able to reach your feed at <a href=\"$mp3feed\" target=\"_blank\">$mp3feed</a></small>."; 105 echo "<p>Please do not enter the full podcast URL here – only the subdomain as configured in the <i>General</i> section of your podcast's settings.<br /><i>Example</i>: If your Podcast is located at <strong>https://mypreciouspodcast.podigee.io</strong> – you would only need to enter <strong>mypreciouspodcast</strong>.</p>"; 106 if (isset($options['pfex_slug']) && trim($options['pfex_slug']) != "") { 107 $subdomains = explode(",", $options['pfex_slug']); 108 109 if (count($subdomains) > 0) { 110 echo "<br /><p>If configured correctly, you should be able to reach your feed at: <br /><ul>"; 111 foreach ($subdomains as $subdomain) { 112 $mp3feed = "https://".$subdomain.".podigee.io/feed/mp3/"; 113 echo "<li><a href=\"$mp3feed\" target=\"_blank\">$mp3feed</a></li>"; 114 } 115 echo "</ul></p>"; 116 } 117 } 118 echo "<p><strong>NEW:</strong>You can add multiple subdomains in a comma-separated list.</p>"; 108 119 } 109 120 … … 114 125 $options = get_option('pfex_plugin_options'); 115 126 echo "<input id='pfex_token' name='pfex_plugin_options[pfex_token]' size='40' type='text' value='{$options['pfex_token']}' />"; 116 echo "</br /> <small>Please enter the auth token as displayed <small><a href=\"https://app.podigee.com/settings#applications\" target=\"_blank\">here</a>.</small>";127 echo "</br />Please enter the auth token as displayed <a href=\"https://app.podigee.com/settings#applications\" target=\"_blank\">here</a>."; 117 128 } 118 129 … … 126 137 $options['pfex_token'] = ''; 127 138 } 128 $options['pfex_slug'] = strtolower(trim( $input['pfex_slug']));129 if(!preg_match('/^[a-z0-9-_ ]+$/i', $options['pfex_slug'])) {139 $options['pfex_slug'] = strtolower(trim(str_replace(" ", "", $input['pfex_slug']))); 140 if(!preg_match('/^[a-z0-9-_,]+$/i', $options['pfex_slug'])) { 130 141 $options['pfex_slug'] = ''; 131 142 } -
podigee/trunk/readme.txt
r1986753 r2010502 3 3 Tags: podcast, feed 4 4 Requires at least: 3.9 5 Tested up to: 4.95 Tested up to: 5.0.3 6 6 Requires PHP: 5.2.4 7 Stable tag: 0. 6.47 Stable tag: 0.7 8 8 License: MIT License 9 9 License URI: https://opensource.org/licenses/MIT … … 66 66 == Changelog == 67 67 68 = 0.7 = 69 * Added support for multiple subdomains 70 68 71 = 0.6.4 = 69 72 * Bug fix to allow hyphens in subdomain … … 88 91 == Upgrade Notice == 89 92 93 = 0.7 = 94 * You can now fetch information from all the podcasts in your podigee account. 95 90 96 = 0.6 = 91 97 * New options key 'pfex_plugin_options', the old one 'pfex_feed_url' is deprecated and can be removed from the Wordpress option database
Note: See TracChangeset
for help on using the changeset viewer.