Plugin Directory

Changeset 2628198


Ignore:
Timestamp:
11/11/2021 04:49:38 PM (4 years ago)
Author:
rpayne7264
Message:

1.2.19

  • Added function RDP_WIKI_EMBED_CONTENT->buildLink(().
  • Modified function RDP_WIKI_EMBED_CONTENT->scrub() to preserve red links.
Location:
rdp-wiki-embed/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • rdp-wiki-embed/trunk/bl/rdpWEContent.php

    r2406027 r2628198  
    333333            }
    334334           
     335            if(is_array($oQueryPieces) && isset($oQueryPieces['redlink']) && strtolower($oQueryPieces['redlink']) == '1'){
     336                $link->href = $this->buildLink($oLinkPieces, $oURLPieces);
     337                continue;
     338            }
     339           
    335340            if(is_array($oQueryPieces) && isset($oQueryPieces['action']) && strtolower($oQueryPieces['action']) == 'edit'){
    336341                if($this->_options['edit_show']):
     
    358363            endif;
    359364
    360             $link->href = RDP_WIKI_EMBED_UTILITIES::unparse_url($oLinkPieces);
    361         } 
    362     }//content_scrub
     365
     366            $link->href = $this->buildLink($oLinkPieces, $oURLPieces);
     367        }       
     368    }//scrub
     369   
     370    private function buildLink($oLinkPieces,$oURLPieces) {
     371            if(key_exists('path', $oLinkPieces)):
     372                $sPath = $oLinkPieces['path'];
     373                if(substr($sPath, 0, 3) == '../')$sPath = substr($sPath, 3);
     374                if(substr($sPath, 0, 2) == '..')$sPath = substr($sPath, 2);
     375                if(substr($sPath, 0, 1) != '/')$sPath = '/'.$sPath;
     376                $oLinkPieces['path'] = $sPath;               
     377            endif;
     378           
     379            if(!isset($oLinkPieces['scheme'])):
     380                $oLinkPieces['scheme'] = $oURLPieces['scheme'];
     381            endif; 
     382
     383            if(!isset($oLinkPieces['host'])):
     384                $oLinkPieces['host'] = $oURLPieces['host'];
     385            endif;
     386           
     387            return RDP_WIKI_EMBED_UTILITIES::unparse_url($oLinkPieces);
     388    }//buildLink
    363389   
    364390    private function content_get(&$wpdb,$table) {
  • rdp-wiki-embed/trunk/index.php

    r2406027 r2628198  
    55Plugin URI: http://www.rdptechsolutions.com/
    66Description: Enables the inclusion of Wikimedia content into your own blog page or post through the use of shortcodes.
    7 Version: 1.2.18
     7Version: 1.2.19
    88Author: Robert D Payne
    99Author URI: http://www.rdptechsolutions.com/
     
    4848    public static $plugin_slug = 'rdp-wiki-embed';
    4949    public static $options_name = 'rdp_wiki_embed_options';   
    50     public static $version = '1.2.18';   
     50    public static $version = '1.2.19';   
    5151    private $_options = array();
    5252    /* @var $_instance RDP_WIKI_EMBED */
  • rdp-wiki-embed/trunk/pl/css/mw.css

    r1656052 r2628198  
    747747
    748748a.new {
    749     color: #BA0000;
     749    color: #BA0000 !important;
    750750}
    751751
  • rdp-wiki-embed/trunk/pl/rdpWEAdminMenu.php

    r2284572 r2628198  
    350350        $openNew = isset($options['wiki_links_open_new'])? $options['wiki_links_open_new'] : $default_settings['wiki_links_open_new'];
    351351        $openNew = intval($openNew);
    352         echo '<lable style="margin-left: 20px;">';
     352        echo '<label style="margin-left: 20px;">';
    353353        echo '<input type="checkbox" value="1" name="rdp_wiki_embed_options[wiki_links_open_new]" ' . checked( $openNew , 1, false) . '/> ';
    354354        esc_html_e('Open links in a new window.','rdp-wiki-embed');
    355         echo '</lable>';       
     355        echo '</label>';       
    356356       
    357357        echo '<br />';       
  • rdp-wiki-embed/trunk/readme.txt

    r2406032 r2628198  
    33Tags: mediawiki, wiki, wiki embed
    44Requires at least: 3.0
    5 Tested up to: 5.5.1
    6 Stable tag: 1.2.18
     5Tested up to: 5.8.2
     6Stable tag: 1.2.19
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    104104== Change Log ==
    105105
     106= 1.2.19 =
     107* Added function **RDP_WIKI_EMBED_CONTENT->buildLink(()**.
     108* Modified function **RDP_WIKI_EMBED_CONTENT->scrub()** to preserve red links.
     109
    106110= 1.2.18 =
    107111* Fixed bug related to the remove elements process
Note: See TracChangeset for help on using the changeset viewer.