Changeset 1384553
- Timestamp:
- 04/01/2016 08:38:05 PM (10 years ago)
- Location:
- tea-page-content
- Files:
-
- 40 added
- 8 deleted
- 22 edited
-
tags/1.1.0/README.md (added)
-
tags/1.1.0/assets/css/index.php (added)
-
tags/1.1.0/assets/css/tea-page-content-admin.css (modified) (1 diff)
-
tags/1.1.0/assets/css/tea-page-content-main.css (modified) (4 diffs)
-
tags/1.1.0/assets/index.php (added)
-
tags/1.1.0/assets/js/index.php (added)
-
tags/1.1.0/assets/js/tea-page-content-admin-notices.js (added)
-
tags/1.1.0/assets/js/tea-page-content-admin.js (modified) (1 diff)
-
tags/1.1.0/classes (added)
-
tags/1.1.0/classes/config.class.php (added)
-
tags/1.1.0/classes/helper.class.php (added)
-
tags/1.1.0/classes/index.php (added)
-
tags/1.1.0/config.php (added)
-
tags/1.1.0/helpers (deleted)
-
tags/1.1.0/index.php (added)
-
tags/1.1.0/languages/index.php (added)
-
tags/1.1.0/languages/tea-page-content-ru_RU.mo (modified) (previous)
-
tags/1.1.0/languages/tea-page-content-ru_RU.po (modified) (3 diffs)
-
tags/1.1.0/modules (added)
-
tags/1.1.0/modules/index.php (added)
-
tags/1.1.0/modules/shortcode.php (added)
-
tags/1.1.0/modules/widget.php (added)
-
tags/1.1.0/readme.txt (modified) (3 diffs)
-
tags/1.1.0/shortcodes (deleted)
-
tags/1.1.0/tea-page-content.class.php (modified) (8 diffs)
-
tags/1.1.0/tea-page-content.php (modified) (2 diffs)
-
tags/1.1.0/templates/bootstrap-3.php (added)
-
tags/1.1.0/templates/bootstrap.php (deleted)
-
tags/1.1.0/templates/default-padded.php (modified) (1 diff)
-
tags/1.1.0/templates/default-widget-admin-variables-area.php (added)
-
tags/1.1.0/templates/default-widget-admin.php (modified) (5 diffs)
-
tags/1.1.0/templates/default.php (modified) (1 diff)
-
tags/1.1.0/templates/index.php (added)
-
tags/1.1.0/uninstall.php (added)
-
tags/1.1.0/widgets (deleted)
-
trunk/README.md (added)
-
trunk/assets/css/index.php (added)
-
trunk/assets/css/tea-page-content-admin.css (modified) (1 diff)
-
trunk/assets/css/tea-page-content-main.css (modified) (4 diffs)
-
trunk/assets/index.php (added)
-
trunk/assets/js/index.php (added)
-
trunk/assets/js/tea-page-content-admin-notices.js (added)
-
trunk/assets/js/tea-page-content-admin.js (modified) (1 diff)
-
trunk/classes (added)
-
trunk/classes/config.class.php (added)
-
trunk/classes/helper.class.php (added)
-
trunk/classes/index.php (added)
-
trunk/config.php (added)
-
trunk/helpers (deleted)
-
trunk/index.php (added)
-
trunk/languages/index.php (added)
-
trunk/languages/tea-page-content-ru_RU.mo (modified) (previous)
-
trunk/languages/tea-page-content-ru_RU.po (modified) (3 diffs)
-
trunk/modules (added)
-
trunk/modules/index.php (added)
-
trunk/modules/shortcode.php (added)
-
trunk/modules/widget.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/shortcodes (deleted)
-
trunk/tea-page-content.class.php (modified) (8 diffs)
-
trunk/tea-page-content.php (modified) (2 diffs)
-
trunk/templates/bootstrap-3.php (added)
-
trunk/templates/bootstrap.php (deleted)
-
trunk/templates/default-padded.php (modified) (1 diff)
-
trunk/templates/default-widget-admin-variables-area.php (added)
-
trunk/templates/default-widget-admin.php (modified) (5 diffs)
-
trunk/templates/default.php (modified) (1 diff)
-
trunk/templates/index.php (added)
-
trunk/uninstall.php (added)
-
trunk/widgets (deleted)
Legend:
- Unmodified
- Added
- Removed
-
tea-page-content/tags/1.1.0/assets/css/tea-page-content-admin.css
r1319161 r1384553 83 83 margin-left: 10px; 84 84 } 85 .iqbc-mods-list label { 85 86 .tpc-template-params hr { 87 margin: 0; 88 } 89 90 .tpc-preloader { 91 position: relative; 92 } 93 .tpc-preloader:before { 94 content: ""; 86 95 display: block; 87 float: left; 88 clear: both; 89 width: 100%; 96 position: absolute; 97 98 top: 0; 99 left: 0; 100 right: 0; 101 bottom: 0; 102 103 opacity: 0; 104 105 transition: opacity 500ms ease; 106 -webkit-transition: opacity 500ms ease; 107 -moz-transition: opacity 500ms ease; 108 -ms-transition: opacity 500ms ease; 109 -o-transition: opacity 500ms ease; 110 111 z-index: 1000; 112 113 background-image: url(/wp-admin/images/spinner-2x.gif); 114 background-color: rgba(255,255,255,0.4); 115 background-position: center center; 116 background-repeat: no-repeat; 90 117 } 91 .iqbc-mods-list label span { 92 display: block; 93 white-space: nowrap; 94 overflow: hidden; 95 96 text-overflow: ellipsis; 118 .tpc-preloader.is-loading {} 119 .tpc-preloader.is-hidden:before { 120 z-index: -1000; 97 121 } 98 .iqbc-mods-list label input[type=checkbox] { 99 float: left; 100 margin-top: 2px; 122 .tpc-preloader.is-loading:before { 123 opacity: 1; 101 124 } 102 .iqbc-mods-list .col {103 width: 20%;104 float: left;105 }106 .iqbc-mods-list .submit,107 .iqbc-mods-list > p {108 clear: both;109 } -
tea-page-content/tags/1.1.0/assets/css/tea-page-content-main.css
r1319161 r1384553 5 5 6 6 .tpc-body .tpc-title { 7 margin-bottom: 1em; 7 margin-bottom: 0.5em; 8 } 9 .tpc-body .tpc-title:first-child { 10 margin-top: 0; 11 } 12 .tpc-body .tpc-title:last-child { 13 margin-bottom: 0; 14 } 15 16 .tpc-content, 17 .tpc-thumbnail { 18 padding-bottom: 1em; 19 } 20 .tpc-thumbnail:last-child { 21 padding-bottom: 0; 22 } 23 24 .tpc-thumbnail > a:hover { 25 opacity: 0.85; 8 26 } 9 27 … … 11 29 .tpc-entry-block + .tpc-entry-block {} 12 30 13 .tpc-body, 31 14 32 .tpc-widget-title { 15 33 padding: 1em 0; 16 34 } 17 .tpc-block .tpc-thumbnail {18 padding-bottom: 1em;19 }20 35 21 .tpc-widget-title + .tpc-entry-block .tpc-body { 22 /* padding-top: 0; */ 23 } 36 .tpc-widget-title + .tpc-entry-block .tpc-body {} 24 37 25 38 .tpc-widget-title h3 { … … 40 53 } 41 54 42 /* Padded template */ 55 /* Default Template */ 56 .tpc-default + .tpc-default { 57 margin-top: 1.5em; 58 } 59 60 /* Padded Template */ 43 61 .tpc-default-padded .tpc-body, 44 62 .tpc-default-padded .tpc-thumbnail { … … 46 64 padding-right: 1em; 47 65 } 66 .tpc-default-padded .tpc-thumbnail { 67 padding-bottom: 1em; 68 } 69 70 /* Bootstrap Template */ 71 .tpc-bootstrap .tpc-entry-block { 72 margin-bottom: 30px; // default bootstrap gutter width 73 } 74 .tpc-bootstrap .row:last-child .tpc-entry-block:last-child { 75 margin-bottom: 0; 76 } -
tea-page-content/tags/1.1.0/assets/js/tea-page-content-admin.js
r1319161 r1384553 15 15 $target.slideToggle('fast'); 16 16 }); 17 18 $('#widgets-right').on('change', '.tpc-template-list', function() { 19 var $this = $(this); 20 var $variablesArea = $('#' + $this.attr('data-variables-area')); 21 var $preloader = $this.closest('.tpc-preloader'); 22 23 $preloader.removeClass('is-hidden').addClass('is-loading'); 24 25 if($.trim($variablesArea.html())) { 26 $variablesArea.slideUp('fast'); 27 } else { 28 $variablesArea.hide(); 29 } 30 31 var data = { 32 'action': 'get_template_variables', 33 'template': $this.val(), 34 'mask': $variablesArea.attr('data-mask-name') 35 }; 36 37 jQuery.post(ajaxurl, data, function(response) { 38 if($.trim(response)) { 39 $variablesArea.html(response).slideDown('fast'); 40 } 41 42 $preloader.removeClass('is-loading'); 43 44 setTimeout(function() { 45 $preloader.addClass('is-hidden'); 46 }, 500); 47 }); 48 }); 17 49 }); 18 50 -
tea-page-content/tags/1.1.0/languages/tea-page-content-ru_RU.po
r1319161 r1384553 6 6 "Project-Id-Version: tea-page-content\n" 7 7 "Report-Msgid-Bugs-To: Translator Name <[email protected]>\n" 8 "POT-Creation-Date: 201 5-12-26 10:51+0400\n"8 "POT-Creation-Date: 2016-04-01 14:34+0400\n" 9 9 "PO-Revision-Date: \n" 10 10 "Last-Translator: \n" … … 19 19 "X-Poedit-SourceCharset: UTF-8\n" 20 20 "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;" 21 "esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2; "22 "_ nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;"23 "_ _ngettext_noop:1,2;_c,_nc:4c,1,2\n"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" 24 24 "X-Poedit-Basepath: ..\n" 25 25 "X-Generator: Poedit 1.8.5\n" 26 26 "X-Poedit-SearchPath-0: .\n" 27 28 #: modules/widget.php:27 29 msgid "Tea Page Content" 30 msgstr "Tea Page Content" 31 32 #: modules/widget.php:29 33 msgid "Allows display any content of any page or post." 34 msgstr "Позволяет отображать любой контент любой записи." 35 36 #: tea-page-content.class.php:170 37 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>This notice appears only once!</b>" 42 msgstr "" 43 "Внимание! Начиная с версии Tea Page Content 1.1, некоторые параметры " 44 "<b>устарели</b>, и будут <b>удалены</b> в одном из следующих релизов. Мы " 45 "рекомендуем ознакомиться с <a href=\"https://wordpress.org/plugins/tea-page-" 46 "content/changelog/\">логом изменений</a>. <b>Это уведомление появляется " 47 "только один раз!</b>" 48 49 #: templates/default-widget-admin-variables-area.php:5 50 msgid "Template Variables" 51 msgstr "Переменные шаблона" 27 52 28 53 #: templates/default-widget-admin.php:3 … … 38 63 msgstr "Шаблон" 39 64 40 #: templates/default-widget-admin.php:5 465 #: templates/default-widget-admin.php:58 41 66 msgid "Order (by date)" 42 67 msgstr "Сортировка (по дате)" 43 68 44 #: templates/default-widget-admin.php: 5869 #: templates/default-widget-admin.php:62 45 70 msgid "Descending" 46 71 msgstr "По убыванию" 47 72 48 #: templates/default-widget-admin.php:6 173 #: templates/default-widget-admin.php:65 49 74 msgid "Ascending" 50 75 msgstr "По возрастанию" 51 76 52 #: templates/default-widget-admin.php:7 053 msgid " Thumbnail"54 msgstr " Миниатюра"77 #: templates/default-widget-admin.php:79 78 msgid "Show page thumbnail" 79 msgstr "Показывать миниатюру" 55 80 56 #: widgets/tea-page-content.php:2457 msgid " Tea Page Content"58 msgstr " Tea Page Content"81 #: templates/default-widget-admin.php:87 82 msgid "Show page title" 83 msgstr "Показывать заголовок страниц" 59 84 60 #: widgets/tea-page-content.php:26 61 msgid "Allows display any content of any page or post." 62 msgstr "Позволяет отображать любой контент любой записи." 85 #: templates/default-widget-admin.php:95 86 msgid "Show page content" 87 msgstr "Показывать контент страниц" 88 89 #: templates/default-widget-admin.php:103 90 msgid "Linked page title (if possible)" 91 msgstr "Линковать заголовки (при возможности)" 92 93 #: templates/default-widget-admin.php:111 94 msgid "Linked page thumbnail (if possible)" 95 msgstr "Линковать миниатюры (при возможности)" 96 97 #~ msgid "" 98 #~ "Warning! Starts from Tea Page Content 1.1 some parameters is " 99 #~ "<b>deprecated</b>, and will be <b>deleted</b> in the next release. We " 100 #~ "strongly recommend you check out the <a href=\"https://wordpress.org/" 101 #~ "plugins/tea-page-content/changelog/\">changelog</a>. <b>This notice " 102 #~ "appears only once!</b>" 103 #~ msgstr "Внимание!" 104 105 #~ msgid "Thumbnail" 106 #~ msgstr "Миниатюра" -
tea-page-content/tags/1.1.0/readme.txt
r1319161 r1384553 1 === Tea Page Content ===1 === Tea Page Widget & Content === 2 2 Contributors: Tsjuder 3 3 Tags: plugin, widget, shortcode, posts, post, pages, page, content 4 4 Requires at least: 4.0 5 Tested up to: 4.4 6 Stable tag: 1. 05 Tested up to: 4.4.2 6 Stable tag: 1.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 10 P owerful plugin that allows create blocks with content of any page, post, etc, and customize look of blocks via templates.10 Plugin that allows create widget or shortcode with content of any post, and customize look of blocks via templates. 11 11 12 12 == Description == 13 13 14 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 padded default. 14 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. 15 16 = Key features = 17 * Very flexible template system 18 * Native support of all post types 19 * Possibility to create your own templates 20 * Developer and user friendly 21 * Easy to use 22 23 = Migration Guides = 24 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. 25 26 = Documentation = 27 You can find primary description at <a href="https://wordpress.org/plugins/tea-page-content/other_notes/">Other Notes</a> tab, and details at <a href="http://tsjuder.github.io/tea-page-content/">Github Page</a>. 15 28 16 29 == Installation == … … 33 46 Yes. But every theme have unique css, and appearance of widget \ shortcode will be depend on theme styles. 34 47 48 = I don't have link to full post. How I can add it? = 49 50 Links to full entry appears automatically - this feature depends of theme settings and Wordpress core. If you have more-tag in post content, or if content length long enough, "read more" link will be available. We don't override this behavior. Use native wordpress hooks for change it. 51 52 = I found a bug or have a suggestion. What I can do? = 53 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. 54 35 55 == Changelog == 36 56 37 = 1.0 = 57 = 1.1.0 = 58 * \+ Native support for all existed post types (and custom too) 59 * \+ Count of entries now passed in template 60 * \+ New feature - template-level variables 61 * \+ New template: Bootstrap 3.x 62 * \+ Added possibility hide title, content and link it. This feature depends of used template (all built-in templates except deprecated supports it) 63 * \- 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 guide 64 * \* CSS for frontend part changed, improved paddings, adds hover effects 65 * \* Global code refactoring. We are friendly for developers! 66 * \* Bug fixes 67 68 = 1.0.0 = 38 69 * First release with basic functionality 39 70 40 71 == Documentation == 41 72 73 = Migration Guide = 74 ** From 1.0.x to 1.1.x ** 75 Since 1.1.x, nothing was deleted. But some options was marked as deprecated. We strongly recommend do these steps: 76 1. If you're using **default padded** template, change it on **default** with layout what you prefer. 77 2. If you're using shortcodes, replace parameter `id` to `posts`. 78 3. If you're using widgets with **turned off** thumbnail option, re-save each of it. 79 42 80 = Shortcodes = 43 There is just one shortcode `tea_page_content`. Below there is an example with all of possible parameters. 44 `[tea_page_content template="default" order="asc" id="12,45,23" thumbnail="false"]` 81 There is just one shortcode `tea_page_content`. Below there is an example with basic parameters. 82 `[tea_page_content template="default" order="asc" posts="12,45,23"]` 83 You also can used template variables (see Templates section at documentation) and options. 45 84 46 85 = Parameters = 47 There is some built-in options. This is thumbnail, order and template.Let's take a closer look:86 There is some built-in options. Let's take a closer look: 48 87 49 * *Thumbnail* allows you enable or disable displaying thumbnail of entry. If you don't want see page thumbnail in widget or shortcode, just uncheck checkbox (for widget) or type `thumbnail="false"` (for shortcode). 50 * *Order* allows you set entries order. All posts and pages will be sorted by date, and you can choose a direction - by ascending or by descending. Sorting by descending is a default behaviour. 88 * *order* allows you set entries order. All posts and pages will be sorted by date, and you can choose a direction - by ascending or by descending. Sorting by descending is a default behaviour. 51 89 * *Template* allows you choose layout which will look as you want. In shortcode just type full name of your template without extension, for example `default` or `your-template-name`. 90 * *show_page_thumbnail* allows you enable or disable displaying thumbnail of entry. If you don't want see page thumbnail, type `show_page_thumbnail="false"`. Default - *true*. 91 * *show_page_content* allows you enable or disable displaying content of entry. Default - *true*. 92 * *show_page_title* allows you enable or disable displaying title of entry. Default - *true*. 93 * *linked_page_title* allows you enable or disable linking title of entry. In other words, title will be link to full article. Default - *false*. 94 * *linked_page_thumbnail* allows you enable or disable linking thumbnail of entry. In other words, thumbnail will be link to full article. Default - *false*. 52 95 53 96 = Creating simplest custom template = … … 78 121 * **link** - Link of entry 79 122 * **id** - Entry ID 80 * **$instance** - Array with user defined and default parameters 123 * **$count** - Count of all passed entries 124 * **$instance** - Array with user defined and default parameters. There is all list of options from self-titled section above. -
tea-page-content/tags/1.1.0/tea-page-content.class.php
r1319161 r1384553 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1. 0.04 * @version 1.1.0 5 5 */ 6 6 7 7 class TeaPageContent { 8 private static $_instance;8 private $_helper; 9 9 10 10 /** 11 * Private constructor11 * Constructor 12 12 * 13 13 * @return void 14 14 */ 15 private function __construct() {} 16 private function __clone() { 17 return self::$_instance; 18 } 19 private function __wakeup() { 20 return self::$_instance; 21 } 22 23 /** 24 * Enter point to the a singleton. 25 * 26 * @return object 27 */ 28 public static function getInstance() { 29 if(is_null(self::$_instance)) { 30 self::$_instance = new self; 31 } 32 33 return self::$_instance; 34 } 15 public function __construct() {} 35 16 36 17 /** … … 40 21 */ 41 22 public function initialize() { 42 if(is_null(self::$_instance)) { 43 self::getInstance(); 44 } 45 46 // load textdomain 23 // Load textdomain 47 24 load_plugin_textdomain('tea-page-content', false, TEA_PAGE_CONTENT_FOLDER . '/languages/'); 48 25 49 26 // Adds filters, actions, etc. 50 add_action('init', array(self::$_instance, 'registerShortcodes')); 51 add_action('widgets_init', array(self::$_instance, 'registerWidgets')); 52 add_filter('tpc_get_params', array(self::$_instance, 'flattenEntries'), 10, 1); 27 add_action('init', array($this, 'registerShortcodes')); 28 add_action('widgets_init', array($this, 'registerWidgets')); 29 30 // Tea Page Content filters 53 31 54 32 // Includes all css, js, etc. 55 add_action('wp_enqueue_scripts', array(self::$_instance, 'includeAssets'), 100, 1); 56 add_action('admin_enqueue_scripts', array(self::$_instance, 'includeAdminAssets'), 100, 1); 33 add_action('wp_enqueue_scripts', array($this, 'includeAssets'), 100, 1); 34 add_action('admin_enqueue_scripts', array($this, 'includeAdminAssets'), 100, 1); 35 36 add_action('wp_ajax_get_template_variables', array($this, 'getTemplateVariablesCallback')); 37 38 add_action('wp_ajax_set_notice_seen', array($this, 'setNoticeSeenCallback')); 39 40 // At first time notice user about possible migration 41 if(!get_option('tpc_deprecated_notice')) { 42 add_action('admin_notices', array($this, 'displayDeprecatedNotice')); 43 } 44 45 $this->_helper = new TeaPageContent_Helper; 57 46 } 58 47 … … 66 55 } 67 56 57 /** 58 * Register Tea Page Content shortcode 59 * 60 * @return void 61 */ 68 62 public function registerShortcodes() { 69 add_shortcode('tea_page_content', array('TeaPageContent_Shortcode s', 'tea_page_content'));63 add_shortcode('tea_page_content', array('TeaPageContent_Shortcode', 'tea_page_content')); 70 64 } 71 65 … … 78 72 */ 79 73 public function includeAdminAssets($hook) { 74 $url = plugins_url('/assets', TEA_PAGE_CONTENT_FILE); 75 80 76 if($hook == 'widgets.php') { 81 $url = plugins_url('/assets', TEA_PAGE_CONTENT_FILE);82 83 77 wp_enqueue_script( 84 78 'tea-page-content-js', 85 79 $url . '/js/tea-page-content-admin.js', 86 80 array('jquery'), 87 '1.0.0',81 TeaPageContent_Config::get('system.versions.scripts'), 88 82 true 89 83 ); … … 93 87 $url . '/css/tea-page-content-admin.css', 94 88 array(), 95 '1.0.0',89 TeaPageContent_Config::get('system.versions.styles'), 96 90 'all' 97 91 ); 98 92 } 93 94 wp_enqueue_script( 95 'tea-page-content-notices-js', 96 $url . '/js/tea-page-content-admin-notices.js', 97 array('jquery'), 98 TeaPageContent_Config::get('system.versions.scripts'), 99 true 100 ); 99 101 } 100 102 … … 107 109 public function includeAssets() { 108 110 $url = plugins_url('/assets', TEA_PAGE_CONTENT_FILE); 109 110 /*wp_enqueue_script(111 'tea-page-content-js',112 $url . '/js/tea-page-content-main.js',113 array('jquery'),114 '1.0.0',115 true116 );*/117 111 118 112 wp_enqueue_style( … … 120 114 $url . '/css/tea-page-content-main.css', 121 115 array(), 122 '1.0.1',116 TeaPageContent_Config::get('system.versions.styles'), 123 117 'all' 124 118 ); … … 126 120 127 121 /** 128 * Filters entries from params of widget's frontend part 129 * Binded to the tpc_get_params hook 122 * Callback for AJAX-action. Gets and returns template variables 123 * by passed template and mask. Mask is unique name of current instance of widget. 124 * This function can be used only in ajax, in other cases it returns nothing. 130 125 * 131 * Here, this function flattens two-dimensional 132 * entries array into one-dimensional 126 * @return void 127 */ 128 public function getTemplateVariablesCallback() { 129 $template = $_POST['template']; 130 $mask = $_POST['mask']; 131 132 $layout = 'default-widget-admin-variables-area'; 133 134 $layoutPath = $this->_helper->getTemplatePath($layout); 135 $variables = $this->_helper->getVariables($template); 136 137 echo $this->_helper->renderTemplate(array( 138 'variables' => $variables, 139 'mask' => $mask 140 ), $layoutPath); 141 142 wp_die(); 143 } 144 145 /** 146 * Callback for AJAX-action. Fires when user closes deprecated notice. 147 * Set up unique option with current version of this plugin. 133 148 * 134 * @param array $params 135 * @return array 149 * This option will be deleted after uninstall. 150 * 151 * @return void 136 152 */ 137 public function flattenEntries($params) { 138 if(isset($params['entries']) && count($params['entries'])) { 139 $entries = &$params['entries']; 153 public function setNoticeSeenCallback() { 154 $version = $_POST['version']; // @todo get version from config 140 155 141 $entries = call_user_func_array('array_merge', $entries); 156 if(!get_option('tpc_deprecated_notice')) { 157 add_option('tpc_deprecated_notice', $version, '', 'no'); 142 158 } 159 } 143 160 144 return $params; 161 /** 162 * Created and print deprecated notice. Ugly, but simple. 163 * Will be recommend check out changelog at wordpress.org 164 * 165 * @todo do something with html in my php 166 * 167 * @return void 168 */ 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 strongly 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 $content = '<div id="tpc-deprecated-notice" class="error notice tpc-deprecated-notice is-dismissible"><p>' . $message . '</p></div>'; 172 173 echo $content; 145 174 } 146 175 } -
tea-page-content/tags/1.1.0/tea-page-content.php
r1319161 r1384553 3 3 Plugin Name: Tea Page Content 4 4 Plugin URI: http://tsjuder.github.io/tea-page-content 5 Description: This plugin allows create most flexible blocks with any content of any page via widgets or shortcodes, and manage layouts of blocks with help of templates.6 Version: 1. 0.05 Description: This plugin allows create blocks with content of any post, and customize look of blocks via templates. Widget, shortcode, all post types is supported. 6 Version: 1.1.0 7 7 Text Domain: tea-page-content 8 8 Domain Path: /languages/ … … 41 41 // Includes a core 42 42 require_once(TEA_PAGE_CONTENT_PATH . '/tea-page-content.class.php'); 43 require_once(TEA_PAGE_CONTENT_PATH . '/helpers/helper.php');44 43 45 // Includes a widget interface 46 require_once(TEA_PAGE_CONTENT_PATH . '/widgets/tea-page-content.php'); 44 // Includes a classes 45 require_once(TEA_PAGE_CONTENT_PATH . '/classes/config.class.php'); 46 require_once(TEA_PAGE_CONTENT_PATH . '/classes/helper.class.php'); 47 47 48 // Includes a shortcodes 49 require_once(TEA_PAGE_CONTENT_PATH . '/shortcodes/tea-page-content.php'); 48 // Includes a modules 49 require_once(TEA_PAGE_CONTENT_PATH . '/modules/shortcode.php'); 50 require_once(TEA_PAGE_CONTENT_PATH . '/modules/widget.php'); 50 51 51 52 // Gets an instance 52 $ engine = TeaPageContent::getInstance();53 $tpcEngine = new TeaPageContent; 53 54 54 add_action('plugins_loaded', array($ engine, 'initialize'));55 add_action('plugins_loaded', array($tpcEngine, 'initialize')); -
tea-page-content/tags/1.1.0/templates/default-padded.php
r1319161 r1384553 4 4 <?php foreach ($entries as $key => $entry) : ?> 5 5 <article class="tpc-entry-block"> 6 <?php if(isset($instance['thumbnail']) && $instance['thumbnail'] && $entry['thumbnail']) : ?> 6 <?php if(isset($instance['show_page_thumbnail']) && $instance['show_page_thumbnail'] && $entry['thumbnail']) : ?> 7 <?php if(array_key_exists('thumbnail', $instance) && !$instance['thumbnail']) : 8 // @deprecated thumbnail param since 1.1 9 else : ?> 7 10 <div class="tpc-thumbnail"> 8 11 <?php echo $entry['thumbnail'] ?> 9 12 </div> 13 <?php endif; ?> 10 14 <?php endif; ?> 11 15 -
tea-page-content/tags/1.1.0/templates/default-widget-admin.php
r1319161 r1384553 1 1 <p> 2 <label for="<?php echo $bind->get_field_id('title') ;?>">2 <label for="<?php echo $bind->get_field_id('title') ?>"> 3 3 <?php _e('Title', 'tea-page-content'); ?>: 4 4 </label> 5 <input class="widefat" type="text" id="<?php echo $bind->get_field_id('title') ; ?>" name="<?php echo $bind->get_field_name('title'); ?>" value="<?php echo $instance['title'];?>" />5 <input class="widefat" type="text" id="<?php echo $bind->get_field_id('title') ?>" name="<?php echo $bind->get_field_name('title') ?>" value="<?php echo $instance['title'] ?>" /> 6 6 </p> 7 7 … … 25 25 <?php $checked = in_array($postData['id'], $instance['posts']) ? 'checked' : ''; ?> 26 26 <label> 27 <input type="checkbox" name="<?php echo $bind->get_field_name('posts') ; ?>[]" id="<?php echo $bind->get_field_id('posts');?>" value="<?php echo $postData['id'] ?>" <?php echo $checked ?> />27 <input type="checkbox" name="<?php echo $bind->get_field_name('posts') ?>[]" id="<?php echo $bind->get_field_id('posts') ?>" value="<?php echo $postData['id'] ?>" <?php echo $checked ?> /> 28 28 <span><?php echo $postData['title'] ?></span> 29 29 </label> … … 36 36 <?php endif; ?> 37 37 38 <p >39 <label for="<?php echo $bind->get_field_id('template') ;?>">38 <p class="tpc-preloader is-hidden"> 39 <label for="<?php echo $bind->get_field_id('template') ?>"> 40 40 <?php _e('Template', 'tea-page-content'); ?>: 41 41 </label> 42 <select class="widefat " id="<?php echo $bind->get_field_id('template'); ?>" name="<?php echo $bind->get_field_name('template'); ?>">42 <select class="widefat tpc-template-list" data-variables-area="tpc-<?php echo $bind->get_field_id('template-variables') ?>-wrapper" id="<?php echo $bind->get_field_id('template') ?>" name="<?php echo $bind->get_field_name('template') ?>" autocomplete="off"> 43 43 <?php foreach ($templates as $alias) : ?> 44 44 <?php $selected = $alias == $instance['template'] ? 'selected' : ''; ?> … … 50 50 </p> 51 51 52 <div class="tpc-template-params" id="tpc-<?php echo $bind->get_field_id('template-variables') ?>-wrapper" data-mask-name="<?php echo $bind->get_field_name('{mask}') ?>"> 53 <?php echo $partials['template_variables'] ?> 54 </div> 55 52 56 <p> 53 <label for="<?php echo $bind->get_field_id('order') ;?>">57 <label for="<?php echo $bind->get_field_id('order') ?>"> 54 58 <?php _e('Order (by date)', 'tea-page-content'); ?>: 55 59 </label> 56 <select class="widefat" id="<?php echo $bind->get_field_id('order') ; ?>" name="<?php echo $bind->get_field_name('order');?>">60 <select class="widefat" id="<?php echo $bind->get_field_id('order') ?>" name="<?php echo $bind->get_field_name('order') ?>"> 57 61 <option value="desc" <?php if($instance['order'] == 'desc') : echo 'selected'; endif; ?>> 58 62 <?php _e('Descending', 'tea-page-content') ?> … … 65 69 66 70 <p> 67 <label for="<?php echo $bind->get_field_id('thumbnail'); ?>"> 68 <?php $checked = $instance['thumbnail'] ? 'checked' : ''; ?> 69 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('thumbnail'); ?>" name="<?php echo $bind->get_field_name('thumbnail'); ?>" value="1" <?php echo $checked ?> /> 70 <span><?php _e('Thumbnail', 'tea-page-content'); ?></span> 71 <label for="<?php echo $bind->get_field_id('show_page_thumbnail'); ?>"> 72 <?php 73 $checked = $instance['show_page_thumbnail'] ? 'checked' : ''; 74 75 // @deprecated since 1.1 76 if(array_key_exists('thumbnail', $instance) && !$instance['thumbnail']) $checked = ''; 77 ?> 78 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('show_page_thumbnail'); ?>" name="<?php echo $bind->get_field_name('show_page_thumbnail'); ?>" value="1" <?php echo $checked ?> /> 79 <span><?php _e('Show page thumbnail', 'tea-page-content'); ?></span> 80 </label> 81 82 <br /> 83 84 <label for="<?php echo $bind->get_field_id('show_page_title'); ?>"> 85 <?php $checked = $instance['show_page_title'] ? 'checked' : ''; ?> 86 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('show_page_title'); ?>" name="<?php echo $bind->get_field_name('show_page_title'); ?>" value="1" <?php echo $checked ?> /> 87 <span><?php _e('Show page title', 'tea-page-content'); ?></span> 88 </label> 89 90 <br /> 91 92 <label for="<?php echo $bind->get_field_id('show_page_content'); ?>"> 93 <?php $checked = $instance['show_page_content'] ? 'checked' : ''; ?> 94 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('show_page_content'); ?>" name="<?php echo $bind->get_field_name('show_page_content'); ?>" value="1" <?php echo $checked ?> /> 95 <span><?php _e('Show page content', 'tea-page-content'); ?></span> 96 </label> 97 98 <br /> 99 100 <label for="<?php echo $bind->get_field_id('linked_page_title'); ?>"> 101 <?php $checked = $instance['linked_page_title'] ? 'checked' : ''; ?> 102 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('linked_page_title'); ?>" name="<?php echo $bind->get_field_name('linked_page_title'); ?>" value="1" <?php echo $checked ?> /> 103 <span><?php _e('Linked page title (if possible)', 'tea-page-content'); ?></span> 104 </label> 105 106 <br /> 107 108 <label for="<?php echo $bind->get_field_id('linked_page_thumbnail'); ?>"> 109 <?php $checked = $instance['linked_page_thumbnail'] ? 'checked' : ''; ?> 110 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('linked_page_thumbnail'); ?>" name="<?php echo $bind->get_field_name('linked_page_thumbnail'); ?>" value="1" <?php echo $checked ?> /> 111 <span><?php _e('Linked page thumbnail (if possible)', 'tea-page-content'); ?></span> 71 112 </label> 72 113 </p> -
tea-page-content/tags/1.1.0/templates/default.php
r1319161 r1384553 1 <?php if(isset($entries) && count($entries)) : ?> 1 <?php 2 /** 3 * @param is-padded checkbox 0 4 */ 2 5 3 <section class="tpc-block tpc-default"> 6 // prevention for old version of this plugin, @deprecated since 1.1 7 $isPadded = false; 8 if(isset($template_variables['is-padded']) && $template_variables['is-padded']) { 9 $isPadded = true; 10 } 11 ?> 12 <?php if(isset($entries) && $count) : ?> 13 14 <section class="tpc-block tpc-default<?php if($isPadded) echo '-padded'; ?>"> 4 15 <?php foreach ($entries as $key => $entry) : ?> 5 16 <article class="tpc-entry-block"> 6 <?php if(isset($instance['thumbnail']) && $instance['thumbnail'] !== 'false' && $entry['thumbnail']) : ?> 7 <?php echo $entry['thumbnail'] ?> 17 <?php if(isset($instance['show_page_thumbnail']) && $instance['show_page_thumbnail'] && $entry['thumbnail']) : ?> 18 <?php if(array_key_exists('thumbnail', $instance) && !$instance['thumbnail']) : 19 // @deprecated thumbnail param since 1.1 20 else : ?> 21 <div class="tpc-thumbnail"> 22 <?php if($instance['linked_page_thumbnail'] && $entry['link']) : ?> 23 <a href="<?php echo $entry['link'] ?>"><?php echo $entry['thumbnail'] ?></a> 24 <?php else : ?> 25 <?php echo $entry['thumbnail'] ?> 26 <?php endif; ?> 27 </div> 28 <?php endif; ?> 8 29 <?php endif; ?> 9 30 31 <?php if($instance['show_page_title'] || $instance['show_page_content']) : ?> 10 32 <div class="tpc-body"> 11 <h3 class="tpc-title"><?php echo $entry['title'] ?></h3> 12 <div class="tpc-content post-content"> 13 <?php echo $entry['content'] ?> 14 </div> 33 <?php if($instance['show_page_title']) : ?> 34 <h3 class="tpc-title"> 35 <?php if($instance['linked_page_title'] && $entry['link']) : ?> 36 <a href="<?php echo $entry['link'] ?>"><?php echo $entry['title'] ?></a> 37 <?php else : ?> 38 <?php echo $entry['title'] ?> 39 <?php endif; ?> 40 </h3> 41 <?php endif; ?> 42 43 <?php if($instance['show_page_content']) : ?> 44 <div class="tpc-content post-content"> 45 <?php echo $entry['content'] ?> 46 </div> 47 <?php endif; ?> 15 48 </div> 49 <?php endif; ?> 16 50 17 51 </article> -
tea-page-content/trunk/assets/css/tea-page-content-admin.css
r1319161 r1384553 83 83 margin-left: 10px; 84 84 } 85 .iqbc-mods-list label { 85 86 .tpc-template-params hr { 87 margin: 0; 88 } 89 90 .tpc-preloader { 91 position: relative; 92 } 93 .tpc-preloader:before { 94 content: ""; 86 95 display: block; 87 float: left; 88 clear: both; 89 width: 100%; 96 position: absolute; 97 98 top: 0; 99 left: 0; 100 right: 0; 101 bottom: 0; 102 103 opacity: 0; 104 105 transition: opacity 500ms ease; 106 -webkit-transition: opacity 500ms ease; 107 -moz-transition: opacity 500ms ease; 108 -ms-transition: opacity 500ms ease; 109 -o-transition: opacity 500ms ease; 110 111 z-index: 1000; 112 113 background-image: url(/wp-admin/images/spinner-2x.gif); 114 background-color: rgba(255,255,255,0.4); 115 background-position: center center; 116 background-repeat: no-repeat; 90 117 } 91 .iqbc-mods-list label span { 92 display: block; 93 white-space: nowrap; 94 overflow: hidden; 95 96 text-overflow: ellipsis; 118 .tpc-preloader.is-loading {} 119 .tpc-preloader.is-hidden:before { 120 z-index: -1000; 97 121 } 98 .iqbc-mods-list label input[type=checkbox] { 99 float: left; 100 margin-top: 2px; 122 .tpc-preloader.is-loading:before { 123 opacity: 1; 101 124 } 102 .iqbc-mods-list .col {103 width: 20%;104 float: left;105 }106 .iqbc-mods-list .submit,107 .iqbc-mods-list > p {108 clear: both;109 } -
tea-page-content/trunk/assets/css/tea-page-content-main.css
r1319161 r1384553 5 5 6 6 .tpc-body .tpc-title { 7 margin-bottom: 1em; 7 margin-bottom: 0.5em; 8 } 9 .tpc-body .tpc-title:first-child { 10 margin-top: 0; 11 } 12 .tpc-body .tpc-title:last-child { 13 margin-bottom: 0; 14 } 15 16 .tpc-content, 17 .tpc-thumbnail { 18 padding-bottom: 1em; 19 } 20 .tpc-thumbnail:last-child { 21 padding-bottom: 0; 22 } 23 24 .tpc-thumbnail > a:hover { 25 opacity: 0.85; 8 26 } 9 27 … … 11 29 .tpc-entry-block + .tpc-entry-block {} 12 30 13 .tpc-body, 31 14 32 .tpc-widget-title { 15 33 padding: 1em 0; 16 34 } 17 .tpc-block .tpc-thumbnail {18 padding-bottom: 1em;19 }20 35 21 .tpc-widget-title + .tpc-entry-block .tpc-body { 22 /* padding-top: 0; */ 23 } 36 .tpc-widget-title + .tpc-entry-block .tpc-body {} 24 37 25 38 .tpc-widget-title h3 { … … 40 53 } 41 54 42 /* Padded template */ 55 /* Default Template */ 56 .tpc-default + .tpc-default { 57 margin-top: 1.5em; 58 } 59 60 /* Padded Template */ 43 61 .tpc-default-padded .tpc-body, 44 62 .tpc-default-padded .tpc-thumbnail { … … 46 64 padding-right: 1em; 47 65 } 66 .tpc-default-padded .tpc-thumbnail { 67 padding-bottom: 1em; 68 } 69 70 /* Bootstrap Template */ 71 .tpc-bootstrap .tpc-entry-block { 72 margin-bottom: 30px; // default bootstrap gutter width 73 } 74 .tpc-bootstrap .row:last-child .tpc-entry-block:last-child { 75 margin-bottom: 0; 76 } -
tea-page-content/trunk/assets/js/tea-page-content-admin.js
r1319161 r1384553 15 15 $target.slideToggle('fast'); 16 16 }); 17 18 $('#widgets-right').on('change', '.tpc-template-list', function() { 19 var $this = $(this); 20 var $variablesArea = $('#' + $this.attr('data-variables-area')); 21 var $preloader = $this.closest('.tpc-preloader'); 22 23 $preloader.removeClass('is-hidden').addClass('is-loading'); 24 25 if($.trim($variablesArea.html())) { 26 $variablesArea.slideUp('fast'); 27 } else { 28 $variablesArea.hide(); 29 } 30 31 var data = { 32 'action': 'get_template_variables', 33 'template': $this.val(), 34 'mask': $variablesArea.attr('data-mask-name') 35 }; 36 37 jQuery.post(ajaxurl, data, function(response) { 38 if($.trim(response)) { 39 $variablesArea.html(response).slideDown('fast'); 40 } 41 42 $preloader.removeClass('is-loading'); 43 44 setTimeout(function() { 45 $preloader.addClass('is-hidden'); 46 }, 500); 47 }); 48 }); 17 49 }); 18 50 -
tea-page-content/trunk/languages/tea-page-content-ru_RU.po
r1319161 r1384553 6 6 "Project-Id-Version: tea-page-content\n" 7 7 "Report-Msgid-Bugs-To: Translator Name <[email protected]>\n" 8 "POT-Creation-Date: 201 5-12-26 10:51+0400\n"8 "POT-Creation-Date: 2016-04-01 14:34+0400\n" 9 9 "PO-Revision-Date: \n" 10 10 "Last-Translator: \n" … … 19 19 "X-Poedit-SourceCharset: UTF-8\n" 20 20 "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;" 21 "esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2; "22 "_ nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;"23 "_ _ngettext_noop:1,2;_c,_nc:4c,1,2\n"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" 24 24 "X-Poedit-Basepath: ..\n" 25 25 "X-Generator: Poedit 1.8.5\n" 26 26 "X-Poedit-SearchPath-0: .\n" 27 28 #: modules/widget.php:27 29 msgid "Tea Page Content" 30 msgstr "Tea Page Content" 31 32 #: modules/widget.php:29 33 msgid "Allows display any content of any page or post." 34 msgstr "Позволяет отображать любой контент любой записи." 35 36 #: tea-page-content.class.php:170 37 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>This notice appears only once!</b>" 42 msgstr "" 43 "Внимание! Начиная с версии Tea Page Content 1.1, некоторые параметры " 44 "<b>устарели</b>, и будут <b>удалены</b> в одном из следующих релизов. Мы " 45 "рекомендуем ознакомиться с <a href=\"https://wordpress.org/plugins/tea-page-" 46 "content/changelog/\">логом изменений</a>. <b>Это уведомление появляется " 47 "только один раз!</b>" 48 49 #: templates/default-widget-admin-variables-area.php:5 50 msgid "Template Variables" 51 msgstr "Переменные шаблона" 27 52 28 53 #: templates/default-widget-admin.php:3 … … 38 63 msgstr "Шаблон" 39 64 40 #: templates/default-widget-admin.php:5 465 #: templates/default-widget-admin.php:58 41 66 msgid "Order (by date)" 42 67 msgstr "Сортировка (по дате)" 43 68 44 #: templates/default-widget-admin.php: 5869 #: templates/default-widget-admin.php:62 45 70 msgid "Descending" 46 71 msgstr "По убыванию" 47 72 48 #: templates/default-widget-admin.php:6 173 #: templates/default-widget-admin.php:65 49 74 msgid "Ascending" 50 75 msgstr "По возрастанию" 51 76 52 #: templates/default-widget-admin.php:7 053 msgid " Thumbnail"54 msgstr " Миниатюра"77 #: templates/default-widget-admin.php:79 78 msgid "Show page thumbnail" 79 msgstr "Показывать миниатюру" 55 80 56 #: widgets/tea-page-content.php:2457 msgid " Tea Page Content"58 msgstr " Tea Page Content"81 #: templates/default-widget-admin.php:87 82 msgid "Show page title" 83 msgstr "Показывать заголовок страниц" 59 84 60 #: widgets/tea-page-content.php:26 61 msgid "Allows display any content of any page or post." 62 msgstr "Позволяет отображать любой контент любой записи." 85 #: templates/default-widget-admin.php:95 86 msgid "Show page content" 87 msgstr "Показывать контент страниц" 88 89 #: templates/default-widget-admin.php:103 90 msgid "Linked page title (if possible)" 91 msgstr "Линковать заголовки (при возможности)" 92 93 #: templates/default-widget-admin.php:111 94 msgid "Linked page thumbnail (if possible)" 95 msgstr "Линковать миниатюры (при возможности)" 96 97 #~ msgid "" 98 #~ "Warning! Starts from Tea Page Content 1.1 some parameters is " 99 #~ "<b>deprecated</b>, and will be <b>deleted</b> in the next release. We " 100 #~ "strongly recommend you check out the <a href=\"https://wordpress.org/" 101 #~ "plugins/tea-page-content/changelog/\">changelog</a>. <b>This notice " 102 #~ "appears only once!</b>" 103 #~ msgstr "Внимание!" 104 105 #~ msgid "Thumbnail" 106 #~ msgstr "Миниатюра" -
tea-page-content/trunk/readme.txt
r1319161 r1384553 1 === Tea Page Content ===1 === Tea Page Widget & Content === 2 2 Contributors: Tsjuder 3 3 Tags: plugin, widget, shortcode, posts, post, pages, page, content 4 4 Requires at least: 4.0 5 Tested up to: 4.4 6 Stable tag: 1. 05 Tested up to: 4.4.2 6 Stable tag: 1.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 10 P owerful plugin that allows create blocks with content of any page, post, etc, and customize look of blocks via templates.10 Plugin that allows create widget or shortcode with content of any post, and customize look of blocks via templates. 11 11 12 12 == Description == 13 13 14 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 padded default. 14 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. 15 16 = Key features = 17 * Very flexible template system 18 * Native support of all post types 19 * Possibility to create your own templates 20 * Developer and user friendly 21 * Easy to use 22 23 = Migration Guides = 24 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. 25 26 = Documentation = 27 You can find primary description at <a href="https://wordpress.org/plugins/tea-page-content/other_notes/">Other Notes</a> tab, and details at <a href="http://tsjuder.github.io/tea-page-content/">Github Page</a>. 15 28 16 29 == Installation == … … 33 46 Yes. But every theme have unique css, and appearance of widget \ shortcode will be depend on theme styles. 34 47 48 = I don't have link to full post. How I can add it? = 49 50 Links to full entry appears automatically - this feature depends of theme settings and Wordpress core. If you have more-tag in post content, or if content length long enough, "read more" link will be available. We don't override this behavior. Use native wordpress hooks for change it. 51 52 = I found a bug or have a suggestion. What I can do? = 53 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. 54 35 55 == Changelog == 36 56 37 = 1.0 = 57 = 1.1.0 = 58 * \+ Native support for all existed post types (and custom too) 59 * \+ Count of entries now passed in template 60 * \+ New feature - template-level variables 61 * \+ New template: Bootstrap 3.x 62 * \+ Added possibility hide title, content and link it. This feature depends of used template (all built-in templates except deprecated supports it) 63 * \- 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 guide 64 * \* CSS for frontend part changed, improved paddings, adds hover effects 65 * \* Global code refactoring. We are friendly for developers! 66 * \* Bug fixes 67 68 = 1.0.0 = 38 69 * First release with basic functionality 39 70 40 71 == Documentation == 41 72 73 = Migration Guide = 74 ** From 1.0.x to 1.1.x ** 75 Since 1.1.x, nothing was deleted. But some options was marked as deprecated. We strongly recommend do these steps: 76 1. If you're using **default padded** template, change it on **default** with layout what you prefer. 77 2. If you're using shortcodes, replace parameter `id` to `posts`. 78 3. If you're using widgets with **turned off** thumbnail option, re-save each of it. 79 42 80 = Shortcodes = 43 There is just one shortcode `tea_page_content`. Below there is an example with all of possible parameters. 44 `[tea_page_content template="default" order="asc" id="12,45,23" thumbnail="false"]` 81 There is just one shortcode `tea_page_content`. Below there is an example with basic parameters. 82 `[tea_page_content template="default" order="asc" posts="12,45,23"]` 83 You also can used template variables (see Templates section at documentation) and options. 45 84 46 85 = Parameters = 47 There is some built-in options. This is thumbnail, order and template.Let's take a closer look:86 There is some built-in options. Let's take a closer look: 48 87 49 * *Thumbnail* allows you enable or disable displaying thumbnail of entry. If you don't want see page thumbnail in widget or shortcode, just uncheck checkbox (for widget) or type `thumbnail="false"` (for shortcode). 50 * *Order* allows you set entries order. All posts and pages will be sorted by date, and you can choose a direction - by ascending or by descending. Sorting by descending is a default behaviour. 88 * *order* allows you set entries order. All posts and pages will be sorted by date, and you can choose a direction - by ascending or by descending. Sorting by descending is a default behaviour. 51 89 * *Template* allows you choose layout which will look as you want. In shortcode just type full name of your template without extension, for example `default` or `your-template-name`. 90 * *show_page_thumbnail* allows you enable or disable displaying thumbnail of entry. If you don't want see page thumbnail, type `show_page_thumbnail="false"`. Default - *true*. 91 * *show_page_content* allows you enable or disable displaying content of entry. Default - *true*. 92 * *show_page_title* allows you enable or disable displaying title of entry. Default - *true*. 93 * *linked_page_title* allows you enable or disable linking title of entry. In other words, title will be link to full article. Default - *false*. 94 * *linked_page_thumbnail* allows you enable or disable linking thumbnail of entry. In other words, thumbnail will be link to full article. Default - *false*. 52 95 53 96 = Creating simplest custom template = … … 78 121 * **link** - Link of entry 79 122 * **id** - Entry ID 80 * **$instance** - Array with user defined and default parameters 123 * **$count** - Count of all passed entries 124 * **$instance** - Array with user defined and default parameters. There is all list of options from self-titled section above. -
tea-page-content/trunk/tea-page-content.class.php
r1319161 r1384553 2 2 /** 3 3 * @package Tea Page Content 4 * @version 1. 0.04 * @version 1.1.0 5 5 */ 6 6 7 7 class TeaPageContent { 8 private static $_instance;8 private $_helper; 9 9 10 10 /** 11 * Private constructor11 * Constructor 12 12 * 13 13 * @return void 14 14 */ 15 private function __construct() {} 16 private function __clone() { 17 return self::$_instance; 18 } 19 private function __wakeup() { 20 return self::$_instance; 21 } 22 23 /** 24 * Enter point to the a singleton. 25 * 26 * @return object 27 */ 28 public static function getInstance() { 29 if(is_null(self::$_instance)) { 30 self::$_instance = new self; 31 } 32 33 return self::$_instance; 34 } 15 public function __construct() {} 35 16 36 17 /** … … 40 21 */ 41 22 public function initialize() { 42 if(is_null(self::$_instance)) { 43 self::getInstance(); 44 } 45 46 // load textdomain 23 // Load textdomain 47 24 load_plugin_textdomain('tea-page-content', false, TEA_PAGE_CONTENT_FOLDER . '/languages/'); 48 25 49 26 // Adds filters, actions, etc. 50 add_action('init', array(self::$_instance, 'registerShortcodes')); 51 add_action('widgets_init', array(self::$_instance, 'registerWidgets')); 52 add_filter('tpc_get_params', array(self::$_instance, 'flattenEntries'), 10, 1); 27 add_action('init', array($this, 'registerShortcodes')); 28 add_action('widgets_init', array($this, 'registerWidgets')); 29 30 // Tea Page Content filters 53 31 54 32 // Includes all css, js, etc. 55 add_action('wp_enqueue_scripts', array(self::$_instance, 'includeAssets'), 100, 1); 56 add_action('admin_enqueue_scripts', array(self::$_instance, 'includeAdminAssets'), 100, 1); 33 add_action('wp_enqueue_scripts', array($this, 'includeAssets'), 100, 1); 34 add_action('admin_enqueue_scripts', array($this, 'includeAdminAssets'), 100, 1); 35 36 add_action('wp_ajax_get_template_variables', array($this, 'getTemplateVariablesCallback')); 37 38 add_action('wp_ajax_set_notice_seen', array($this, 'setNoticeSeenCallback')); 39 40 // At first time notice user about possible migration 41 if(!get_option('tpc_deprecated_notice')) { 42 add_action('admin_notices', array($this, 'displayDeprecatedNotice')); 43 } 44 45 $this->_helper = new TeaPageContent_Helper; 57 46 } 58 47 … … 66 55 } 67 56 57 /** 58 * Register Tea Page Content shortcode 59 * 60 * @return void 61 */ 68 62 public function registerShortcodes() { 69 add_shortcode('tea_page_content', array('TeaPageContent_Shortcode s', 'tea_page_content'));63 add_shortcode('tea_page_content', array('TeaPageContent_Shortcode', 'tea_page_content')); 70 64 } 71 65 … … 78 72 */ 79 73 public function includeAdminAssets($hook) { 74 $url = plugins_url('/assets', TEA_PAGE_CONTENT_FILE); 75 80 76 if($hook == 'widgets.php') { 81 $url = plugins_url('/assets', TEA_PAGE_CONTENT_FILE);82 83 77 wp_enqueue_script( 84 78 'tea-page-content-js', 85 79 $url . '/js/tea-page-content-admin.js', 86 80 array('jquery'), 87 '1.0.0',81 TeaPageContent_Config::get('system.versions.scripts'), 88 82 true 89 83 ); … … 93 87 $url . '/css/tea-page-content-admin.css', 94 88 array(), 95 '1.0.0',89 TeaPageContent_Config::get('system.versions.styles'), 96 90 'all' 97 91 ); 98 92 } 93 94 wp_enqueue_script( 95 'tea-page-content-notices-js', 96 $url . '/js/tea-page-content-admin-notices.js', 97 array('jquery'), 98 TeaPageContent_Config::get('system.versions.scripts'), 99 true 100 ); 99 101 } 100 102 … … 107 109 public function includeAssets() { 108 110 $url = plugins_url('/assets', TEA_PAGE_CONTENT_FILE); 109 110 /*wp_enqueue_script(111 'tea-page-content-js',112 $url . '/js/tea-page-content-main.js',113 array('jquery'),114 '1.0.0',115 true116 );*/117 111 118 112 wp_enqueue_style( … … 120 114 $url . '/css/tea-page-content-main.css', 121 115 array(), 122 '1.0.1',116 TeaPageContent_Config::get('system.versions.styles'), 123 117 'all' 124 118 ); … … 126 120 127 121 /** 128 * Filters entries from params of widget's frontend part 129 * Binded to the tpc_get_params hook 122 * Callback for AJAX-action. Gets and returns template variables 123 * by passed template and mask. Mask is unique name of current instance of widget. 124 * This function can be used only in ajax, in other cases it returns nothing. 130 125 * 131 * Here, this function flattens two-dimensional 132 * entries array into one-dimensional 126 * @return void 127 */ 128 public function getTemplateVariablesCallback() { 129 $template = $_POST['template']; 130 $mask = $_POST['mask']; 131 132 $layout = 'default-widget-admin-variables-area'; 133 134 $layoutPath = $this->_helper->getTemplatePath($layout); 135 $variables = $this->_helper->getVariables($template); 136 137 echo $this->_helper->renderTemplate(array( 138 'variables' => $variables, 139 'mask' => $mask 140 ), $layoutPath); 141 142 wp_die(); 143 } 144 145 /** 146 * Callback for AJAX-action. Fires when user closes deprecated notice. 147 * Set up unique option with current version of this plugin. 133 148 * 134 * @param array $params 135 * @return array 149 * This option will be deleted after uninstall. 150 * 151 * @return void 136 152 */ 137 public function flattenEntries($params) { 138 if(isset($params['entries']) && count($params['entries'])) { 139 $entries = &$params['entries']; 153 public function setNoticeSeenCallback() { 154 $version = $_POST['version']; // @todo get version from config 140 155 141 $entries = call_user_func_array('array_merge', $entries); 156 if(!get_option('tpc_deprecated_notice')) { 157 add_option('tpc_deprecated_notice', $version, '', 'no'); 142 158 } 159 } 143 160 144 return $params; 161 /** 162 * Created and print deprecated notice. Ugly, but simple. 163 * Will be recommend check out changelog at wordpress.org 164 * 165 * @todo do something with html in my php 166 * 167 * @return void 168 */ 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 strongly 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 $content = '<div id="tpc-deprecated-notice" class="error notice tpc-deprecated-notice is-dismissible"><p>' . $message . '</p></div>'; 172 173 echo $content; 145 174 } 146 175 } -
tea-page-content/trunk/tea-page-content.php
r1319161 r1384553 3 3 Plugin Name: Tea Page Content 4 4 Plugin URI: http://tsjuder.github.io/tea-page-content 5 Description: This plugin allows create most flexible blocks with any content of any page via widgets or shortcodes, and manage layouts of blocks with help of templates.6 Version: 1. 0.05 Description: This plugin allows create blocks with content of any post, and customize look of blocks via templates. Widget, shortcode, all post types is supported. 6 Version: 1.1.0 7 7 Text Domain: tea-page-content 8 8 Domain Path: /languages/ … … 41 41 // Includes a core 42 42 require_once(TEA_PAGE_CONTENT_PATH . '/tea-page-content.class.php'); 43 require_once(TEA_PAGE_CONTENT_PATH . '/helpers/helper.php');44 43 45 // Includes a widget interface 46 require_once(TEA_PAGE_CONTENT_PATH . '/widgets/tea-page-content.php'); 44 // Includes a classes 45 require_once(TEA_PAGE_CONTENT_PATH . '/classes/config.class.php'); 46 require_once(TEA_PAGE_CONTENT_PATH . '/classes/helper.class.php'); 47 47 48 // Includes a shortcodes 49 require_once(TEA_PAGE_CONTENT_PATH . '/shortcodes/tea-page-content.php'); 48 // Includes a modules 49 require_once(TEA_PAGE_CONTENT_PATH . '/modules/shortcode.php'); 50 require_once(TEA_PAGE_CONTENT_PATH . '/modules/widget.php'); 50 51 51 52 // Gets an instance 52 $ engine = TeaPageContent::getInstance();53 $tpcEngine = new TeaPageContent; 53 54 54 add_action('plugins_loaded', array($ engine, 'initialize'));55 add_action('plugins_loaded', array($tpcEngine, 'initialize')); -
tea-page-content/trunk/templates/default-padded.php
r1319161 r1384553 4 4 <?php foreach ($entries as $key => $entry) : ?> 5 5 <article class="tpc-entry-block"> 6 <?php if(isset($instance['thumbnail']) && $instance['thumbnail'] && $entry['thumbnail']) : ?> 6 <?php if(isset($instance['show_page_thumbnail']) && $instance['show_page_thumbnail'] && $entry['thumbnail']) : ?> 7 <?php if(array_key_exists('thumbnail', $instance) && !$instance['thumbnail']) : 8 // @deprecated thumbnail param since 1.1 9 else : ?> 7 10 <div class="tpc-thumbnail"> 8 11 <?php echo $entry['thumbnail'] ?> 9 12 </div> 13 <?php endif; ?> 10 14 <?php endif; ?> 11 15 -
tea-page-content/trunk/templates/default-widget-admin.php
r1319161 r1384553 1 1 <p> 2 <label for="<?php echo $bind->get_field_id('title') ;?>">2 <label for="<?php echo $bind->get_field_id('title') ?>"> 3 3 <?php _e('Title', 'tea-page-content'); ?>: 4 4 </label> 5 <input class="widefat" type="text" id="<?php echo $bind->get_field_id('title') ; ?>" name="<?php echo $bind->get_field_name('title'); ?>" value="<?php echo $instance['title'];?>" />5 <input class="widefat" type="text" id="<?php echo $bind->get_field_id('title') ?>" name="<?php echo $bind->get_field_name('title') ?>" value="<?php echo $instance['title'] ?>" /> 6 6 </p> 7 7 … … 25 25 <?php $checked = in_array($postData['id'], $instance['posts']) ? 'checked' : ''; ?> 26 26 <label> 27 <input type="checkbox" name="<?php echo $bind->get_field_name('posts') ; ?>[]" id="<?php echo $bind->get_field_id('posts');?>" value="<?php echo $postData['id'] ?>" <?php echo $checked ?> />27 <input type="checkbox" name="<?php echo $bind->get_field_name('posts') ?>[]" id="<?php echo $bind->get_field_id('posts') ?>" value="<?php echo $postData['id'] ?>" <?php echo $checked ?> /> 28 28 <span><?php echo $postData['title'] ?></span> 29 29 </label> … … 36 36 <?php endif; ?> 37 37 38 <p >39 <label for="<?php echo $bind->get_field_id('template') ;?>">38 <p class="tpc-preloader is-hidden"> 39 <label for="<?php echo $bind->get_field_id('template') ?>"> 40 40 <?php _e('Template', 'tea-page-content'); ?>: 41 41 </label> 42 <select class="widefat " id="<?php echo $bind->get_field_id('template'); ?>" name="<?php echo $bind->get_field_name('template'); ?>">42 <select class="widefat tpc-template-list" data-variables-area="tpc-<?php echo $bind->get_field_id('template-variables') ?>-wrapper" id="<?php echo $bind->get_field_id('template') ?>" name="<?php echo $bind->get_field_name('template') ?>" autocomplete="off"> 43 43 <?php foreach ($templates as $alias) : ?> 44 44 <?php $selected = $alias == $instance['template'] ? 'selected' : ''; ?> … … 50 50 </p> 51 51 52 <div class="tpc-template-params" id="tpc-<?php echo $bind->get_field_id('template-variables') ?>-wrapper" data-mask-name="<?php echo $bind->get_field_name('{mask}') ?>"> 53 <?php echo $partials['template_variables'] ?> 54 </div> 55 52 56 <p> 53 <label for="<?php echo $bind->get_field_id('order') ;?>">57 <label for="<?php echo $bind->get_field_id('order') ?>"> 54 58 <?php _e('Order (by date)', 'tea-page-content'); ?>: 55 59 </label> 56 <select class="widefat" id="<?php echo $bind->get_field_id('order') ; ?>" name="<?php echo $bind->get_field_name('order');?>">60 <select class="widefat" id="<?php echo $bind->get_field_id('order') ?>" name="<?php echo $bind->get_field_name('order') ?>"> 57 61 <option value="desc" <?php if($instance['order'] == 'desc') : echo 'selected'; endif; ?>> 58 62 <?php _e('Descending', 'tea-page-content') ?> … … 65 69 66 70 <p> 67 <label for="<?php echo $bind->get_field_id('thumbnail'); ?>"> 68 <?php $checked = $instance['thumbnail'] ? 'checked' : ''; ?> 69 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('thumbnail'); ?>" name="<?php echo $bind->get_field_name('thumbnail'); ?>" value="1" <?php echo $checked ?> /> 70 <span><?php _e('Thumbnail', 'tea-page-content'); ?></span> 71 <label for="<?php echo $bind->get_field_id('show_page_thumbnail'); ?>"> 72 <?php 73 $checked = $instance['show_page_thumbnail'] ? 'checked' : ''; 74 75 // @deprecated since 1.1 76 if(array_key_exists('thumbnail', $instance) && !$instance['thumbnail']) $checked = ''; 77 ?> 78 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('show_page_thumbnail'); ?>" name="<?php echo $bind->get_field_name('show_page_thumbnail'); ?>" value="1" <?php echo $checked ?> /> 79 <span><?php _e('Show page thumbnail', 'tea-page-content'); ?></span> 80 </label> 81 82 <br /> 83 84 <label for="<?php echo $bind->get_field_id('show_page_title'); ?>"> 85 <?php $checked = $instance['show_page_title'] ? 'checked' : ''; ?> 86 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('show_page_title'); ?>" name="<?php echo $bind->get_field_name('show_page_title'); ?>" value="1" <?php echo $checked ?> /> 87 <span><?php _e('Show page title', 'tea-page-content'); ?></span> 88 </label> 89 90 <br /> 91 92 <label for="<?php echo $bind->get_field_id('show_page_content'); ?>"> 93 <?php $checked = $instance['show_page_content'] ? 'checked' : ''; ?> 94 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('show_page_content'); ?>" name="<?php echo $bind->get_field_name('show_page_content'); ?>" value="1" <?php echo $checked ?> /> 95 <span><?php _e('Show page content', 'tea-page-content'); ?></span> 96 </label> 97 98 <br /> 99 100 <label for="<?php echo $bind->get_field_id('linked_page_title'); ?>"> 101 <?php $checked = $instance['linked_page_title'] ? 'checked' : ''; ?> 102 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('linked_page_title'); ?>" name="<?php echo $bind->get_field_name('linked_page_title'); ?>" value="1" <?php echo $checked ?> /> 103 <span><?php _e('Linked page title (if possible)', 'tea-page-content'); ?></span> 104 </label> 105 106 <br /> 107 108 <label for="<?php echo $bind->get_field_id('linked_page_thumbnail'); ?>"> 109 <?php $checked = $instance['linked_page_thumbnail'] ? 'checked' : ''; ?> 110 <input class="widefat" type="checkbox" id="<?php echo $bind->get_field_id('linked_page_thumbnail'); ?>" name="<?php echo $bind->get_field_name('linked_page_thumbnail'); ?>" value="1" <?php echo $checked ?> /> 111 <span><?php _e('Linked page thumbnail (if possible)', 'tea-page-content'); ?></span> 71 112 </label> 72 113 </p> -
tea-page-content/trunk/templates/default.php
r1319161 r1384553 1 <?php if(isset($entries) && count($entries)) : ?> 1 <?php 2 /** 3 * @param is-padded checkbox 0 4 */ 2 5 3 <section class="tpc-block tpc-default"> 6 // prevention for old version of this plugin, @deprecated since 1.1 7 $isPadded = false; 8 if(isset($template_variables['is-padded']) && $template_variables['is-padded']) { 9 $isPadded = true; 10 } 11 ?> 12 <?php if(isset($entries) && $count) : ?> 13 14 <section class="tpc-block tpc-default<?php if($isPadded) echo '-padded'; ?>"> 4 15 <?php foreach ($entries as $key => $entry) : ?> 5 16 <article class="tpc-entry-block"> 6 <?php if(isset($instance['thumbnail']) && $instance['thumbnail'] !== 'false' && $entry['thumbnail']) : ?> 7 <?php echo $entry['thumbnail'] ?> 17 <?php if(isset($instance['show_page_thumbnail']) && $instance['show_page_thumbnail'] && $entry['thumbnail']) : ?> 18 <?php if(array_key_exists('thumbnail', $instance) && !$instance['thumbnail']) : 19 // @deprecated thumbnail param since 1.1 20 else : ?> 21 <div class="tpc-thumbnail"> 22 <?php if($instance['linked_page_thumbnail'] && $entry['link']) : ?> 23 <a href="<?php echo $entry['link'] ?>"><?php echo $entry['thumbnail'] ?></a> 24 <?php else : ?> 25 <?php echo $entry['thumbnail'] ?> 26 <?php endif; ?> 27 </div> 28 <?php endif; ?> 8 29 <?php endif; ?> 9 30 31 <?php if($instance['show_page_title'] || $instance['show_page_content']) : ?> 10 32 <div class="tpc-body"> 11 <h3 class="tpc-title"><?php echo $entry['title'] ?></h3> 12 <div class="tpc-content post-content"> 13 <?php echo $entry['content'] ?> 14 </div> 33 <?php if($instance['show_page_title']) : ?> 34 <h3 class="tpc-title"> 35 <?php if($instance['linked_page_title'] && $entry['link']) : ?> 36 <a href="<?php echo $entry['link'] ?>"><?php echo $entry['title'] ?></a> 37 <?php else : ?> 38 <?php echo $entry['title'] ?> 39 <?php endif; ?> 40 </h3> 41 <?php endif; ?> 42 43 <?php if($instance['show_page_content']) : ?> 44 <div class="tpc-content post-content"> 45 <?php echo $entry['content'] ?> 46 </div> 47 <?php endif; ?> 15 48 </div> 49 <?php endif; ?> 16 50 17 51 </article>
Note: See TracChangeset
for help on using the changeset viewer.