Changeset 2109063
- Timestamp:
- 06/19/2019 05:02:21 PM (7 years ago)
- Location:
- image-studio/trunk/modules
- Files:
-
- 2 edited
-
hooks.php (modified) (9 diffs)
-
meta_box.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-studio/trunk/modules/hooks.php
r2108407 r2109063 41 41 $this->post_id = $post_id; 42 42 $this->image_path = get_attached_file( get_post_thumbnail_id( $this->post_id) ); 43 ;44 43 45 44 if( !$this->image_path || $this->image_path == '' ){ 46 $this->post_has_image = false; 47 } 48 45 $this->post_has_image = false; 46 } 49 47 50 48 $this->use_global = get_post_meta( $this->post_id, 'use_global', true ); 51 49 52 53 54 50 if( $this->use_global == 'no' ){ 55 51 $this->overlay_color = get_post_meta( $this->post_id, 'overlay_color', true ); … … 85 81 } 86 82 87 88 89 90 83 $this->social_sizes = array( 91 84 'facebook' => array( 'w' => 1200, 'h' => 628, 'name' => 'Facebook' ), … … 109 102 '970x90' => array( 'w' => 970, 'h' => 90 ), 110 103 ); 111 112 113 104 114 105 // init output strings … … 497 488 if( $this->text_position == 'top' ){ 498 489 $offset_fix = 10; 499 500 501 490 } 502 491 … … 505 494 } 506 495 507 508 496 if( $this->text_position == 'bottom' ){ 509 497 $offset_fix = 60; 510 511 498 } 512 499 … … 538 525 $type_space = $type_space[2] - $type_space[0]; 539 526 540 541 542 527 $max_char_amount = $let_num; 543 528 if( $type_space >= $max_string_width ){ … … 553 538 554 539 // calculate all offsets 555 556 540 $vert_active_area = $newheight - $newheight*0.1 - $newheight*0.1; 557 541 $common_block_top_offset = 0 + $newheight*0.1; … … 573 557 $text_top_offset = $text_top_offset + $category_block_height; 574 558 } 575 576 559 } 577 560 … … 590 573 } 591 574 } 592 593 575 594 576 if( $this->text_position == 'bottom' ){ -
image-studio/trunk/modules/meta_box.php
r2108407 r2109063 560 560 $image = new imageManipulator( $post->ID ); 561 561 562 $out .= '<optgroup label="Social Images">'; 562 563 foreach( $image->social_sizes as $key => $value ){ 563 564 $out .= '<option value="'.site_url().'?process_image=true&size='.$key.'&id='.$post->ID.'">'.$value['name']; 564 565 } 566 $out .= '</optgroup>'; 567 $out .= '<optgroup label="Ad Images">'; 565 568 foreach( $image->banner_sizes as $key => $value ){ 566 569 $out .= '<option value="'.site_url().'?process_image=true&size='.$key.'&id='.$post->ID.'">'.$key; 567 570 } 568 571 $out .= '</optgroup>'; 569 572 $out .= '</select> 570 573 </div> … … 572 575 <a href="" class="btn btn-info btn-sm" target="_blank" id="image_view_link">View</a> 573 576 <a href="" class="btn btn-warning btn-sm" target="_blank" download="download" id="image_download_link">Download</a> 574 575 576 577 577 </div> 578 578 </div> … … 776 776 777 777 $meta_box = array( 778 'title' => 'Image Overlap Settings',778 'title' => 'Image Studio', 779 779 'post_type' => $out_post_types, 780 780 'position' => 'advanced',
Note: See TracChangeset
for help on using the changeset viewer.