Plugin Directory

Changeset 2000847


Ignore:
Timestamp:
12/24/2018 07:50:23 AM (6 years ago)
Author:
mixar
Message:

tagging version 2.1.3

Location:
perelink
Files:
14 edited
18 copied

Legend:

Unmodified
Added
Removed
  • perelink/tags/2.1.3/PerelinkPluginOptions.php

    r1960270 r2000847  
    1414 * @property string $protectionCode
    1515 * @property array  $pageType
     16 * @property string $wrapperType
     17 * @property string $targetBlank
    1618 * @property string $inContentTitleSource
    1719 * @property bool   $afterTextEnabled
     
    125127    public $protectionCode                = '';
    126128    public $pageType                      = [ 'post', 'page' ];
     129    public $wrapperType                   = 'new';
     130    public $targetBlank                   = 'no';
    127131    public $inContentTitleSource          = '';
    128132    public $afterTextEnabled              = true;
  • perelink/tags/2.1.3/PerelinkPluginWork.php

    r1960270 r2000847  
    1414class PerelinkPluginWork extends PerelinkPluginBaseClass {
    1515
    16     const START_TAG = '<!--start_content-->';
    17     const END_TAG   = '<!--end_content-->';
     16    const OLD_START_TAG = '<!--start_content-->';
     17    const OLD_END_TAG   = '<!--end_content-->';
     18    const NEW_START_TAG = '<index>';
     19    const NEW_END_TAG   = '</index>';
    1820
    1921    /**
     
    4547        }
    4648        if ( $this->needWorkInContent() ) {
    47             $content = self::START_TAG . $this->workInContent( $content ) . self::END_TAG;
     49            if ( $this->options->wrapperType !== 'old' ) {
     50                $content = self::NEW_START_TAG . $this->workInContent( $content ) . self::NEW_END_TAG;
     51            } else {
     52                $content = self::OLD_START_TAG . $this->workInContent( $content ) . self::OLD_END_TAG;
     53            }
    4854        }
    4955        if ( $this->needWorkAfterText() ) {
  • perelink/tags/2.1.3/PerelinkPluginWorkInContent.php

    r1960270 r2000847  
    147147            $title  = $post->post_title;
    148148        }
    149         return '<a href="' . $this->item->url . '" ' . ( empty( $title ) ? '' : 'title="' . $title . '"' ) . ' class="binet-perelink">';
     149        return '<a href="' . $this->item->url . '"' . ( empty( $title ) ? '' : ' title="' . $title . '"' ) . ' class="perelink"' . ( $this->options->targetBlank === 'yes' ? ' target="_blank"' : '' ) . '>';
    150150    }
    151151
     
    155155        $this->clearImages();
    156156        $this->clearHeaders();
     157        $this->clearIndex();
    157158        $this->clearNoIndex();
    158159        $this->clearChars();
     
    173174            $this->clearTag( $tag );
    174175        }
     176    }
     177
     178    private function clearIndex() {
     179        $this->clearTag( 'index' );
    175180    }
    176181
  • perelink/tags/2.1.3/perelink.php

    r1973834 r2000847  
    99 * Plugin URI:  https://perelink.pro
    1010 * Description: Плагин для вывода перелинковки в тексте и после текста, сгенерированной в сервисе perelink.pro
    11  * Version:     2.1.2
     11 * Version:     2.1.3
    1212 * License:     GPL v3
    1313 *
  • perelink/tags/2.1.3/readme.txt

    r1973834 r2000847  
    33Tags: perelink, related, posts
    44Requires at least: 4.9.6
    5 Tested up to: 5.0.0
     5Tested up to: 5.0.2
    66Requires PHP: 5.6
    77Stable tag: trunk
     
    2222== Changelog ==
    2323
     24= 2.1.3 =
     25
     26* Добавлена опция открытия ссылок в новом окне
     27
     28* Добавлена поддержка новых тегов &lt;index&gt;&lt;/index&gt; для автоматической пометки области страницы в которой искать связи для перелинковки
     29
    2430= 2.1.2 =
    2531
  • perelink/tags/2.1.3/views/admin.php

    r1960270 r2000847  
    6969    <?php echo $this->render( 'admin_in_content', compact( 'options' ) ); ?>
    7070    <?php echo $this->render( 'admin_after_text', compact( 'options' ) ); ?>
     71    <?php echo $this->render( 'admin_expert', compact( 'options' ) ); ?>
    7172    <br />
    7273    <input type="submit" value="Сохранить" />
  • perelink/tags/2.1.3/views/admin_main.php

    r1973833 r2000847  
    1212<h2>Общие настройки</h2>
    1313<ul class="perelink-block">
    14     <li>Код защиты <input type="text" name="protectionCode" value="<?php echo $options->protectionCode; ?>" /><br /><em>Для генерации кода защиты посетите настройки проекта в сервисе</em></li>
     14    <li>Код защиты <input type="text" name="protectionCode" value="<?php echo $options->protectionCode; ?>" /><br /><em style="color:gray;">Для генерации кода защиты посетите настройки проекта в сервисе</em></li>
    1515    <li>Типы страниц учавствующие в перелинковке
    1616        <ul class="subitem">
  • perelink/tags/2.1.3/views/after_text_auto_horizontal.php

    r1960270 r2000847  
    3838    <?php foreach ( $data as $item ) { ?>
    3939        <div class="perelink-horizontal-item">
    40             <a href="<?php echo $item->url; ?>">
     40            <a href="<?php echo $item->url; ?>"<?php echo $options->targetBlank === 'yes' ? ' target="_blank"' : ''; ?>>
    4141                <img src="<?php echo $this->getImageByPostUrl( $item->url ); ?>" height="<?php echo $options->afterTextOutputImageSizeY; ?>" width="<?php echo $options->afterTextOutputImageSizeX; ?>">
    4242                <span><?php echo mb_ucfirst( $item->anchor ); ?></span>
  • perelink/tags/2.1.3/views/after_text_auto_vertical.php

    r1960270 r2000847  
    5353    <?php foreach ( $data as $item ) { ?>
    5454        <div class="perelink-vertical-item">
    55             <a href="<?php echo $item->url; ?>">
     55            <a href="<?php echo $item->url; ?>"<?php echo $options->targetBlank === 'yes' ? ' target="_blank"' : ''; ?>>
    5656                <div class="perelink-image">
    5757                    <img src="<?php echo $this->getImageByPostUrl( $item->url ); ?>" height="<?php echo $options->afterTextOutputImageSizeY; ?>" width="<?php echo $options->afterTextOutputImageSizeX; ?>">
  • perelink/tags/2.1.3/views/after_text_manual.php

    r1960270 r2000847  
    1919    switch ( $options->afterTextOutputMode ) {
    2020        case 'list':
    21             echo '<a href="' . $item->url . '">' . mb_ucfirst( $item->anchor ) . '</a>';
     21            echo '<a href="' . $item->url . '"' . ( $options->targetBlank === 'yes' ? ' target="_blank"' : '' ) . '>' . mb_ucfirst( $item->anchor ) . '</a>';
    2222            break;
    2323        case 'image':
  • perelink/trunk/PerelinkPluginOptions.php

    r1960270 r2000847  
    1414 * @property string $protectionCode
    1515 * @property array  $pageType
     16 * @property string $wrapperType
     17 * @property string $targetBlank
    1618 * @property string $inContentTitleSource
    1719 * @property bool   $afterTextEnabled
     
    125127    public $protectionCode                = '';
    126128    public $pageType                      = [ 'post', 'page' ];
     129    public $wrapperType                   = 'new';
     130    public $targetBlank                   = 'no';
    127131    public $inContentTitleSource          = '';
    128132    public $afterTextEnabled              = true;
  • perelink/trunk/PerelinkPluginWork.php

    r1960270 r2000847  
    1414class PerelinkPluginWork extends PerelinkPluginBaseClass {
    1515
    16     const START_TAG = '<!--start_content-->';
    17     const END_TAG   = '<!--end_content-->';
     16    const OLD_START_TAG = '<!--start_content-->';
     17    const OLD_END_TAG   = '<!--end_content-->';
     18    const NEW_START_TAG = '<index>';
     19    const NEW_END_TAG   = '</index>';
    1820
    1921    /**
     
    4547        }
    4648        if ( $this->needWorkInContent() ) {
    47             $content = self::START_TAG . $this->workInContent( $content ) . self::END_TAG;
     49            if ( $this->options->wrapperType !== 'old' ) {
     50                $content = self::NEW_START_TAG . $this->workInContent( $content ) . self::NEW_END_TAG;
     51            } else {
     52                $content = self::OLD_START_TAG . $this->workInContent( $content ) . self::OLD_END_TAG;
     53            }
    4854        }
    4955        if ( $this->needWorkAfterText() ) {
  • perelink/trunk/PerelinkPluginWorkInContent.php

    r1960270 r2000847  
    147147            $title  = $post->post_title;
    148148        }
    149         return '<a href="' . $this->item->url . '" ' . ( empty( $title ) ? '' : 'title="' . $title . '"' ) . ' class="binet-perelink">';
     149        return '<a href="' . $this->item->url . '"' . ( empty( $title ) ? '' : ' title="' . $title . '"' ) . ' class="perelink"' . ( $this->options->targetBlank === 'yes' ? ' target="_blank"' : '' ) . '>';
    150150    }
    151151
     
    155155        $this->clearImages();
    156156        $this->clearHeaders();
     157        $this->clearIndex();
    157158        $this->clearNoIndex();
    158159        $this->clearChars();
     
    173174            $this->clearTag( $tag );
    174175        }
     176    }
     177
     178    private function clearIndex() {
     179        $this->clearTag( 'index' );
    175180    }
    176181
  • perelink/trunk/perelink.php

    r1973834 r2000847  
    99 * Plugin URI:  https://perelink.pro
    1010 * Description: Плагин для вывода перелинковки в тексте и после текста, сгенерированной в сервисе perelink.pro
    11  * Version:     2.1.2
     11 * Version:     2.1.3
    1212 * License:     GPL v3
    1313 *
  • perelink/trunk/readme.txt

    r1973834 r2000847  
    33Tags: perelink, related, posts
    44Requires at least: 4.9.6
    5 Tested up to: 5.0.0
     5Tested up to: 5.0.2
    66Requires PHP: 5.6
    77Stable tag: trunk
     
    2222== Changelog ==
    2323
     24= 2.1.3 =
     25
     26* Добавлена опция открытия ссылок в новом окне
     27
     28* Добавлена поддержка новых тегов &lt;index&gt;&lt;/index&gt; для автоматической пометки области страницы в которой искать связи для перелинковки
     29
    2430= 2.1.2 =
    2531
  • perelink/trunk/views/admin.php

    r1960270 r2000847  
    6969    <?php echo $this->render( 'admin_in_content', compact( 'options' ) ); ?>
    7070    <?php echo $this->render( 'admin_after_text', compact( 'options' ) ); ?>
     71    <?php echo $this->render( 'admin_expert', compact( 'options' ) ); ?>
    7172    <br />
    7273    <input type="submit" value="Сохранить" />
  • perelink/trunk/views/admin_main.php

    r1973833 r2000847  
    1212<h2>Общие настройки</h2>
    1313<ul class="perelink-block">
    14     <li>Код защиты <input type="text" name="protectionCode" value="<?php echo $options->protectionCode; ?>" /><br /><em>Для генерации кода защиты посетите настройки проекта в сервисе</em></li>
     14    <li>Код защиты <input type="text" name="protectionCode" value="<?php echo $options->protectionCode; ?>" /><br /><em style="color:gray;">Для генерации кода защиты посетите настройки проекта в сервисе</em></li>
    1515    <li>Типы страниц учавствующие в перелинковке
    1616        <ul class="subitem">
  • perelink/trunk/views/after_text_auto_horizontal.php

    r1960270 r2000847  
    3838    <?php foreach ( $data as $item ) { ?>
    3939        <div class="perelink-horizontal-item">
    40             <a href="<?php echo $item->url; ?>">
     40            <a href="<?php echo $item->url; ?>"<?php echo $options->targetBlank === 'yes' ? ' target="_blank"' : ''; ?>>
    4141                <img src="<?php echo $this->getImageByPostUrl( $item->url ); ?>" height="<?php echo $options->afterTextOutputImageSizeY; ?>" width="<?php echo $options->afterTextOutputImageSizeX; ?>">
    4242                <span><?php echo mb_ucfirst( $item->anchor ); ?></span>
  • perelink/trunk/views/after_text_auto_vertical.php

    r1960270 r2000847  
    5353    <?php foreach ( $data as $item ) { ?>
    5454        <div class="perelink-vertical-item">
    55             <a href="<?php echo $item->url; ?>">
     55            <a href="<?php echo $item->url; ?>"<?php echo $options->targetBlank === 'yes' ? ' target="_blank"' : ''; ?>>
    5656                <div class="perelink-image">
    5757                    <img src="<?php echo $this->getImageByPostUrl( $item->url ); ?>" height="<?php echo $options->afterTextOutputImageSizeY; ?>" width="<?php echo $options->afterTextOutputImageSizeX; ?>">
  • perelink/trunk/views/after_text_manual.php

    r1960270 r2000847  
    1919    switch ( $options->afterTextOutputMode ) {
    2020        case 'list':
    21             echo '<a href="' . $item->url . '">' . mb_ucfirst( $item->anchor ) . '</a>';
     21            echo '<a href="' . $item->url . '"' . ( $options->targetBlank === 'yes' ? ' target="_blank"' : '' ) . '>' . mb_ucfirst( $item->anchor ) . '</a>';
    2222            break;
    2323        case 'image':
Note: See TracChangeset for help on using the changeset viewer.