Changeset 1457850
- Timestamp:
- 07/20/2016 11:02:36 PM (10 years ago)
- Location:
- pluton-panel
- Files:
-
- 55 added
- 7 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/includes (added)
-
tags/1.0.4/includes/config (added)
-
tags/1.0.4/includes/config/polylang.php (added)
-
tags/1.0.4/includes/config/wpml.php (added)
-
tags/1.0.4/includes/metabox (added)
-
tags/1.0.4/includes/metabox/assets (added)
-
tags/1.0.4/includes/metabox/assets/pluton-metabox.css (added)
-
tags/1.0.4/includes/metabox/assets/pluton-metabox.js (added)
-
tags/1.0.4/includes/metabox/gallery-metabox (added)
-
tags/1.0.4/includes/metabox/gallery-metabox/delete.png (added)
-
tags/1.0.4/includes/metabox/gallery-metabox/gallery-metabox.php (added)
-
tags/1.0.4/includes/metabox/gallery-metabox/watermark.png (added)
-
tags/1.0.4/includes/metabox/metabox.php (added)
-
tags/1.0.4/includes/panel (added)
-
tags/1.0.4/includes/panel/assets (added)
-
tags/1.0.4/includes/panel/assets/ace.js (added)
-
tags/1.0.4/includes/panel/assets/admin-fields (added)
-
tags/1.0.4/includes/panel/assets/admin-fields/admin.css (added)
-
tags/1.0.4/includes/panel/assets/admin-fields/color-picker.js (added)
-
tags/1.0.4/includes/panel/assets/admin-fields/media-uploader.js (added)
-
tags/1.0.4/includes/panel/assets/ext-searchbox.js (added)
-
tags/1.0.4/includes/panel/assets/img (added)
-
tags/1.0.4/includes/panel/assets/img/addons-vc-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/custom-actions-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/custom-sidebar-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/footer-callout-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/panel-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/product-share-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/social-share-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/sticky-header-image.png (added)
-
tags/1.0.4/includes/panel/assets/img/woo-styling-image.png (added)
-
tags/1.0.4/includes/panel/assets/mode-css.js (added)
-
tags/1.0.4/includes/panel/assets/mode-javascript.js (added)
-
tags/1.0.4/includes/panel/assets/theme-chrome.js (added)
-
tags/1.0.4/includes/panel/assets/typography-customize-preview.js (added)
-
tags/1.0.4/includes/panel/custom-404.php (added)
-
tags/1.0.4/includes/panel/custom-css.php (added)
-
tags/1.0.4/includes/panel/custom-js.php (added)
-
tags/1.0.4/includes/panel/customizer.php (added)
-
tags/1.0.4/includes/panel/extensions.php (added)
-
tags/1.0.4/includes/panel/image-sizes.php (added)
-
tags/1.0.4/includes/panel/import-export.php (added)
-
tags/1.0.4/includes/panel/links.php (added)
-
tags/1.0.4/includes/panel/theme-panel.php (added)
-
tags/1.0.4/includes/panel/typography.php (added)
-
tags/1.0.4/includes/panel/wp-gallery.php (added)
-
tags/1.0.4/index.php (added)
-
tags/1.0.4/languages (added)
-
tags/1.0.4/languages/pluton-panel.pot (added)
-
tags/1.0.4/pluton-panel.php (added)
-
tags/1.0.4/readme.txt (added)
-
trunk/includes/metabox/metabox.php (modified) (1 diff)
-
trunk/includes/panel/assets/img/social-share-image.png (added)
-
trunk/includes/panel/customizer.php (added)
-
trunk/includes/panel/extensions.php (modified) (1 diff)
-
trunk/includes/panel/image-sizes.php (added)
-
trunk/includes/panel/theme-panel.php (modified) (17 diffs)
-
trunk/includes/panel/typography.php (modified) (3 diffs)
-
trunk/includes/panel/wp-gallery.php (modified) (1 diff)
-
trunk/pluton-panel.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pluton-panel/trunk/includes/metabox/metabox.php
r1443798 r1457850 578 578 ), 579 579 ), 580 'disable_social' => array(581 'title' => esc_html__( 'Social Share', 'pluton-panel' ),582 'id' => $prefix . 'disable_social',583 'type' => 'select',584 'description' => esc_html__( 'Enable or disable this element on this page or post.', 'pluton-panel' ),585 'options' => array(586 '' => esc_html__( 'Default', 'pluton-panel' ),587 'enable' => esc_html__( 'Enable', 'pluton-panel' ),588 'on' => esc_html__( 'Disable', 'pluton-panel' ),589 ),590 ),591 580 ), 592 581 ); -
pluton-panel/trunk/includes/panel/extensions.php
r1443798 r1457850 111 111 'name' => 'Custom Sidebar', 112 112 'desc' => 'Create an unlimited number of sidebars and assign unlimited number of widgets.', 113 ); 114 115 $free['social-sharing'] = array( 116 'url' => 'https://plutonwp.com/extension/pluton-social-sharing/', 117 'image' => plugins_url( '/assets/img/social-share-image.png', __FILE__ ), 118 'name' => 'Social Sharing', 119 'desc' => 'Add social share buttons to your single posts with this free extension.', 113 120 ); 114 121 -
pluton-panel/trunk/includes/panel/theme-panel.php
r1447852 r1457850 13 13 } 14 14 15 // Global class16 $pluton_theme_panel;17 18 15 // Start Class 19 16 if ( ! class_exists( 'Pluton_Theme_Panel' ) ) { … … 27 24 public function __construct() { 28 25 29 // Array of theme "parts/addons" that can be enabled/disabled 30 $this->theme_addons = apply_filters( 'pluton_theme_addons', array( 26 // Add panel menu 27 add_action( 'admin_menu', array( 'Pluton_Theme_Panel', 'add_menu_page' ), 0 ); 28 29 // Add panel submenu 30 add_action( 'admin_menu', array( 'Pluton_Theme_Panel', 'add_menu_subpage' ) ); 31 32 // Add custom CSS for the theme panel 33 add_action( 'admin_print_styles-toplevel_page_pluton-panel', array( 'Pluton_Theme_Panel','css' ) ); 34 35 // Register panel settings 36 add_action( 'admin_init', array( 'Pluton_Theme_Panel','register_settings' ) ); 37 38 // Load addon files 39 self::load_addons(); 40 41 } 42 43 /** 44 * Return theme addons 45 * Can't be added in construct because translations won't work 46 * 47 * @since 1.0.8 48 */ 49 private static function get_addons() { 50 $addons = array( 31 51 'schema_markup' => array( 32 52 'label' => esc_html__( 'Schema Markup', 'pluton-panel' ), … … 87 107 'category' => esc_html__( 'Optimizations', 'pluton-panel' ), 88 108 ), 89 ) ); 90 91 // Add panel menu 92 add_action( 'admin_menu', array( $this, 'add_menu_page' ), 0 ); 93 94 // Add panel submenu 95 add_action( 'admin_menu', array( $this, 'add_menu_subpage' ) ); 96 97 // Add custom CSS for the theme panel 98 add_action( 'admin_print_styles-toplevel_page_pluton-panel', array( $this,'css' ) ); 99 100 // Register panel settings 101 add_action( 'admin_init', array( $this,'register_settings' ) ); 102 103 // Load addon files 104 $this->load_addons(); 109 ); 110 111 // Apply filters and return 112 return apply_filters( 'pluton_theme_addons', $addons ); 105 113 106 114 } … … 111 119 * @since 1.0.0 112 120 */ 113 public function add_menu_page() {121 public static function add_menu_page() { 114 122 add_menu_page( 115 123 esc_html__( 'Theme Panel', 'pluton-panel' ), … … 128 136 * @since 1.0.0 129 137 */ 130 public function add_menu_subpage(){138 public static function add_menu_subpage(){ 131 139 add_submenu_page( 132 140 'pluton-general', … … 135 143 'manage_options', 136 144 'pluton-panel', 137 array( $this, 'create_admin_page' )145 array( 'Pluton_Theme_Panel', 'create_admin_page' ) 138 146 ); 139 147 } … … 144 152 * @since 1.0.0 145 153 */ 146 public function register_settings() {147 register_setting( 'pluton_tweaks', 'pluton_tweaks', array( $this, 'admin_sanitize' ) );148 register_setting( 'pluton_options', 'pluton_options', array( $this, 'admin_sanitize_license_options' ) );154 public static function register_settings() { 155 register_setting( 'pluton_tweaks', 'pluton_tweaks', array( 'Pluton_Theme_Panel', 'admin_sanitize' ) ); 156 register_setting( 'pluton_options', 'pluton_options', array( 'Pluton_Theme_Panel', 'admin_sanitize_license_options' ) ); 149 157 } 150 158 … … 154 162 * @since 1.0.0 155 163 */ 156 public function admin_sanitize_license_options( $input ) {164 public static function admin_sanitize_license_options( $input ) { 157 165 158 166 //filter to save all settings to database … … 165 173 * @since 1.0.0 166 174 */ 167 public function admin_sanitize( $options ) {175 public static function admin_sanitize( $options ) { 168 176 169 177 // Check options first … … 172 180 } 173 181 182 // Get addons array 183 $theme_addons = self::get_addons(); 184 174 185 // Save checkboxes 175 186 $checkboxes = array(); 176 187 177 188 // Add theme parts to checkboxes 178 foreach ( $th is->theme_addons as $key => $val ) {189 foreach ( $theme_addons as $key => $val ) { 179 190 180 191 // Get correct ID … … 225 236 * @since 1.0.0 226 237 */ 227 public function create_admin_page() { ?> 238 public static function create_admin_page() { 239 240 // Get addons array 241 $theme_addons = self::get_addons(); ?> 228 242 229 243 <div class="wrap pluton-theme-panel pluton-clr"> … … 329 343 <?php 330 344 // Categories 331 $categories = wp_list_pluck( $th is->theme_addons, 'category' );345 $categories = wp_list_pluck( $theme_addons, 'category' ); 332 346 $categories = array_unique( $categories ); 333 347 asort( $categories ); ?> … … 340 354 // Check condition 341 355 $display = true; 342 if ( isset( $th is->theme_addons[$key]['condition'] ) ) {343 $display = $th is->theme_addons[$key]['condition'];356 if ( isset( $theme_addons[$key]['condition'] ) ) { 357 $display = $theme_addons[$key]['condition']; 344 358 } 345 359 … … 364 378 $count = 0; 365 379 // Loop through theme pars and add checkboxes 366 foreach ( $th is->theme_addons as $key => $val ) :380 foreach ( $theme_addons as $key => $val ) : 367 381 $count++; 368 382 … … 391 405 392 406 // Get theme option 393 $theme_mod = pluton_get_mod( $key, $default );407 $theme_mod = get_theme_mod( $key, $default ); 394 408 395 409 // Get category and sanitize … … 523 537 $dir = PP_ROOT .'/includes/panel/'; 524 538 539 // Image Sizes 540 if ( get_theme_mod( 'image_sizes_enable', true ) ) { 541 require_once( $dir .'image-sizes.php' ); 542 } 543 525 544 // Typography 526 if ( pluton_get_mod( 'typography_enable', true ) ) {545 if ( get_theme_mod( 'typography_enable', true ) ) { 527 546 require_once( $dir .'typography.php' ); 528 547 } 529 548 530 549 // Custom 404 531 if ( pluton_get_mod( 'custom_404_enable', true ) ) {550 if ( get_theme_mod( 'custom_404_enable', true ) ) { 532 551 require_once( $dir .'custom-404.php' ); 533 552 } 534 553 554 // Customizer Manager 555 if ( get_theme_mod( 'customizer_panel_enable', true ) ) { 556 require_once( $dir .'customizer.php' ); 557 } 558 535 559 // Custom WordPress gallery output 536 if ( pluton_get_mod( 'custom_wp_gallery_enable', true ) ) {560 if ( get_theme_mod( 'custom_wp_gallery_enable', true ) ) { 537 561 require_once( $dir .'wp-gallery.php' ); 538 562 } 539 563 540 564 // Custom CSS 541 if ( pluton_get_mod( 'custom_css_enable', true ) ) {565 if ( get_theme_mod( 'custom_css_enable', true ) ) { 542 566 require_once( $dir .'custom-css.php' ); 543 567 } 544 568 545 569 // Custom JS 546 if ( pluton_get_mod( 'custom_js_enable', false ) ) {570 if ( get_theme_mod( 'custom_js_enable', false ) ) { 547 571 require_once( $dir .'custom-js.php' ); 548 572 } 549 573 550 574 // Import Export Functions 551 if ( is_admin() && pluton_get_mod( 'import_export_enable', true ) ) {575 if ( is_admin() && get_theme_mod( 'import_export_enable', true ) ) { 552 576 require_once( $dir .'import-export.php' ); 553 577 } … … 634 658 } 635 659 } 636 $pluton_theme_panel =new Pluton_Theme_Panel();660 new Pluton_Theme_Panel(); -
pluton-panel/trunk/includes/panel/typography.php
r1448206 r1457850 40 40 41 41 // Load Google Font scripts 42 if ( pluton_get_mod( 'google_fonts_in_footer' ) ) {42 if ( get_theme_mod( 'google_fonts_in_footer' ) ) { 43 43 add_action( 'wp_footer', array( $this, 'load_fonts' ) ); 44 44 } else { … … 501 501 // Get target and current mod 502 502 $target = isset( $array['target'] ) ? $array['target'] : ''; 503 $get_mod = pluton_get_mod( $element .'_typography' );503 $get_mod = get_theme_mod( $element .'_typography' ); 504 504 505 505 // Attributes to loop through … … 706 706 continue; 707 707 } 708 $subset = pluton_get_mod( 'google_font_subsets', 'latin' );708 $subset = get_theme_mod( 'google_font_subsets', 'latin' ); 709 709 $subset = $subset ? $subset : 'latin'; 710 710 $subset = '&subset='. $subset; -
pluton-panel/trunk/includes/panel/wp-gallery.php
r1443798 r1457850 136 136 // Set cropping sizes 137 137 if ( $columns > 1 ) { 138 $img_width = $img_width ? $img_width : pluton_get_mod( 'gallery_image_width' );139 $img_height = $img_height ? $img_height : pluton_get_mod( 'gallery_image_height' );138 $img_width = $img_width ? $img_width : get_theme_mod( 'gallery_image_width' ); 139 $img_height = $img_height ? $img_height : get_theme_mod( 'gallery_image_height' ); 140 140 } 141 141 -
pluton-panel/trunk/pluton-panel.php
r1448206 r1457850 4 4 * Plugin URI: https://plutonwp.com/extension/pluton-panel/ 5 5 * Description: Add meta boxes for your posts, pages, posts types and Theme Panel to extend the functionality of the theme. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Author: PlutonWP 8 8 * Author URI: https://plutonwp.com/ … … 87 87 $this->plugin_url = plugin_dir_url( __FILE__ ); 88 88 $this->plugin_path = plugin_dir_path( __FILE__ ); 89 $this->version = '1.0. 3';89 $this->version = '1.0.4'; 90 90 91 91 define( 'PP_ROOT', dirname( __FILE__ ) ); -
pluton-panel/trunk/readme.txt
r1448206 r1457850 4 4 Requires at least: 3.5 5 5 Tested up to: 4.5.3 6 Stable tag: 1.0. 36 Stable tag: 1.0.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 == Changelog == 35 35 36 = 1.0.4 = 37 Image Sizes & Customizer Manager tabs added. 38 36 39 = 1.0.3 = 37 40 Small problem with the customizer fixed.
Note: See TracChangeset
for help on using the changeset viewer.