Changeset 2534465
- Timestamp:
- 05/19/2021 07:51:39 PM (5 years ago)
- Location:
- fpw-category-thumbnails/trunk
- Files:
-
- 2 edited
-
ajax/update.php (modified) (2 diffs)
-
classes/fpw-category-thumbnails-class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fpw-category-thumbnails/trunk/ajax/update.php
r2496446 r2534465 10 10 $cleanup = ( in_array( 'cleanup', $boxes ) ) ? true : false; 11 11 $abar = ( in_array( 'abar', $boxes ) ) ? true : false; 12 $ccats = ( in_array( 'ccats', $boxes ) ) ? true : false; 13 $cposts = ( in_array( 'cposts', $boxes ) ) ? true : false; 12 14 $fpt = ( in_array( 'fpt', $boxes ) ) ? true : false; 13 15 … … 16 18 $opt[ 'donotover' ] = $donotover; 17 19 $opt[ 'abar' ] = $abar; 20 $opt[ 'ccats' ] = $ccats; 21 $opt[ 'cposts' ] = $cposts; 18 22 $opt[ 'fpt' ] = $fpt; 19 23 $ok = update_option( 'fpw_category_thumb_opt', $opt ); -
fpw-category-thumbnails/trunk/classes/fpw-category-thumbnails-class.php
r2533432 r2534465 60 60 add_filter( 'plugin_action_links_fpw-category-thumbnails/fpw-category-thumbnails.php', array( $this, 'pluginLinks' ), 10, 2); 61 61 add_filter( 'plugin_row_meta', array( $this, 'pluginMetaLinks'), 10, 2 ); 62 add_filter('manage_edit-category_columns', array( $this, 'fpw_category_columns_head' ) ); 63 add_filter('manage_category_custom_column', array( $this, 'fpw_custom_category_column_content' ), 10, 3 ); 64 add_filter('manage_post_posts_columns', array( $this, 'fpw_posts_columns_head' ) ); 65 add_action('manage_post_posts_custom_column', array( $this, 'fpw_custom_posts_column_content' ), 10, 2 ); 62 if( $this->fctOptions['ccats'] ) { 63 add_filter('manage_edit-category_columns', array( $this, 'fpw_category_columns_head' ) ); 64 add_filter('manage_category_custom_column', array( $this, 'fpw_custom_category_column_content' ), 10, 3 ); 65 } 66 if( $this->fctOptions['cposts'] ) { 67 add_filter('manage_post_posts_columns', array( $this, 'fpw_posts_columns_head' ) ); 68 add_action('manage_post_posts_custom_column', array( $this, 'fpw_custom_posts_column_content' ), 10, 2 ); 69 } 66 70 } 67 71 … … 553 557 echo '> ' . __( "Remove plugin's data from database on uninstall", 'fpw-category-thumbnails' ) . '<br />'; 554 558 559 // add thumbnail column for categories list checkbox 560 echo '<input type="checkbox" class="option-group" id="box-ccats" name="ccats" value="ccats"'; 561 if ( $this->fctOptions[ 'ccats' ] ) 562 echo ' checked'; 563 echo '> ' . __( "Add thumbnail column to categories list", 'fpw-category-thumbnails' ) . '<br />'; 564 565 // add thumbnail column for posts list checkbox 566 echo '<input type="checkbox" class="option-group" id="box-cposts" name="cposts" value="cposts"'; 567 if ( $this->fctOptions[ 'cposts' ] ) 568 echo ' checked'; 569 echo '> ' . __( "Add thumbnail column to posts list", 'fpw-category-thumbnails' ) . '<br />'; 570 555 571 // enable FPW Post Thumbnails plugin checkbox 556 572 echo '<input type="checkbox" class="option-group" id="box-fpt" name="fpt" value="fpt"'; … … 670 686 'clean' => FALSE, 671 687 'donotover' => FALSE, 688 'ccats' => FALSE, 689 'cposts' => FALSE, 672 690 'fpt' => FALSE ); 673 691 … … 680 698 $needs_update = TRUE; 681 699 $opt[ 'donotover' ] = FALSE; 700 } 701 if ( !array_key_exists( 'ccats', $opt ) || !is_bool( $opt[ 'ccats' ] ) ) { 702 $needs_update = TRUE; 703 $opt[ 'ccats' ] = FALSE; 704 } 705 if ( !array_key_exists( 'cposts', $opt ) || !is_bool( $opt[ 'cposts' ] ) ) { 706 $needs_update = TRUE; 707 $opt[ 'cposts' ] = FALSE; 682 708 } 683 709 if ( !array_key_exists( 'fpt', $opt ) || !is_bool( $opt[ 'fpt' ] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.