Changeset 278347
- Timestamp:
- 07/08/2025 07:04:43 AM (5 months ago)
- Location:
- learnpress-coaching/0.7.7
- Files:
-
- 7 edited
- 1 copied
-
. (copied) (copied from learnpress-coaching/0.7.6)
-
functions.php (modified) (1 diff)
-
inc/customizer.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
-
template-parts/grid-layout.php (modified) (1 diff)
-
template-parts/related-posts.php (modified) (1 diff)
-
theme-color-option.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
learnpress-coaching/0.7.7/functions.php
r272696 r278347 607 607 } 608 608 609 function learnpress_coaching_enable_single_post_image_custom_dimention(){ 610 if(get_theme_mod('learnpress_coaching_single_post_featured_image_dimention') == 'Custom' ) { 611 return true; 612 } 613 return false; 614 } 615 609 616 function learnpress_coaching_show_post_color(){ 610 617 if(get_theme_mod('learnpress_coaching_post_featured_image') == 'Color' ) { -
learnpress-coaching/0.7.7/inc/customizer.php
r272696 r278347 2578 2578 )); 2579 2579 2580 $wp_customize->add_setting('learnpress_coaching_single_post_featured_image_dimention',array( 2581 'default' => 'Default', 2582 'sanitize_callback' => 'learnpress_coaching_sanitize_choices' 2583 )); 2584 $wp_customize->add_control('learnpress_coaching_single_post_featured_image_dimention',array( 2585 'type' => 'select', 2586 'label' => __('Single Post Featured Image Dimention','learnpress-coaching'), 2587 'choices' => array( 2588 'Default' => __('Default','learnpress-coaching'), 2589 'Custom' => __('Custom','learnpress-coaching'), 2590 ), 2591 'section' => 'learnpress_coaching_single_post_settings', 2592 )); 2593 2594 $wp_customize->add_setting( 'learnpress_coaching_single_post_featured_image_custom_width',array( 2595 'default' => '', 2596 'sanitize_callback' => 'sanitize_text_field' 2597 )); 2598 $wp_customize->add_control(new Learnpress_Coaching_Custom_Control( $wp_customize, 'learnpress_coaching_single_post_featured_image_custom_width', array( 2599 'label' => esc_html__( 'Single Post Featured Image Custom Width','learnpress-coaching' ), 2600 'section' => 'learnpress_coaching_single_post_settings', 2601 'input_attrs' => array( 2602 'min' => 0, 2603 'max' => 800, 2604 'step' => 1, 2605 ), 2606 'active_callback' => 'learnpress_coaching_enable_single_post_image_custom_dimention' 2607 ))); 2608 2609 $wp_customize->add_setting( 'learnpress_coaching_single_post_featured_image_custom_height',array( 2610 'default' => '', 2611 'sanitize_callback' => 'sanitize_text_field' 2612 )); 2613 $wp_customize->add_control(new Learnpress_Coaching_Custom_Control( $wp_customize, 'learnpress_coaching_single_post_featured_image_custom_height', array( 2614 'label' => esc_html__( 'Single Post Featured Image Custom Height','learnpress-coaching' ), 2615 'section' => 'learnpress_coaching_single_post_settings', 2616 'input_attrs' => array( 2617 'min' => 0, 2618 'max' => 800, 2619 'step' => 1, 2620 ), 2621 'active_callback' => 'learnpress_coaching_enable_single_post_image_custom_dimention' 2622 ))); 2623 2580 2624 $wp_customize->add_setting( 'learnpress_coaching_single_image_border_radius', array( 2581 2625 'default'=> 0, … … 2849 2893 )); 2850 2894 2895 $wp_customize->add_setting('learnpress_coaching_grid_post_content',array( 2896 'default' => 'Post Excerpt', 2897 'sanitize_callback' => 'learnpress_coaching_sanitize_choices' 2898 )); 2899 $wp_customize->add_control('learnpress_coaching_grid_post_content',array( 2900 'type' => 'radio', 2901 'label' => __('Grid Post Content Settings','learnpress-coaching'), 2902 'section' => 'learnpress_coaching_grid_settings', 2903 'choices' => array( 2904 'None' => __('None','learnpress-coaching'), 2905 'Post Excerpt' => __('Post Excerpt','learnpress-coaching'), 2906 'Post Content' => __('Post Content','learnpress-coaching'), 2907 ), 2908 ) ); 2909 2851 2910 $wp_customize->add_setting( 'learnpress_coaching_grid_post_excerpt_number', array( 2852 2911 'default' => 30, … … 2867 2926 ), 2868 2927 )); 2928 2929 $wp_customize->add_setting( 'learnpress_coaching_grid_excerpt_suffix', array( 2930 'default' => __('[...]','learnpress-coaching'), 2931 'sanitize_callback' => 'sanitize_text_field' 2932 ) ); 2933 $wp_customize->add_control( 'learnpress_coaching_grid_excerpt_suffix', array( 2934 'label' => esc_html__( 'Grid Post Excerpt Suffix','learnpress-coaching' ), 2935 'section' => 'learnpress_coaching_grid_settings', 2936 'type' => 'text', 2937 'settings' => 'learnpress_coaching_grid_excerpt_suffix', 2938 ) ); 2869 2939 2870 2940 //Related Post Settings … … 2990 3060 ), 2991 3061 ))); 3062 3063 $wp_customize->add_setting( 'learnpress_coaching_related_post_discription_suffix', array( 3064 'default' => __('[...]','learnpress-coaching'), 3065 'sanitize_callback' => 'sanitize_text_field' 3066 ) ); 3067 $wp_customize->add_control( 'learnpress_coaching_related_post_discription_suffix', array( 3068 'label' => esc_html__( 'Post Excerpt Suffix','learnpress-coaching' ), 3069 'section' => 'learnpress_coaching_related_settings', 3070 'type' => 'text', 3071 'settings' => 'learnpress_coaching_related_post_discription_suffix', 3072 ) ); 2992 3073 2993 3074 $wp_customize->add_setting('learnpress_coaching_related_post_featured_image',array( -
learnpress-coaching/0.7.7/readme.txt
r274296 r278347 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 0.7. 66 Stable tag: 0.7.7 7 7 Requires PHP: 7.2 8 8 License: GPLv3.0 or later … … 442 442 * Resolved css for notice and customizer. 443 443 444 = 0.7.7 = 445 * Added grid post content type option. 446 * Added related post excerpt option. 447 * Added single post custom image dimension option. 448 444 449 == Resources == 445 450 -
learnpress-coaching/0.7.7/style.css
r274296 r278347 8 8 Tested up to: 6.8 9 9 Requires PHP: 7.2 10 Version: 0.7. 610 Version: 0.7.7 11 11 License: GPLv3.0 or later 12 12 License URI: http://www.gnu.org/licenses/gps-3.0.html -
learnpress-coaching/0.7.7/template-parts/grid-layout.php
r251054 r278347 39 39 <?php }?> 40 40 <div class="new-text"> 41 <?php $learnpress_coaching_excerpt = get_the_excerpt(); echo esc_html( learnpress_coaching_string_limit_words( $learnpress_coaching_excerpt, esc_attr(get_theme_mod('learnpress_coaching_grid_post_excerpt_number','30')))); ?> <?php echo esc_html( get_theme_mod('learnpress_coaching_post_discription_suffix','[...]') ); ?> 42 </div> 41 <p> 42 <?php $learnpress_coaching_theme_lay = get_theme_mod( 'learnpress_coaching_grid_post_content','Post Excerpt'); 43 if($learnpress_coaching_theme_lay == 'Post Content'){ ?> 44 <?php the_content(); ?> 45 <?php } 46 if($learnpress_coaching_theme_lay == 'Post Excerpt'){ ?> 47 <?php $learnpress_coaching_excerpt = get_the_excerpt(); echo esc_html( learnpress_coaching_string_limit_words( $learnpress_coaching_excerpt, esc_attr(get_theme_mod('learnpress_coaching_grid_post_excerpt_number','30')))); ?> <?php echo esc_html( get_theme_mod('learnpress_coaching_grid_excerpt_suffix','[...]') ); ?> 48 <?php }?> 49 </p> 50 </div> 43 51 <?php if( get_theme_mod('learnpress_coaching_button_text','View More') != ''){ ?> 44 52 <div class="postbtn mt-4 text-start"> -
learnpress-coaching/0.7.7/template-parts/related-posts.php
r266833 r278347 59 59 </div> 60 60 <?php }?> 61 <?php $learnpress_coaching_excerpt = get_the_excerpt(); echo esc_html( learnpress_coaching_string_limit_words( $learnpress_coaching_excerpt, esc_attr(get_theme_mod('learnpress_coaching_related_post_excerpt_number','15')))); ?> <?php echo esc_html( get_theme_mod('learnpress_coaching_ post_discription_suffix','[...]') ); ?>61 <?php $learnpress_coaching_excerpt = get_the_excerpt(); echo esc_html( learnpress_coaching_string_limit_words( $learnpress_coaching_excerpt, esc_attr(get_theme_mod('learnpress_coaching_related_post_excerpt_number','15')))); ?> <?php echo esc_html( get_theme_mod('learnpress_coaching_related_post_discription_suffix','[...]') ); ?> 62 62 <?php if( get_theme_mod('learnpress_coaching_button_text','View More') != ''){ ?> 63 63 <div class="postbtn mt-4 text-start"> -
learnpress-coaching/0.7.7/theme-color-option.php
r272696 r278347 1032 1032 $learnpress_coaching_custom_css .='}'; 1033 1033 1034 // single featured image dimention 1035 $learnpress_coaching_single_post_featured_image_dimention = get_theme_mod('learnpress_coaching_single_post_featured_image_dimention', 'Default'); 1036 $learnpress_coaching_single_post_featured_image_custom_width = get_theme_mod('learnpress_coaching_single_post_featured_image_custom_width'); 1037 $learnpress_coaching_single_post_featured_image_custom_height = get_theme_mod('learnpress_coaching_single_post_featured_image_custom_height'); 1038 if($learnpress_coaching_single_post_featured_image_dimention == 'Custom'){ 1039 $learnpress_coaching_custom_css .='.single-post-page .feature-box img{'; 1040 $learnpress_coaching_custom_css .='width: '.esc_attr($learnpress_coaching_single_post_featured_image_custom_width).'px!important; height: '.esc_attr($learnpress_coaching_single_post_featured_image_custom_height).'px!important;'; 1041 $learnpress_coaching_custom_css .='}'; 1042 } 1043 1034 1044 // category color 1035 1045 $learnpress_coaching_category_color = get_theme_mod('learnpress_coaching_category_color');
Note: See TracChangeset
for help on using the changeset viewer.