Changeset 1392502
- Timestamp:
- 04/11/2016 10:52:58 PM (10 years ago)
- Location:
- tea-page-content/trunk
- Files:
-
- 14 edited
-
README.md (modified) (1 diff)
-
classes/config.class.php (modified) (1 diff)
-
classes/helper.class.php (modified) (2 diffs)
-
config.php (modified) (1 diff)
-
languages/tea-page-content-ru_RU.mo (modified) (previous)
-
languages/tea-page-content-ru_RU.po (modified) (4 diffs)
-
modules/shortcode.php (modified) (2 diffs)
-
modules/widget.php (modified) (2 diffs)
-
readme.txt (modified) (8 diffs)
-
tea-page-content.class.php (modified) (2 diffs)
-
templates/bootstrap-3.php (modified) (3 diffs)
-
templates/default-padded.php (modified) (1 diff)
-
templates/default-widget-admin-variables-area.php (modified) (2 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tea-page-content/trunk/README.md
r1384553 r1392502 98 98 ## Migration Guide 99 99 ### From 1.0.x to 1.1.x 100 Since 1.1.x, nothing was deleted. But some options was marked as deprecated. We stronglyrecommend do these steps:100 Since 1.1.x, nothing was deleted. But some options was marked as deprecated. We recommend do these steps: 101 101 1. If you're using **default padded** template, change it on **default** with layout what you prefer. 102 102 2. If you're using shortcodes, replace parameter `id` to `posts`. -
tea-page-content/trunk/classes/config.class.php
r1384553 r1392502 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1.1. 04 * @version 1.1.1 5 5 */ 6 6 -
tea-page-content/trunk/classes/helper.class.php
r1384553 r1392502 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1.1. 04 * @version 1.1.1 5 5 */ 6 6 … … 197 197 198 198 $variables = array(); 199 $regexp = '/(?![@param*])( [\S\-\|]+)/i';199 $regexp = '/(?![@param*])((?:"[^"]+")|(?:[\S]+))/i'; 200 200 201 201 // Try to read template file -
tea-page-content/trunk/config.php
r1384553 r1392502 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1.1. 04 * @version 1.1.1 5 5 */ 6 6 -
tea-page-content/trunk/languages/tea-page-content-ru_RU.po
r1384553 r1392502 6 6 "Project-Id-Version: tea-page-content\n" 7 7 "Report-Msgid-Bugs-To: Translator Name <[email protected]>\n" 8 "POT-Creation-Date: 2016-04- 01 14:34+0400\n"8 "POT-Creation-Date: 2016-04-12 01:46+0400\n" 9 9 "PO-Revision-Date: \n" 10 10 "Last-Translator: \n" … … 20 20 "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;" 21 21 "esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;" 22 "_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c," 23 "_nc:4c,1,2\n" 22 "_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n" 24 23 "X-Poedit-Basepath: ..\n" 25 24 "X-Generator: Poedit 1.8.5\n" … … 36 35 #: tea-page-content.class.php:170 37 36 msgid "" 38 " Warning! Since Tea Page Content 1.1 some parameters is <b>deprecated</b>,"39 " and will be <b>deleted</b> in the next release. We strongly recommend you"40 " check out the <a href=\"https://wordpress.org/plugins/tea-page-content/"41 " changelog/\">changelog</a>. <b>Thisnotice appears only once!</b>"37 "Please note, that since Tea Page Content 1.1 some parameters is " 38 "<b>deprecated</b>. We recommend you check out the <a href=\"https://" 39 "wordpress.org/plugins/tea-page-content/changelog/\">changelog</a>. <b>This " 40 "notice appears only once!</b>" 42 41 msgstr "" 43 "Внимание! Начиная с версии Tea Page Content 1.1, некоторые параметры " 44 "<b>устарели</b>, и будут <b>удалены</b> в одном из следующих релизов. Мы " 42 "C версии Tea Page Content 1.1 некоторые параметры <b>устарели</b>. Мы " 45 43 "рекомендуем ознакомиться с <a href=\"https://wordpress.org/plugins/tea-page-" 46 44 "content/changelog/\">логом изменений</a>. <b>Это уведомление появляется " 47 "только од ин раз!</b>"45 "только однажды!</b>" 48 46 49 47 #: templates/default-widget-admin-variables-area.php:5 … … 96 94 97 95 #~ msgid "" 96 #~ "Warning! Since Tea Page Content 1.1 some parameters is <b>deprecated</b>, " 97 #~ "and will be <b>deleted</b> in the next release. We strongly recommend you " 98 #~ "check out the <a href=\"https://wordpress.org/plugins/tea-page-content/" 99 #~ "changelog/\">changelog</a>. <b>This notice appears only once!</b>" 100 #~ msgstr "" 101 #~ "Внимание! Начиная с версии Tea Page Content 1.1, некоторые параметры " 102 #~ "<b>устарели</b>, и будут <b>удалены</b> в одном из следующих релизов. Мы " 103 #~ "рекомендуем ознакомиться с <a href=\"https://wordpress.org/plugins/tea-" 104 #~ "page-content/changelog/\">логом изменений</a>. <b>Это уведомление " 105 #~ "появляется только один раз!</b>" 106 107 #~ msgid "" 98 108 #~ "Warning! Starts from Tea Page Content 1.1 some parameters is " 99 109 #~ "<b>deprecated</b>, and will be <b>deleted</b> in the next release. We " -
tea-page-content/trunk/modules/shortcode.php
r1384553 r1392502 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1.1. 04 * @version 1.1.1 5 5 */ 6 6 … … 32 32 $attrs['template_variables'] = array(); 33 33 foreach ($variables as $variable => $value) { 34 if($value['type'] === 'caption') continue; 35 34 36 if(isset($userAttrs[$variable])) { 35 37 $attrs['template_variables'][$variable] = $userAttrs[$variable]; -
tea-page-content/trunk/modules/widget.php
r1384553 r1392502 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1.1. 04 * @version 1.1.1 5 5 */ 6 6 … … 98 98 $instance['template_variables'] = array(); 99 99 foreach ($variables as $variable => $value) { 100 if($value['type'] === 'caption') continue; 101 100 102 if(!isset($newInstance[$variable])) { 101 103 switch ($value['type']) { -
tea-page-content/trunk/readme.txt
r1384604 r1392502 1 1 === Tea Page Widget & Content === 2 2 Contributors: Tsjuder 3 Tags: plugin, widget, shortcode, posts, post, pages, page, content 4 Requires at least: 4.0 5 Tested up to: 4. 4.26 Stable tag: 1.1. 03 Tags: plugin, widget, shortcode, posts, post, pages, page, content, template, templates 4 Requires at least: 4.0, PHP 5.3 5 Tested up to: 4.5 6 Stable tag: 1.1.1 7 7 Author URI: https://github.com/Tsjuder 8 8 Plugin URI: http://tsjuder.github.io/tea-page-content/ … … 14 14 == Description == 15 15 16 Tea Page Content is a powerful plugin that allows create blocks with content of any page, post, etc, and customize look of blocks via template system. You can select one or more entries, choose template (or create your own) and display it by widget or shortcode. Templates presents very flexible system for appearance control of created blocks. At this moment there is a two built-in templates: default and bootstrap 3.x. Supported languages: English and Russian.16 Tea Page Content is a powerful plugin that allows create blocks with content of any page, post, etc, and customize look of blocks via template system. You can select one or more entries, choose template (or create your own) and display it by widget or shortcode. Templates presents very flexible system for appearance control of created blocks. At this moment there is a two built-in templates: default and bootstrap 3.x. 17 17 18 18 = Key features = … … 21 21 * Possibility to create your own templates 22 22 * Developer and user friendly 23 * Easy to use 23 * Easy to use and beautiful UI 24 24 25 25 = Migration Guides = 26 Stay tuned with new versions. For make updates safe and fast, check migration guide at <a href="https://wordpress.org/plugins/tea-page-content/other_notes/">Other Notes</a> tab.26 Stay tuned with new versions. For make updates safe and fast, check changelog at <a href="https://wordpress.org/plugins/tea-page-content/changelog/">Changelog</a> tab. 27 27 28 28 = Documentation = … … 57 57 58 58 = I found a bug or have a suggestion. What I can do? = 59 You can create new topic in forum at wordpress.org, or send me email (in my profile). I will answer you as soon as possible.59 You can create new topic in forum at wordpress.org, or send me email. I will answer you as soon as possible. 60 60 61 61 == Changelog == 62 63 = 1.1.1 = 64 * \+ Added new template-variable type "caption" that allows you describe your template 65 * \* Checked for Wordpress 4.5 support 66 * \* Improved Bootstrap template 62 67 63 68 = 1.1.0 = … … 67 72 * \+ New template: Bootstrap 3.x 68 73 * \+ Added possibility hide title, content and link it. This feature depends of used template (all built-in templates except deprecated supports it) 69 * \- Default-Padded template, `thumbnail` widget and shortcode parameter, `id` shortcode parameter is **deprecated**. These features will be **deleted** in version 1.2.See docs for migration guide74 * \- Default-Padded template, `thumbnail` widget and shortcode parameter, `id` shortcode parameter is **deprecated**. See docs for migration guide 70 75 * \* CSS for frontend part changed, improved paddings, adds hover effects 71 76 * \* Global code refactoring. We are friendly for developers! … … 76 81 77 82 == Documentation == 78 79 = Migration Guide =80 **From 1.0.x to 1.1.x**81 Since 1.1.x, nothing was deleted. But some options was marked as deprecated. We strongly recommend do these steps:82 * If you're using **default padded** template, change it on **default** with layout what you prefer.83 * If you're using shortcodes, replace parameter `id` to `posts`.84 * If you're using widgets with **turned off** thumbnail option, re-save each of it.85 83 86 84 = Shortcodes = … … 118 116 `template="tpc-my-template"` 119 117 120 = Variables in template = 121 Above you can see very simple example of custom template with `title` and `content` variables. But this is not all - there is a full list of allowed variables which you can use. 122 123 = Details = 124 Because full manual is too long, you can see it at <a href="http://tsjuder.github.io/tea-page-content/">Github Page</a>. Get detail and updating information about new features includes filters, template-level variables and more. 118 = Parameters in template = 119 Above you can see very simple example of custom template with `title` and `content` parameters. But this is not all - there is a full list of allowed parameters which you can use. 125 120 126 121 * **$count** - Count of all passed entries … … 132 127 * **link** - Link of entry 133 128 * **id** - Entry ID 129 130 = Details = 131 Because full manual is too long, you can see it at <a href="http://tsjuder.github.io/tea-page-content/">Github Page</a>. Get details and updating information about new features includes filters, template-level variables and more. 132 133 = Migration Guide = 134 **From 1.0.x to 1.1.x** 135 Since 1.1.x, nothing was deleted. But some options was marked as deprecated. We recommend do these steps: 136 * If you're using **default padded** template, change it on **default** with layout what you prefer. 137 * If you're using shortcodes, replace parameter `id` to `posts`. 138 * If you're using widgets with **turned off** thumbnail option, re-save each of it. -
tea-page-content/trunk/tea-page-content.class.php
r1384553 r1392502 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1.1. 04 * @version 1.1.1 5 5 */ 6 6 … … 168 168 */ 169 169 public function displayDeprecatedNotice() { 170 $message = __(' Warning! Since Tea Page Content 1.1 some parameters is <b>deprecated</b>, and will be <b>deleted</b> in the next release. We stronglyrecommend you check out the <a href="https://wordpress.org/plugins/tea-page-content/changelog/">changelog</a>. <b>This notice appears only once!</b>');170 $message = __('Please note, that since Tea Page Content 1.1 some parameters is <b>deprecated</b>. We recommend you check out the <a href="https://wordpress.org/plugins/tea-page-content/changelog/">changelog</a>. <b>This notice appears only once!</b>'); 171 171 $content = '<div id="tpc-deprecated-notice" class="error notice tpc-deprecated-notice is-dismissible"><p>' . $message . '</p></div>'; 172 172 -
tea-page-content/trunk/templates/bootstrap-3.php
r1384553 r1392502 1 1 <?php 2 2 /** 3 * @param caption caption "This is a Bootstrap 3.x template. Feel free to read <a href='http://tsjuder.github.io/tea-page-content/' target='_blank'>docs</a> with explain of every variable. Enjoy!" 4 * 3 5 * @param container-type select container-fluid|container 4 6 * @param ordering-type select horizontal|transposed 7 * 8 * @param use-rows checkbox 1 5 9 * 6 10 * @param column-count-large select 1|2|3|4|6|12 … … 79 83 <?php 80 84 $counter++; 81 if($counter % $itemsPerRow === 0 ) :85 if($counter % $itemsPerRow === 0 && $template_variables['use-rows']) : 82 86 $counter = 0; 83 87 // here optionally clear row 88 89 echo '</div><div class="row">'; 90 84 91 endif; ?> 85 92 <?php endforeach; ?> … … 146 153 endfor; 147 154 155 if($counter < $itemsCount && $template_variables['use-rows']) { 156 echo '</div><div class="row">'; 157 } 158 148 159 endfor; 149 160 ?> -
tea-page-content/trunk/templates/default-padded.php
r1384553 r1392502 1 <?php 2 /** 3 * @param caption caption "This template is deprecated. Use 'default' instead." 4 */ 5 6 ?> 7 1 8 <?php if(isset($entries) && count($entries)) : ?> 2 9 -
tea-page-content/trunk/templates/default-widget-admin-variables-area.php
r1384553 r1392502 18 18 } else { 19 19 $variableValue = reset($variable['defaults']); 20 } ?>20 }?> 21 21 22 22 <p> 23 <label for="<?php echo $variableID ?>"> 24 <?php echo ucwords(str_replace(array('-','_'), ' ', $variable['name'])) ?>: 25 </label> 23 <?php if($variable['type'] !== 'caption') : ?> 24 <label for="<?php echo $variableID ?>"> 25 <?php echo ucwords(str_replace(array('-','_'), ' ', $variable['name'])) ?>: 26 </label> 27 <?php endif; ?> 26 28 27 29 <?php switch ($variable['type']) : default: break; ?> 30 <?php case 'caption': ?> 31 <span class="tpc-template-caption"> 32 <?php echo trim($variableValue, '"') ?> 33 </span> 34 <?php break; ?> 28 35 29 36 <?php case 'text': ?> … … 32 39 33 40 <?php case 'textarea': ?> 34 <textarea class="widefat" id="<?php echo $variableID ?>" name="<?php echo $variableName ?>"><?php echo $variableValue ?></textarea> 41 <textarea class="widefat" id="<?php echo $variableID ?>" name="<?php echo $variableName ?>"> 42 <?php echo $variableValue ?> 43 </textarea> 35 44 <?php break; ?> 36 45 37 46 <?php case 'checkbox': ?> 38 <?php 39 $checked = ''; 47 <?php $checked = ''; 40 48 if(!empty($instance['params'][$variable['name']]) || $variableValue) { 41 49 $checked = 'checked'; 42 } 43 ?> 50 } ?> 51 44 52 <input type="checkbox" class="widefat" id="<?php echo $variableID ?>" name="<?php echo $variableName ?>" value="<?php echo $variable['name'] ?>" <?php echo $checked ?> /> 45 53 <?php break; ?> -
tea-page-content/trunk/uninstall.php
r1384553 r1392502 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1.1. 04 * @version 1.1.1 5 5 */ 6 6
Note: See TracChangeset
for help on using the changeset viewer.