Changeset 958257
- Timestamp:
- 07/31/2014 06:25:43 PM (12 years ago)
- Location:
- magic-fields-2/trunk
- Files:
-
- 5 edited
-
admin/mf_post.php (modified) (2 diffs)
-
main.php (modified) (2 diffs)
-
mf_extra.php (modified) (1 diff)
-
mf_register.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
magic-fields-2/trunk/admin/mf_post.php
r906980 r958257 16 16 // 17 17 add_action( 'admin_footer', array( &$this,'mf_check_wp_gallery_version') ); 18 19 add_action( 'admin_head', array( &$this,'check_exist_visual_editor') ); 20 18 21 } 19 22 … … 490 493 public function check_exist_visual_editor(){ 491 494 492 if( !empty( $_GET['post']) && is_numeric( $_GET['post'] ) ) {//when the post already exists 493 $post_type = get_post_type($_GET['post']); 494 }else{ //Creating a new post 495 $post_type = (!empty($_GET['post_type'])) ? $_GET['post_type'] : 'post'; 496 } 497 498 $fields = $this->get_unique_custom_fields_by_post_type($post_type); 499 500 /* add tiny_mce script */ 501 /* only add of editor support no exits for the post type*/ 502 if( (in_array('multiline',$fields) || in_array('image_media',$fields) ) && !post_type_supports($post_type,'editor' ) ){ 503 echo "<div style='display:none'>"; 504 echo wp_editor('','you_know_nothing'); 505 echo "</div>"; 506 } 507 508 509 510 } 495 if( strstr( $_SERVER['REQUEST_URI'], 'post-new.php' ) !== FALSE || strstr( $_SERVER['REQUEST_URI'], 'wp-admin/post.php') !== FALSE ) { 496 497 if( isset($_GET['action']) && $_GET['action'] == 'trash' ) {//when the post already exists 498 return; 499 } 500 501 if( !empty( $_GET['post']) && is_numeric( $_GET['post'] ) ) {//when the post already exists 502 $post_type = get_post_type($_GET['post']); 503 }else{ //Creating a new post 504 $post_type = (!empty($_GET['post_type'])) ? $_GET['post_type'] : 'post'; 505 } 506 507 $mf_posttype = new mf_posttype(); 508 $pt = $mf_posttype->get_post_type($post_type); 509 510 if ($pt && !isset($pt['support']['editor'])) { 511 echo "<style>#postdivrich {display:none; }</style>"; 512 } 513 514 } 515 516 } 517 511 518 public function media_buttons_add_mf(){ 512 519 -
magic-fields-2/trunk/main.php
r912162 r958257 4 4 Plugin URI: http://magicfields.org 5 5 Description: Create custom fields for your post types 6 Version: 2.2.2. 16 Version: 2.2.2.2 7 7 Author: Hunk and Gnuget 8 8 Author URI: http://magicfields.org … … 238 238 /* Load JS and CSS for post page */ 239 239 $css_js = new mf_post(); 240 $css_js->check_exist_visual_editor();241 240 $css_js->load_js_css_base(); 242 241 $css_js->load_js_css_fields(); -
magic-fields-2/trunk/mf_extra.php
r906980 r958257 79 79 80 80 } 81 82 class Debug 83 { 84 /** 85 * Writes log info to a file 86 * @param $msg string the message to write out 87 * @param $path string the location to write the messages 88 * @return null 89 */ 90 static function log($msg,$path = "") { 91 if(empty($path)){ 92 $path = MF_FILES_DIR; 93 } 94 95 if(!is_string($msg)){ 96 $msg = print_r($msg,true); 97 } 98 99 $fp = fopen($path.'magic_fields.log', 'a+'); 100 $date = gmdate( 'Y-m-d H:i:s' ); 101 fwrite($fp, "$date - $msg\n"); 102 fclose($fp); 103 } 104 } -
magic-fields-2/trunk/mf_register.php
r912162 r958257 36 36 $option['supports'][] = $k; 37 37 } 38 } 39 40 if (!in_array("editor", $option['supports'])) { 41 $option['supports'][] = 'editor'; 38 42 } 39 43 -
magic-fields-2/trunk/readme.txt
r912162 r958257 5 5 Requires at least: 3.1 6 6 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=edgar%40programador%2ecom&lc=GB&item_name=Donation%20Magic%20Fields¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest 7 Stable tag: 2.2.2. 17 Stable tag: 2.2.2.2 8 8 Description: Magic Fields 2 is a feature rich Wordpress CMS plugin 9 9 … … 26 26 27 27 == Changelog == 28 29 = 2.2.2.2 = 30 * fix problem with editor, featured image and more 31 * fix problem in delete item of custom post type 28 32 29 33 = 2.2.2.1 =
Note: See TracChangeset
for help on using the changeset viewer.