Plugin Directory

Changeset 869337

Timestamp:
03/04/2014 04:49:12 PM (10 years ago)
Author:
jankarres
Message:

tagging version 1.8

Location:
wp-stacker
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-stacker/tags/1.8/readme.txt

    r821860 r869337  
    33Tags: wp stacker, wordpress, pocket, post, automaticly, wp, links, linklist
    44Requires at least: 3.4
    5 Tested up to: 3.8
    6 Stable tag: 1.7
     5Tested up to: 3.8
     6Stable tag: 1.
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53
     54
     55
     56
    5357
    5458= 1.7 =
  • wp-stacker/tags/1.8/wp-stacker.php

    r821860 r869337  
    66    Author: Jan Karres
    77    Author URI: http://jankarres.de/
    8     Version: 1.7
     8    Version: 1.
    99*/
    1010
     
    2424           
    2525            // Set plugin version
    26             $this->version = '1.7';
     26            $this->version = '1.';
    2727       
    2828            // Check WP version
     
    358358       
    359359        // 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) {
    361361            $wpstacker_entry_building = get_option('wpstacker_entry_building');
    362362           
     
    366366                $wpstacker_entry_building = str_replace('%%description%%', $description, $wpstacker_entry_building);
    367367                $wpstacker_entry_building = str_replace('%%url%%', $url, $wpstacker_entry_building);
     368
    368369                $wpstacker_entry_building = str_replace('%%tags%%', $tags, $wpstacker_entry_building);
    369370                $wpstacker_entry_building = str_replace('%%author%%', $author, $wpstacker_entry_building);
     
    957958                                    write the text and the variable in double square brackets. For example: %%title%%[[ - Tags: %%tags%%]]<br />
    958959                                    <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 link itself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name
     960                                    <i>%%url%%</i> for the itself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name
    960961                                    of the author who wrote the article; <i>%%countwords%%</i> for the number of words, which the article has.</strong>
    961962                                </p>
     
    10691070                    $error[] = 1;
    10701071                }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                    }
    10781081                }elseif (get_option('wpstacker_pocket_consumer_key_custom') == 0 && $_POST['wpstacker_pocket_consumer_key'] != '') {
    10791082                    // Set custom Consumer-Key first time
     
    15791582                   
    15801583                    // 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);
    15821585                   
    15831586                    // 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);
    15851588                   
    15861589                    // Check, which Array elements are dynamic. Set empy replace and flag in new array
     
    16351638                    while ($i < (count($_POST['element']) / 9)) {
    16361639                        // 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']) {
    16381641                            // Search for associate links in the following
    16391642                            $associateLinks = array();
    16401643                            $i2 = 1;
    16411644                            while(true) {
     1645
    16421646                                // If this is an associate links, add this to the array, else break the while-loop
    16431647                                if ($_POST['element'][($i * 9) + 8 + ($i2 * 9)]['associate']) {
     
    16921696                            // Gennerate url array in url string
    16931697                            $url = '';
    1694                            
     1698                            $urlOnly = '';
     1699
    16951700                            $i2 = 0;
    16961701                            foreach ($_POST['element'][($i * 9) + 2] as $value) {
    16971702                                if ($i2 != 0) {
    16981703                                    $url .= '; ';
     1704
    16991705                                }
    17001706                               
    17011707                                $url .= '<a href="' . $value[0] . '" target="_blank">' . $value[0] . '</a>';
     1708
    17021709                               
    17031710                                // Fill array for all posted links
     
    17121719                                $_POST['element'][($i * 9) + 5]['description'],
    17131720                                $url,
     1721
    17141722                                $_POST['element'][($i * 9) + 4]['tags'],
    17151723                                $_POST['element'][($i * 9) + 1]['author'],
  • wp-stacker/trunk/readme.txt

    r821860 r869337  
    33Tags: wp stacker, wordpress, pocket, post, automaticly, wp, links, linklist
    44Requires at least: 3.4
    5 Tested up to: 3.8
    6 Stable tag: 1.7
     5Tested up to: 3.8
     6Stable tag: 1.
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53
     54
     55
     56
    5357
    5458= 1.7 =
  • wp-stacker/trunk/wp-stacker.php

    r821860 r869337  
    66    Author: Jan Karres
    77    Author URI: http://jankarres.de/
    8     Version: 1.7
     8    Version: 1.
    99*/
    1010
     
    2424           
    2525            // Set plugin version
    26             $this->version = '1.7';
     26            $this->version = '1.';
    2727       
    2828            // Check WP version
     
    358358       
    359359        // 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) {
    361361            $wpstacker_entry_building = get_option('wpstacker_entry_building');
    362362           
     
    366366                $wpstacker_entry_building = str_replace('%%description%%', $description, $wpstacker_entry_building);
    367367                $wpstacker_entry_building = str_replace('%%url%%', $url, $wpstacker_entry_building);
     368
    368369                $wpstacker_entry_building = str_replace('%%tags%%', $tags, $wpstacker_entry_building);
    369370                $wpstacker_entry_building = str_replace('%%author%%', $author, $wpstacker_entry_building);
     
    957958                                    write the text and the variable in double square brackets. For example: %%title%%[[ - Tags: %%tags%%]]<br />
    958959                                    <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 link itself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name
     960                                    <i>%%url%%</i> for the itself; <i>%%tags%%</i> for added tags in pocket/metatags; <i>%%author%%</i> for the name
    960961                                    of the author who wrote the article; <i>%%countwords%%</i> for the number of words, which the article has.</strong>
    961962                                </p>
     
    10691070                    $error[] = 1;
    10701071                }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                    }
    10781081                }elseif (get_option('wpstacker_pocket_consumer_key_custom') == 0 && $_POST['wpstacker_pocket_consumer_key'] != '') {
    10791082                    // Set custom Consumer-Key first time
     
    15791582                   
    15801583                    // 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);
    15821585                   
    15831586                    // 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);
    15851588                   
    15861589                    // Check, which Array elements are dynamic. Set empy replace and flag in new array
     
    16351638                    while ($i < (count($_POST['element']) / 9)) {
    16361639                        // 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']) {
    16381641                            // Search for associate links in the following
    16391642                            $associateLinks = array();
    16401643                            $i2 = 1;
    16411644                            while(true) {
     1645
    16421646                                // If this is an associate links, add this to the array, else break the while-loop
    16431647                                if ($_POST['element'][($i * 9) + 8 + ($i2 * 9)]['associate']) {
     
    16921696                            // Gennerate url array in url string
    16931697                            $url = '';
    1694                            
     1698                            $urlOnly = '';
     1699
    16951700                            $i2 = 0;
    16961701                            foreach ($_POST['element'][($i * 9) + 2] as $value) {
    16971702                                if ($i2 != 0) {
    16981703                                    $url .= '; ';
     1704
    16991705                                }
    17001706                               
    17011707                                $url .= '<a href="' . $value[0] . '" target="_blank">' . $value[0] . '</a>';
     1708
    17021709                               
    17031710                                // Fill array for all posted links
     
    17121719                                $_POST['element'][($i * 9) + 5]['description'],
    17131720                                $url,
     1721
    17141722                                $_POST['element'][($i * 9) + 4]['tags'],
    17151723                                $_POST['element'][($i * 9) + 1]['author'],
Note: See TracChangeset for help on using the changeset viewer.