Changeset 968899
- Timestamp:
- 08/20/2014 10:53:00 AM (11 years ago)
- Location:
- pricemesh/trunk
- Files:
-
- 5 edited
-
admin/pricemesh-admin.php (modified) (3 diffs)
-
pricemesh-base.php (modified) (1 diff)
-
pricemesh.php (modified) (1 diff)
-
public/pricemesh-public.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pricemesh/trunk/admin/pricemesh-admin.php
r963908 r968899 350 350 $option_name = "WooCommerce"; 351 351 $option_callback = "settings_3rd_party_woocommerce_callback"; 352 add_settings_field( 353 $option, __($option_name, $this->plugin_slug), array($this, $option_callback), $this->plugin_slug, $section 354 ); 355 register_setting($group, $option); 356 357 //custom post types 358 $option = "pricemesh_option_custom_post_types"; 359 $option_name = "Custom Post Types"; 360 $option_callback = "settings_3rd_party_custom_post_types_callback"; 352 361 add_settings_field( 353 362 $option, __($option_name, $this->plugin_slug), array($this, $option_callback), $this->plugin_slug, $section … … 659 668 } 660 669 661 662 /** 670 /** 671 * custom post type callback 672 * @since 1.5.1 673 */ 674 public function settings_3rd_party_custom_post_types_callback(){ 675 $opts = self::get_pricemesh_settings(); 676 $setting = $opts["custom_post_types"]; 677 $name = "pricemesh_option_custom_post_types"; 678 echo "<input type='text' name='$name' id='$name' value='$setting' class='regular-text'/>"; 679 echo "<p class='description'>". 680 " ".__("Liste von Custom Post Types bei denen Pricemesh angezeigt werden soll. Format: type1,type2,type3", $this->plugin_slug). 681 "</p>"; 682 } 683 684 /** 663 685 * Render the settings page for this plugin. 664 686 * … … 720 742 add_meta_box('pricemesh-meta',__('Pricemesh', 'pricemesh-plugin'), array($this, 'meta_box'),'product','normal','high'); 721 743 } 744 //add meta boxes to all custom post types 745 $custom_post_types = explode(",", $opts["custom_post_types"]); 746 foreach($custom_post_types as $type){ 747 add_meta_box('pricemesh-meta',__('Pricemesh', 'pricemesh-plugin'), array($this, 'meta_box'),$type, 'normal','high'); 748 } 722 749 } 723 750 -
pricemesh/trunk/pricemesh-base.php
r963908 r968899 32 32 "wp_robot_integration" => get_option("pricemesh_option_wp_robot_integration", 0), 33 33 "woocommerce_integration" => get_option("pricemesh_option_woocommerce_integration", 0), 34 "custom_post_types" => get_option("pricemesh_option_custom_post_types", ""), 34 35 ); 35 36 } -
pricemesh/trunk/pricemesh.php
r942938 r968899 4 4 Plugin URI: https://www.pricemesh.io/plugins/wordpress/ 5 5 Description: Mit diesem Plugin ist es möglich Wordpress um einen eigenen Preisvergleich zu erweitern. 6 Version: 1. 4.26 Version: 1.5.1 7 7 Author: pricemesh 8 8 Author URI: https://www.pricemesh.io -
pricemesh/trunk/public/pricemesh-public.php
r963908 r968899 22 22 * @var string 23 23 */ 24 const VERSION = '1.5 ';24 const VERSION = '1.5.1'; 25 25 26 26 /** … … 308 308 309 309 /** 310 * Check if a post is a custom post type. 311 * @param mixed $post Post object or ID 312 * @return boolean 313 */ 314 public static function is_custom_post_type( $post = NULL ) 315 { 316 $opts = self::get_pricemesh_settings(); 317 $custom_post_types = explode(",", $opts["custom_post_types"]); 318 return is_singular($custom_post_types); 319 } 320 321 /** 310 322 * Checks if Pricemesh should be injected on this page 311 323 * @since 1.0.0 … … 313 325 */ 314 326 public static function is_injection_needed(){ 315 if(is_single() || is_page() ){327 if(is_single() || is_page() || self::is_custom_post_type()){ 316 328 $opts = self::get_pricemesh_settings(); 317 329 if(strlen($opts["pids"])>=8 && strlen($opts["token"])>5){ -
pricemesh/trunk/readme.txt
r963908 r968899 4 4 Requires at least: 3.4 5 5 Tested up to: 3.9.2 6 Stable tag: 1.5 6 Stable tag: 1.5.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 73 73 == Changelog == 74 74 75 = 1.5.1 = 76 * Custom Post Types werden nun unterstützt 77 75 78 = 1.5 = 76 79 * Dark Theme hinzugefügt
Note: See TracChangeset
for help on using the changeset viewer.