Changeset 1018331
- Timestamp:
- 11/02/2014 12:38:56 PM (11 years ago)
- Location:
- polymer-components/trunk
- Files:
-
- 1 added
- 4 edited
-
conf.php (added)
-
polymer-admin.js (modified) (1 diff)
-
polymer-admin.php (modified) (6 diffs)
-
polymer-components.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
polymer-components/trunk/polymer-admin.js
r1017981 r1018331 21 21 }); 22 22 } 23 24 /* var editor_container = document.getElementById( 'wp-content-editor-container' ); 25 if( editor_container != null ) 26 { 27 var textarea = editor_container.getElementsByTagName( 'textarea' ); 28 if( textarea.length > 0 ) 29 { 30 CodeMirror.fromTextArea( textarea[0], { 31 dragDrop: false, 32 indentWithTabs: true, 33 lineNumbers: true, 34 smartIndent: false 35 }); 36 } 37 } */ 23 38 }; -
polymer-components/trunk/polymer-admin.php
r1017981 r1018331 2 2 if ( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 3 4 define( 'PLUGIN_MAIN', 'polymer-components/polymer-components.php' );4 require_once( plugin_dir_path( __FILE__ ) . 'conf.php' ); 5 5 6 6 class polymer_admin … … 16 16 add_action( 'save_post', array( &$this, 'save_post' ) ); 17 17 // --- Filters --- 18 add_filter( 'plugin_action_links_' . P LUGIN_MAIN, array( &$this, 'plugin_action_links' ), 10, 1 );18 add_filter( 'plugin_action_links_' . POLYMER_COMPONENTS_MAIN, array( &$this, 'plugin_action_links' ), 10, 1 ); 19 19 } 20 20 21 21 function add_meta_boxes() 22 22 { // action 23 add_meta_box( 'polymer_meta', __( 'Polymer components', 'liquid-theme' ), array( &$this, 'polymer_meta' ), 'post', 'normal', 'high' );24 add_meta_box( 'polymer_meta', __( 'Polymer components', 'liquid-theme' ), array( &$this, 'polymer_meta' ), 'page', 'normal', 'high' );23 add_meta_box( 'polymer_meta', __( 'Polymer Components', 'liquid-theme' ), array( &$this, 'polymer_meta' ), 'post', 'normal', 'high' ); 24 add_meta_box( 'polymer_meta', __( 'Polymer Components', 'liquid-theme' ), array( &$this, 'polymer_meta' ), 'page', 'normal', 'high' ); 25 25 } 26 26 … … 28 28 { // action 29 29 $this->options = get_option( 'polymer-options' ); 30 if( $this->options === FALSE ) 31 { // default values 32 $this->options = unserialize( POLYMER_OPTIONS ); 33 } 34 // Styles and scripts 30 35 wp_enqueue_style( 'poly-admin-style', plugin_dir_url( __FILE__ ) . 'polymer-admin.css' ); 31 36 wp_enqueue_style( 'poly-admin-codemirror-style', plugin_dir_url( __FILE__ ) . 'codemirror/codemirror.css' ); … … 68 73 add_options_page( 69 74 'Settings Admin', 70 'Polymer settings',75 'Polymer Components', 71 76 'manage_options', 72 77 'polymer-settings', … … 80 85 <div id="polymer-settings" class="wrap"> 81 86 <?php screen_icon(); ?> 82 <h2>Polymer settings</h2> 87 <h2>Polymer Components</h2> 88 <hr/> 83 89 <form method="post" action="options.php"> 84 90 <?php … … 94 100 function field_js_pages() 95 101 { 96 if( $this->options !== FALSE ) 97 { 98 $checked = isset( $this->options['polymer-js-pages'] ) && !empty( $this->options['polymer-js-pages'] ); 99 } 100 else $checked = TRUE; 101 echo '<input type="checkbox" id="polymer-js-pages" name="polymer-options[polymer-js-pages]"', $checked ? ' checked="checked"' : '', '/> <label for="polymer-js-pages">', __('Javascript editor in pages'), '</label>'; 102 echo '<input type="checkbox" id="polymer-js-pages" name="polymer-options[polymer-js-pages]"', !empty( $this->options['polymer-js-pages'] ) ? ' checked="checked"' : '', '/> <label for="polymer-js-pages">', __('Javascript editor in pages'), '</label>'; 102 103 } 103 104 104 105 function field_js_posts() 105 106 { 106 if( $this->options !== FALSE ) 107 { 108 $checked = isset( $this->options['polymer-js-posts'] ) && !empty( $this->options['polymer-js-posts'] ); 109 } 110 else $checked = TRUE; 111 echo '<input type="checkbox" id="polymer-js-posts" name="polymer-options[polymer-js-posts]"', $checked ? ' checked="checked"' : '', '/> <label for="polymer-js-posts">', __('Javascript editor in posts'), '</label>'; 107 echo '<input type="checkbox" id="polymer-js-posts" name="polymer-options[polymer-js-posts]"', !empty( $this->options['polymer-js-posts'] ) ? ' checked="checked"' : '', '/> <label for="polymer-js-posts">', __('Javascript editor in posts'), '</label>'; 112 108 } 113 109 -
polymer-components/trunk/polymer-components.php
r1017981 r1018331 4 4 * Plugin URI: http://blocknot.es/ 5 5 * Description: Add Polymer elements to your website! 6 * Version: 1.1. 06 * Version: 1.1.2 7 7 * Author: Mattia Roccoberton 8 8 * Author URI: http://blocknot.es … … 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 12 */ 13 require_once( plugin_dir_path( __FILE__ ) . 'conf.php' ); 14 13 15 class polymer_components 14 16 { … … 109 111 { 110 112 $this->options = get_option( 'polymer-options' ); 113 if( $this->options === FALSE ) 114 { // default values 115 $this->options = unserialize( POLYMER_OPTIONS ); 116 } 111 117 if( !is_admin() ) 112 118 { … … 170 176 $polycomponents = new polymer_components(); 171 177 172 require plugin_dir_path( __FILE__ ) . 'polymer-shortcodes.php';178 require( plugin_dir_path( __FILE__ ) . 'polymer-shortcodes.php' ); 173 179 174 if( is_admin() ) require plugin_dir_path( __FILE__ ) . 'polymer-admin.php';180 if( is_admin() ) require( plugin_dir_path( __FILE__ ) . 'polymer-admin.php' ); -
polymer-components/trunk/readme.txt
r1017981 r1018331 5 5 Requires at least: 3.5.0 6 6 Tested up to: 4.0 7 Stable tag: 1.1. 07 Stable tag: 1.1.2 8 8 License: GPL3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 70 70 == Upgrade Notice == 71 71 72 = 1.1.2 = 73 * Small fix and changes to settings 74 = 1.1.0 = 75 * New settings screen 76 * New settings: JS in pages / posts 77 * Improved Javascript editor 78 * Added polymer-element tag 79 = 1.0.6 = 80 * Added Javascript textarea to posts and pages 81 82 == Changelog == 83 84 = 1.1.2 = 85 * Small fix and changes to settings 72 86 = 1.1.0 = 73 87 * New settings screen … … 81 95 = 1.0.0 = 82 96 * First release 83 84 == Changelog ==85 86 = 1.1.0 =87 * New settings screen88 * New settings: JS in pages / posts89 * Improved Javascript editor90 * Added polymer-element tag91 = 1.0.6 =92 * Added Javascript textarea to posts and pages93 = 1.0.2 =94 * Small fix for admin docs95 = 1.0.0 =96 * First release
Note: See TracChangeset
for help on using the changeset viewer.