Changeset 2000847
- Timestamp:
- 12/24/2018 07:50:23 AM (6 years ago)
- Location:
- perelink
- Files:
-
- 14 edited
- 18 copied
Legend:
- Unmodified
- Added
- Removed
-
perelink/tags/2.1.3/PerelinkPluginOptions.php
r1960270 r2000847 14 14 * @property string $protectionCode 15 15 * @property array $pageType 16 * @property string $wrapperType 17 * @property string $targetBlank 16 18 * @property string $inContentTitleSource 17 19 * @property bool $afterTextEnabled … … 125 127 public $protectionCode = ''; 126 128 public $pageType = [ 'post', 'page' ]; 129 public $wrapperType = 'new'; 130 public $targetBlank = 'no'; 127 131 public $inContentTitleSource = ''; 128 132 public $afterTextEnabled = true; -
perelink/tags/2.1.3/PerelinkPluginWork.php
r1960270 r2000847 14 14 class PerelinkPluginWork extends PerelinkPluginBaseClass { 15 15 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>'; 18 20 19 21 /** … … 45 47 } 46 48 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 } 48 54 } 49 55 if ( $this->needWorkAfterText() ) { -
perelink/tags/2.1.3/PerelinkPluginWorkInContent.php
r1960270 r2000847 147 147 $title = $post->post_title; 148 148 } 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"' : '' ) . '>'; 150 150 } 151 151 … … 155 155 $this->clearImages(); 156 156 $this->clearHeaders(); 157 $this->clearIndex(); 157 158 $this->clearNoIndex(); 158 159 $this->clearChars(); … … 173 174 $this->clearTag( $tag ); 174 175 } 176 } 177 178 private function clearIndex() { 179 $this->clearTag( 'index' ); 175 180 } 176 181 -
perelink/tags/2.1.3/perelink.php
r1973834 r2000847 9 9 * Plugin URI: https://perelink.pro 10 10 * Description: Плагин для вывода перелинковки в тексте и после текста, сгенерированной в сервисе perelink.pro 11 * Version: 2.1. 211 * Version: 2.1.3 12 12 * License: GPL v3 13 13 * -
perelink/tags/2.1.3/readme.txt
r1973834 r2000847 3 3 Tags: perelink, related, posts 4 4 Requires at least: 4.9.6 5 Tested up to: 5.0. 05 Tested up to: 5.0.2 6 6 Requires PHP: 5.6 7 7 Stable tag: trunk … … 22 22 == Changelog == 23 23 24 = 2.1.3 = 25 26 * Добавлена опция открытия ссылок в новом окне 27 28 * Добавлена поддержка новых тегов <index></index> для автоматической пометки области страницы в которой искать связи для перелинковки 29 24 30 = 2.1.2 = 25 31 -
perelink/tags/2.1.3/views/admin.php
r1960270 r2000847 69 69 <?php echo $this->render( 'admin_in_content', compact( 'options' ) ); ?> 70 70 <?php echo $this->render( 'admin_after_text', compact( 'options' ) ); ?> 71 <?php echo $this->render( 'admin_expert', compact( 'options' ) ); ?> 71 72 <br /> 72 73 <input type="submit" value="Сохранить" /> -
perelink/tags/2.1.3/views/admin_main.php
r1973833 r2000847 12 12 <h2>Общие настройки</h2> 13 13 <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> 15 15 <li>Типы страниц учавствующие в перелинковке 16 16 <ul class="subitem"> -
perelink/tags/2.1.3/views/after_text_auto_horizontal.php
r1960270 r2000847 38 38 <?php foreach ( $data as $item ) { ?> 39 39 <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"' : ''; ?>> 41 41 <img src="<?php echo $this->getImageByPostUrl( $item->url ); ?>" height="<?php echo $options->afterTextOutputImageSizeY; ?>" width="<?php echo $options->afterTextOutputImageSizeX; ?>"> 42 42 <span><?php echo mb_ucfirst( $item->anchor ); ?></span> -
perelink/tags/2.1.3/views/after_text_auto_vertical.php
r1960270 r2000847 53 53 <?php foreach ( $data as $item ) { ?> 54 54 <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"' : ''; ?>> 56 56 <div class="perelink-image"> 57 57 <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 19 19 switch ( $options->afterTextOutputMode ) { 20 20 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>'; 22 22 break; 23 23 case 'image': -
perelink/trunk/PerelinkPluginOptions.php
r1960270 r2000847 14 14 * @property string $protectionCode 15 15 * @property array $pageType 16 * @property string $wrapperType 17 * @property string $targetBlank 16 18 * @property string $inContentTitleSource 17 19 * @property bool $afterTextEnabled … … 125 127 public $protectionCode = ''; 126 128 public $pageType = [ 'post', 'page' ]; 129 public $wrapperType = 'new'; 130 public $targetBlank = 'no'; 127 131 public $inContentTitleSource = ''; 128 132 public $afterTextEnabled = true; -
perelink/trunk/PerelinkPluginWork.php
r1960270 r2000847 14 14 class PerelinkPluginWork extends PerelinkPluginBaseClass { 15 15 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>'; 18 20 19 21 /** … … 45 47 } 46 48 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 } 48 54 } 49 55 if ( $this->needWorkAfterText() ) { -
perelink/trunk/PerelinkPluginWorkInContent.php
r1960270 r2000847 147 147 $title = $post->post_title; 148 148 } 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"' : '' ) . '>'; 150 150 } 151 151 … … 155 155 $this->clearImages(); 156 156 $this->clearHeaders(); 157 $this->clearIndex(); 157 158 $this->clearNoIndex(); 158 159 $this->clearChars(); … … 173 174 $this->clearTag( $tag ); 174 175 } 176 } 177 178 private function clearIndex() { 179 $this->clearTag( 'index' ); 175 180 } 176 181 -
perelink/trunk/perelink.php
r1973834 r2000847 9 9 * Plugin URI: https://perelink.pro 10 10 * Description: Плагин для вывода перелинковки в тексте и после текста, сгенерированной в сервисе perelink.pro 11 * Version: 2.1. 211 * Version: 2.1.3 12 12 * License: GPL v3 13 13 * -
perelink/trunk/readme.txt
r1973834 r2000847 3 3 Tags: perelink, related, posts 4 4 Requires at least: 4.9.6 5 Tested up to: 5.0. 05 Tested up to: 5.0.2 6 6 Requires PHP: 5.6 7 7 Stable tag: trunk … … 22 22 == Changelog == 23 23 24 = 2.1.3 = 25 26 * Добавлена опция открытия ссылок в новом окне 27 28 * Добавлена поддержка новых тегов <index></index> для автоматической пометки области страницы в которой искать связи для перелинковки 29 24 30 = 2.1.2 = 25 31 -
perelink/trunk/views/admin.php
r1960270 r2000847 69 69 <?php echo $this->render( 'admin_in_content', compact( 'options' ) ); ?> 70 70 <?php echo $this->render( 'admin_after_text', compact( 'options' ) ); ?> 71 <?php echo $this->render( 'admin_expert', compact( 'options' ) ); ?> 71 72 <br /> 72 73 <input type="submit" value="Сохранить" /> -
perelink/trunk/views/admin_main.php
r1973833 r2000847 12 12 <h2>Общие настройки</h2> 13 13 <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> 15 15 <li>Типы страниц учавствующие в перелинковке 16 16 <ul class="subitem"> -
perelink/trunk/views/after_text_auto_horizontal.php
r1960270 r2000847 38 38 <?php foreach ( $data as $item ) { ?> 39 39 <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"' : ''; ?>> 41 41 <img src="<?php echo $this->getImageByPostUrl( $item->url ); ?>" height="<?php echo $options->afterTextOutputImageSizeY; ?>" width="<?php echo $options->afterTextOutputImageSizeX; ?>"> 42 42 <span><?php echo mb_ucfirst( $item->anchor ); ?></span> -
perelink/trunk/views/after_text_auto_vertical.php
r1960270 r2000847 53 53 <?php foreach ( $data as $item ) { ?> 54 54 <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"' : ''; ?>> 56 56 <div class="perelink-image"> 57 57 <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 19 19 switch ( $options->afterTextOutputMode ) { 20 20 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>'; 22 22 break; 23 23 case 'image':
Note: See TracChangeset
for help on using the changeset viewer.