Changeset 869337
- Timestamp:
- 03/04/2014 04:49:12 PM (10 years ago)
- Location:
- wp-stacker
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
wp-stacker/tags/1.8/readme.txt
r821860 r869337 3 3 Tags: wp stacker, wordpress, pocket, post, automaticly, wp, links, linklist 4 4 Requires at least: 3.4 5 Tested up to: 3.8 6 Stable tag: 1. 75 Tested up to: 3.8 6 Stable tag: 1. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Changelog == 52 52 53 54 55 56 53 57 54 58 = 1.7 = -
wp-stacker/tags/1.8/wp-stacker.php
r821860 r869337 6 6 Author: Jan Karres 7 7 Author URI: http://jankarres.de/ 8 Version: 1. 78 Version: 1. 9 9 */ 10 10 … … 24 24 25 25 // Set plugin version 26 $this->version = '1. 7';26 $this->version = '1.'; 27 27 28 28 // Check WP version … … 358 358 359 359 // Function to replace variables in the entry building 360 function replaceEntryBuilding($title, $description, $url, $ tags, $author, $countwords, $replace = true) {360 function replaceEntryBuilding($title, $description, $url, $tags, $author, $countwords, $replace = true) { 361 361 $wpstacker_entry_building = get_option('wpstacker_entry_building'); 362 362 … … 366 366 $wpstacker_entry_building = str_replace('%%description%%', $description, $wpstacker_entry_building); 367 367 $wpstacker_entry_building = str_replace('%%url%%', $url, $wpstacker_entry_building); 368 368 369 $wpstacker_entry_building = str_replace('%%tags%%', $tags, $wpstacker_entry_building); 369 370 $wpstacker_entry_building = str_replace('%%author%%', $author, $wpstacker_entry_building); … … 957 958 write the text and the variable in double square brackets. For example: %%title%%[[ - Tags: %%tags%%]]<br /> 958 959 <strong>Use <i>%%title%%</i> for title of the link in pocket; <i>%%description%%</i> for the meta description of the link; 959 <i>%%url%%</i> for the linkitself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name960 <i>%%url%%</i> for the itself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name 960 961 of the author who wrote the article; <i>%%countwords%%</i> for the number of words, which the article has.</strong> 961 962 </p> … … 1069 1070 $error[] = 1; 1070 1071 }elseif(get_option('wpstacker_pocket_consumer_key_custom') == 1 && $_POST['wpstacker_pocket_consumer_key'] != '') { 1071 // Set new key 1072 update_option('wpstacker_pocket_consumer_key', $this->xcrypt(0, $_POST['wpstacker_pocket_consumer_key'])); 1073 1074 // Reset authed Pocket account 1075 update_option('wpstacker_pocket_access_key', ''); 1076 update_option('wpstacker_pocket_username', ''); 1077 $changeConsumerKey = true; 1072 if ($this->xcrypt(1, get_option('wpstacker_pocket_consumer_key')) != $_POST['wpstacker_pocket_consumer_key']) { 1073 // Set new key 1074 update_option('wpstacker_pocket_consumer_key', $this->xcrypt(0, $_POST['wpstacker_pocket_consumer_key'])); 1075 1076 // Reset authed Pocket account 1077 update_option('wpstacker_pocket_access_key', ''); 1078 update_option('wpstacker_pocket_username', ''); 1079 $changeConsumerKey = true; 1080 } 1078 1081 }elseif (get_option('wpstacker_pocket_consumer_key_custom') == 0 && $_POST['wpstacker_pocket_consumer_key'] != '') { 1079 1082 // Set custom Consumer-Key first time … … 1579 1582 1580 1583 // Set en empty example for entry building with replace 1581 $replaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false );1584 $replaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false); 1582 1585 1583 1586 // Set en empty example for entry building without replace 1584 $noReplaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false, false );1587 $noReplaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false, false); 1585 1588 1586 1589 // Check, which Array elements are dynamic. Set empy replace and flag in new array … … 1635 1638 while ($i < (count($_POST['element']) / 9)) { 1636 1639 // Check if this it not a associate link 1637 if (isset($_POST['element'][($i * 9) + 6]['associate']) && !$_POST['element'][($i * 9) + 6]['associate']) {1640 if (isset($_POST['element'][($i * 9) + ]['associate']) { 1638 1641 // Search for associate links in the following 1639 1642 $associateLinks = array(); 1640 1643 $i2 = 1; 1641 1644 while(true) { 1645 1642 1646 // If this is an associate links, add this to the array, else break the while-loop 1643 1647 if ($_POST['element'][($i * 9) + 8 + ($i2 * 9)]['associate']) { … … 1692 1696 // Gennerate url array in url string 1693 1697 $url = ''; 1694 1698 $urlOnly = ''; 1699 1695 1700 $i2 = 0; 1696 1701 foreach ($_POST['element'][($i * 9) + 2] as $value) { 1697 1702 if ($i2 != 0) { 1698 1703 $url .= '; '; 1704 1699 1705 } 1700 1706 1701 1707 $url .= '<a href="' . $value[0] . '" target="_blank">' . $value[0] . '</a>'; 1708 1702 1709 1703 1710 // Fill array for all posted links … … 1712 1719 $_POST['element'][($i * 9) + 5]['description'], 1713 1720 $url, 1721 1714 1722 $_POST['element'][($i * 9) + 4]['tags'], 1715 1723 $_POST['element'][($i * 9) + 1]['author'], -
wp-stacker/trunk/readme.txt
r821860 r869337 3 3 Tags: wp stacker, wordpress, pocket, post, automaticly, wp, links, linklist 4 4 Requires at least: 3.4 5 Tested up to: 3.8 6 Stable tag: 1. 75 Tested up to: 3.8 6 Stable tag: 1. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Changelog == 52 52 53 54 55 56 53 57 54 58 = 1.7 = -
wp-stacker/trunk/wp-stacker.php
r821860 r869337 6 6 Author: Jan Karres 7 7 Author URI: http://jankarres.de/ 8 Version: 1. 78 Version: 1. 9 9 */ 10 10 … … 24 24 25 25 // Set plugin version 26 $this->version = '1. 7';26 $this->version = '1.'; 27 27 28 28 // Check WP version … … 358 358 359 359 // Function to replace variables in the entry building 360 function replaceEntryBuilding($title, $description, $url, $ tags, $author, $countwords, $replace = true) {360 function replaceEntryBuilding($title, $description, $url, $tags, $author, $countwords, $replace = true) { 361 361 $wpstacker_entry_building = get_option('wpstacker_entry_building'); 362 362 … … 366 366 $wpstacker_entry_building = str_replace('%%description%%', $description, $wpstacker_entry_building); 367 367 $wpstacker_entry_building = str_replace('%%url%%', $url, $wpstacker_entry_building); 368 368 369 $wpstacker_entry_building = str_replace('%%tags%%', $tags, $wpstacker_entry_building); 369 370 $wpstacker_entry_building = str_replace('%%author%%', $author, $wpstacker_entry_building); … … 957 958 write the text and the variable in double square brackets. For example: %%title%%[[ - Tags: %%tags%%]]<br /> 958 959 <strong>Use <i>%%title%%</i> for title of the link in pocket; <i>%%description%%</i> for the meta description of the link; 959 <i>%%url%%</i> for the linkitself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name960 <i>%%url%%</i> for the itself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name 960 961 of the author who wrote the article; <i>%%countwords%%</i> for the number of words, which the article has.</strong> 961 962 </p> … … 1069 1070 $error[] = 1; 1070 1071 }elseif(get_option('wpstacker_pocket_consumer_key_custom') == 1 && $_POST['wpstacker_pocket_consumer_key'] != '') { 1071 // Set new key 1072 update_option('wpstacker_pocket_consumer_key', $this->xcrypt(0, $_POST['wpstacker_pocket_consumer_key'])); 1073 1074 // Reset authed Pocket account 1075 update_option('wpstacker_pocket_access_key', ''); 1076 update_option('wpstacker_pocket_username', ''); 1077 $changeConsumerKey = true; 1072 if ($this->xcrypt(1, get_option('wpstacker_pocket_consumer_key')) != $_POST['wpstacker_pocket_consumer_key']) { 1073 // Set new key 1074 update_option('wpstacker_pocket_consumer_key', $this->xcrypt(0, $_POST['wpstacker_pocket_consumer_key'])); 1075 1076 // Reset authed Pocket account 1077 update_option('wpstacker_pocket_access_key', ''); 1078 update_option('wpstacker_pocket_username', ''); 1079 $changeConsumerKey = true; 1080 } 1078 1081 }elseif (get_option('wpstacker_pocket_consumer_key_custom') == 0 && $_POST['wpstacker_pocket_consumer_key'] != '') { 1079 1082 // Set custom Consumer-Key first time … … 1579 1582 1580 1583 // Set en empty example for entry building with replace 1581 $replaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false );1584 $replaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false); 1582 1585 1583 1586 // Set en empty example for entry building without replace 1584 $noReplaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false, false );1587 $noReplaceEntryBuilding = $this->replaceEntryBuilding(false, false, false, false, false, false, false); 1585 1588 1586 1589 // Check, which Array elements are dynamic. Set empy replace and flag in new array … … 1635 1638 while ($i < (count($_POST['element']) / 9)) { 1636 1639 // Check if this it not a associate link 1637 if (isset($_POST['element'][($i * 9) + 6]['associate']) && !$_POST['element'][($i * 9) + 6]['associate']) {1640 if (isset($_POST['element'][($i * 9) + ]['associate']) { 1638 1641 // Search for associate links in the following 1639 1642 $associateLinks = array(); 1640 1643 $i2 = 1; 1641 1644 while(true) { 1645 1642 1646 // If this is an associate links, add this to the array, else break the while-loop 1643 1647 if ($_POST['element'][($i * 9) + 8 + ($i2 * 9)]['associate']) { … … 1692 1696 // Gennerate url array in url string 1693 1697 $url = ''; 1694 1698 $urlOnly = ''; 1699 1695 1700 $i2 = 0; 1696 1701 foreach ($_POST['element'][($i * 9) + 2] as $value) { 1697 1702 if ($i2 != 0) { 1698 1703 $url .= '; '; 1704 1699 1705 } 1700 1706 1701 1707 $url .= '<a href="' . $value[0] . '" target="_blank">' . $value[0] . '</a>'; 1708 1702 1709 1703 1710 // Fill array for all posted links … … 1712 1719 $_POST['element'][($i * 9) + 5]['description'], 1713 1720 $url, 1721 1714 1722 $_POST['element'][($i * 9) + 4]['tags'], 1715 1723 $_POST['element'][($i * 9) + 1]['author'],
Note: See TracChangeset
for help on using the changeset viewer.