Make WordPress Themes

Changeset 278347


Ignore:
Timestamp:
07/08/2025 07:04:43 AM (5 months ago)
Author:
themedropbox
Message:

New version of LearnPress Coaching - 0.7.7

Location:
learnpress-coaching/0.7.7
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • learnpress-coaching/0.7.7/functions.php

    r272696 r278347  
    607607}
    608608
     609function 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
    609616function learnpress_coaching_show_post_color(){
    610617    if(get_theme_mod('learnpress_coaching_post_featured_image') == 'Color' ) {
  • learnpress-coaching/0.7.7/inc/customizer.php

    r272696 r278347  
    25782578   ));
    25792579
     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
    25802624   $wp_customize->add_setting( 'learnpress_coaching_single_image_border_radius', array(
    25812625        'default'=> 0,
     
    28492893    ));
    28502894
     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
    28512910    $wp_customize->add_setting( 'learnpress_coaching_grid_post_excerpt_number', array(
    28522911        'default'              => 30,
     
    28672926        ),
    28682927    ));
     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    ) );
    28692939
    28702940    //Related Post Settings
     
    29903060        ),
    29913061    )));
     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    ) );
    29923073
    29933074    $wp_customize->add_setting('learnpress_coaching_related_post_featured_image',array(
  • learnpress-coaching/0.7.7/readme.txt

    r274296 r278347  
    44Requires at least: 5.0
    55Tested up to: 6.8
    6 Stable tag: 0.7.6
     6Stable tag: 0.7.7
    77Requires PHP: 7.2
    88License: GPLv3.0 or later
     
    442442* Resolved css for notice and customizer.
    443443
     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
    444449== Resources ==
    445450
  • learnpress-coaching/0.7.7/style.css

    r274296 r278347  
    88Tested up to: 6.8
    99Requires PHP: 7.2
    10 Version: 0.7.6
     10Version: 0.7.7
    1111License: GPLv3.0 or later
    1212License URI: http://www.gnu.org/licenses/gps-3.0.html
  • learnpress-coaching/0.7.7/template-parts/grid-layout.php

    r251054 r278347  
    3939    <?php }?>
    4040    <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>
    4351    <?php if( get_theme_mod('learnpress_coaching_button_text','View More') != ''){ ?>
    4452      <div class="postbtn mt-4 text-start">
  • learnpress-coaching/0.7.7/template-parts/related-posts.php

    r266833 r278347  
    5959                            </div>
    6060                        <?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','[...]') ); ?>
    6262                        <?php if( get_theme_mod('learnpress_coaching_button_text','View More') != ''){ ?>
    6363                            <div class="postbtn mt-4 text-start">
  • learnpress-coaching/0.7.7/theme-color-option.php

    r272696 r278347  
    10321032    $learnpress_coaching_custom_css .='}';
    10331033
     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
    10341044    // category color
    10351045    $learnpress_coaching_category_color = get_theme_mod('learnpress_coaching_category_color');
Note: See TracChangeset for help on using the changeset viewer.