Changeset 1027346
- Timestamp:
- 11/17/2014 03:23:16 PM (11 years ago)
- Location:
- polymer-components/trunk
- Files:
-
- 4 edited
-
conf.php (modified) (1 diff)
-
polymer-admin.php (modified) (3 diffs)
-
polymer-components.php (modified) (4 diffs)
-
readme.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
polymer-components/trunk/conf.php
r1026695 r1027346 6 6 // Default options values 7 7 $polymer_options = array( 8 'polymer-css-pages' => TRUE, 9 'polymer-css-posts' => TRUE, 8 10 'polymer-js-pages' => TRUE, 9 11 'polymer-js-posts' => TRUE -
polymer-components/trunk/polymer-admin.php
r1026695 r1027346 51 51 ); 52 52 add_settings_section( 53 'polymer-section-general', // ID 54 'General settings', // Title 55 array( $this, 'print_section_info' ), // Callback 56 'polymer-settings' // Page 57 ); 58 add_settings_field( 59 'polymer-js-posts', // ID 60 'JS in posts', // Title 61 array( $this, 'field_js_posts' ), // Callback 62 'polymer-settings', // Page 63 'polymer-section-general' // Section 64 ); 65 add_settings_field( 66 'polymer-js-pages', // ID 67 'JS in pages', // Title 68 array( $this, 'field_js_pages' ), // Callback 69 'polymer-settings', // Page 70 'polymer-section-general' // Section 53 'polymer-section-general', 54 'General settings', 55 array( $this, 'print_section_info' ), 56 'polymer-settings' 57 ); 58 add_settings_field( 59 'polymer-css-posts', 60 'CSS in posts', 61 array( $this, 'field_css_posts' ), 62 'polymer-settings', 63 'polymer-section-general' 64 ); 65 add_settings_field( 66 'polymer-css-pages', 67 'CSS in pages', 68 array( $this, 'field_css_pages' ), 69 'polymer-settings', 70 'polymer-section-general' 71 ); 72 add_settings_field( 73 'polymer-js-posts', 74 'JS in posts', 75 array( $this, 'field_js_posts' ), 76 'polymer-settings', 77 'polymer-section-general' 78 ); 79 add_settings_field( 80 'polymer-js-pages', 81 'JS in pages', 82 array( $this, 'field_js_pages' ), 83 'polymer-settings', 84 'polymer-section-general' 71 85 ); 72 86 } … … 102 116 } 103 117 118 function field_css_pages() 119 { 120 echo '<input type="checkbox" id="polymer-css-pages" name="polymer-options[polymer-css-pages]"', !empty( $this->options['polymer-css-pages'] ) ? ' checked="checked"' : '', '/> <label for="polymer-css-pages">', __('Styles editor in pages'), '</label>'; 121 } 122 123 function field_css_posts() 124 { 125 echo '<input type="checkbox" id="polymer-css-posts" name="polymer-options[polymer-css-posts]"', !empty( $this->options['polymer-css-posts'] ) ? ' checked="checked"' : '', '/> <label for="polymer-css-posts">', __('Styles editor in posts'), '</label>'; 126 } 127 104 128 function field_js_pages() 105 129 { … … 173 197 } 174 198 // --- CSS editor --- 175 echo '<div style="border-bottom: 1px solid #aaa; padding-top: 10px; padding-bottom: 5px"><b>Styles</b>:</div>'; 176 $val = get_post_meta( $post->ID, 'poly_styles', TRUE ); 177 echo '<textarea name="poly_styles" id="poly_styles" style="width: 100%" cols="80" rows="6">', stripslashes( $val ), '</textarea>', "\n"; 199 if( $post->post_type == 'post' ) $poly_styles = isset( $this->options['polymer-css-posts'] ) && !empty( $this->options['polymer-css-posts'] ); 200 else if( $post->post_type == 'page' ) $poly_styles = isset( $this->options['polymer-css-pages'] ) && !empty( $this->options['polymer-css-pages'] ); 201 else $poly_styles = FALSE; 202 if( $poly_styles ) 203 { 204 echo '<div style="border-bottom: 1px solid #aaa; padding-top: 10px; padding-bottom: 5px"><b>Styles</b>:</div>'; 205 $val = get_post_meta( $post->ID, 'poly_styles', TRUE ); 206 echo '<textarea name="poly_styles" id="poly_styles" style="width: 100%" cols="80" rows="6">', stripslashes( $val ), '</textarea>', "\n"; 207 } 178 208 echo "</div>\n"; 179 209 } -
polymer-components/trunk/polymer-components.php
r1026695 r1027346 1 1 <?php 2 2 /** 3 * Plugin Name: Polymer Components3 * Plugin Name: Polymer for WordPress 4 4 * Plugin URI: http://blocknot.es/ 5 5 * Description: Add Polymer elements to your website! 6 * Version: 1.2. 56 * Version: 1.2.8 7 7 * Author: Mattia Roccoberton 8 8 * Author URI: http://blocknot.es … … 10 10 * 11 11 * Note: polymer with bower; removed: core-scroll-header-panel/demos, google-code-prettify, polymer-test-tools, web-animations-js/test, web-animations-js/tools, web-animations-js/tutorial 12 * 13 * ToDo: 14 * - Polymer 0.5.1 15 * - area to manage custom elements 12 16 */ 13 17 require_once( plugin_dir_path( __FILE__ ) . 'conf.php' ); … … 106 110 'social-icons' => 'core-icons/social-icons.html', 107 111 ); 112 var $hide_keys = array( 'poly_autop', 'poly_iconsets', 'poly_javascript', 'poly_styles', 'poly_tags', 'poly_template' ); 108 113 var $options; 109 114 var $import = array(); … … 132 137 { // filter 133 138 // hide some meta key from custom fields of the editor 134 return ( $meta_key == 'poly_tags' || $meta_key == 'poly_iconsets' || $meta_key == 'poly_javascript' ) ? TRUE : $protected;139 return ( in_array( $meta_key, $this->hide_keys ) ? TRUE : $protected ); 135 140 } 136 141 -
polymer-components/trunk/readme.txt
r1026695 r1027346 1 === Polymer Components ===1 === Polymer for WordPress === 2 2 Contributors: blocknot.es 3 3 Tags: plugin,google,shortcode,page,posts,Post … … 5 5 Requires at least: 3.5.0 6 6 Tested up to: 4.0 7 Stable tag: 1.2.57 Stable tag: trunk 8 8 License: GPL3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 14 14 == Description == 15 15 16 This plugin allows to add Polymer elements in your posts and pages . The same components used in Android Lollypop. You can use the HTML editor with the Polymer tags or the shortcode *[poly]* for all the elements. The correct HTML libraries will be loaded automatically when you use a Polymer tag.16 This plugin allows to add Polymer elements in your posts and pages, the same components used in Android Lollypop. You can use the HTML editor with the Polymer tags or the shortcode *[poly]* for all the elements. The correct HTML libraries will be loaded automatically. 17 17 Polymer documentation page: http://www.polymer-project.org/ 18 18 19 Notice: Polymer is still in developer preview so some constructs may change in future and amodern browser is required to run Polymer apps.19 Notice: Polymer is still in *developer* *preview* so some constructs may change in future. A modern browser is required to run Polymer apps. 20 20 21 21 Features: 22 22 23 * Polymer tags directly available (core & paper) in posts and pages withthe HTML editor;24 * Polymer widget;25 * [poly] shortcode to access to the Polymer tags;23 * Polymer tags directly available (core & paper) in posts / pages in the HTML editor; 24 * [poly] shortcode to access all tags; 25 * simple widget; 26 26 * auto import the necessary HTML components; 27 27 * Javascript editor in posts / pages admin; … … 46 46 Notes: 47 47 48 * autop option: the autop() Wordpress function adds p and br tags to the post content when a newline is found, but this can break the Polymer tags. That's why I have added this option that disable by default the autop function48 * autop option: the autop() Wordpress function adds p and br tags to the contents when a newline is found, but this can break the Polymer tags. This option allows to enable/disable autop() in posts / pages (plugin default: no autop) 49 49 * template override option: if this option is enabled this plugin will load a special template which provides only the required components to run a Polymer app. This is useful if you want a "fullscreen" Polymer app 50 50 … … 81 81 == Upgrade Notice == 82 82 83 = 1.2.8 = 84 * New setting: CSS editor on/off 85 * Small fix 83 86 = 1.2.5 = 84 87 * New CSS editor for posts / pages … … 89 92 * Auto-import improved 90 93 * Small fix to JS editor 91 = 1.1.2 =92 * Small fix and changes to settings93 = 1.1.0 =94 * New settings screen95 * New settings: JS in posts / pages96 * Improved Javascript editor97 * Added polymer-element tag98 94 99 95 == Changelog == 100 96 97 = 1.2.8 = 98 * New setting: CSS editor on/off 99 * Small fix 101 100 = 1.2.5 = 102 101 * New CSS editor for posts / pages
Note: See TracChangeset
for help on using the changeset viewer.