WordPress.org

Make WordPress Themes


Ignore:
Location:
ef-practical/1.0.1
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • ef-practical/1.0.1/functions.php

    r88605 r88605  
    219219add_action( 'wp_enqueue_scripts', 'practical_scripts' ); 
    220220 
    221 /** 
    222  * Author fields 
    223  */ 
    224 function practical_extra_profile_fields( $contact_methods ) { 
    225      
    226     $contact_methods['facebook']   = 'FaceBook URL'; 
    227     $contact_methods['twitter']    = 'Twitter Username'; 
    228     $contact_methods['googleplus'] = 'Google Plus'; 
    229     $contact_methods['youtube']    = 'YouTube URL'; 
    230     $contact_methods['pinterest']  = 'Pinterest URL'; 
    231     $contact_methods['instagram']  = 'Instagram URL'; 
    232     $contact_methods['linkedin']   = 'linkedIn URL'; 
    233     $contact_methods['flickr']     = 'Flickr URL'; 
    234      
    235     return $contact_methods; 
    236 } 
    237 add_filter( 'user_contactmethods', 'practical_extra_profile_fields', 10, 1 ); 
    238  
    239221// Excerpt length 
    240222if ( ! function_exists( 'practical_excerpt_length' ) ) { 
    241223     
    242224    function practical_excerpt_length( $length ) { 
    243         return get_theme_mod( 'practical_excerpt_length', $length ); 
     225        return absint( get_theme_mod( 'practical_excerpt_length', $length ) ); 
    244226    } 
    245227     
  • ef-practical/1.0.1/header.php

    r88605 r88605  
    1414    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    1515    <link rel="profile" href="http://gmpg.org/xfn/11"> 
    16     <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> 
    1716    <?php wp_head(); ?> 
    1817</head> 
  • ef-practical/1.0.1/inc/customizer.php

    r88605 r88605  
    336336            'label'    => esc_html__( 'E-mail', 'ef-practical' ), 
    337337            'section'  => 'practical_header_topbar_settings', 
    338             'default'  => 'youremail@info.com', 
     338            'default'  => 'youremail@example.com', 
    339339        )); 
    340340         
  • ef-practical/1.0.1/inc/extras.php

    r88605 r88605  
    135135function practical_pingback_header() { 
    136136    if ( is_singular() && pings_open() ) { 
    137         echo '<link rel="pingback" href="', esc_url( get_bloginfo( 'pingback_url' ) ), '">'; 
     137        printf( '<link rel="pingback" href="%s">' . "\n", get_bloginfo( 'pingback_url' ) ); 
    138138    } 
    139139} 
  • ef-practical/1.0.1/inc/metaboxes/sidebar-metabox.php

    r88605 r88605  
    3131        <label> 
    3232            <input type="radio" name="practical_page_sidebar" value="right_sidebar" <?php echo checked( $practical_sidebar, 'right_sidebar', false ); ?>> 
    33             <img src="<?php echo get_template_directory_uri() . '/images/layout/2cr.png'; /* WPCS: xss ok. */ ?>"> 
     33            <img src="<?php echo esc_url( get_template_directory_uri() . '/images/layout/2cr.png' ); /* WPCS: xss ok. */ ?>"> 
    3434        </label> 
    3535    </p> 
     
    3737        <label> 
    3838            <input type="radio" name="practical_page_sidebar" value="left_sidebar" <?php echo checked( $practical_sidebar, 'left_sidebar', false ); ?>> 
    39             <img src="<?php echo get_template_directory_uri() . '/images/layout/2cl.png'; /* WPCS: xss ok. */ ?>"> 
     39            <img src="<?php echo esc_url( get_template_directory_uri() . '/images/layout/2cl.png' ); /* WPCS: xss ok. */ ?>"> 
    4040        </label> 
    4141    </p> 
     
    4343        <label> 
    4444            <input type="radio" name="practical_page_sidebar" value="two_sidebar" <?php echo checked( $practical_sidebar, 'two_sidebar', false ); ?>> 
    45             <img src="<?php echo get_template_directory_uri() . '/images/layout/3cm.png'; /* WPCS: xss ok. */ ?>"> 
     45            <img src="<?php echo esc_url( get_template_directory_uri() . '/images/layout/3cm.png' ); /* WPCS: xss ok. */ ?>"> 
    4646        </label> 
    4747    </p> 
     
    4949        <label> 
    5050            <input type="radio" name="practical_page_sidebar" value="no_sidebar" <?php echo checked( $practical_sidebar, 'no_sidebar', false ); ?>> 
    51             <img src="<?php echo get_template_directory_uri() . '/images/layout/1c.png'; /* WPCS: xss ok. */ ?>"> 
     51            <img src="<?php echo esc_url( get_template_directory_uri() . '/images/layout/1c.png' ); /* WPCS: xss ok. */ ?>"> 
    5252        </label> 
    5353    </p> 
  • ef-practical/1.0.1/inc/template-tags.php

    r88605 r88605  
    104104                            } 
    105105                            if ( '' != $header_image_btn_text && '' != $header_image_btn_url ) { 
    106                                 echo '<a href="' . esc_url( $header_image_btn_url ) . '" class="button header-img-btn wow fadeInDown">' . wp_kses_post( $header_image_btn_text ) . '</a>'; 
     106                                echo '<a href="' . esc_url( $header_image_btn_url ) . '" class="button header-img-btn wow fadeInDown">' . esc_html( $header_image_btn_text ) . '</a>'; 
    107107                            } 
    108108                        ?> 
  • ef-practical/1.0.1/inc/tgm-plugin/tgm-init.php

    r88605 r88605  
    6363            'name'     => 'Kirki Customizer', 
    6464            'slug'     => 'kirki', 
    65             'required' => true, 
     65            'required' => false, 
    6666        ), 
    6767         
  • ef-practical/1.0.1/readme.txt

    r88605 r88605  
    55 
    66Requires at least: 4.4 
    7 Tested up to: 4.9 
    8 Stable tag: 1.0.0 
     7Tested up to: 4.9.4 
     8Version: 1.0.1 
    99License: GPLv2 or later 
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • ef-practical/1.0.1/style.css

    r88605 r88605  
    55Author URI: 
    66Description: Practical is a responsive theme with two types of layout, wide and boxed. It gives the choice of using sticky header for desktop, tablet and mobile. Also, three widget areas, grid blog posts up to six columns and many more.   
    7 Version: 1.0.0 
     7Version: 1.0.1 
    88License: GNU General Public License v2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • ef-practical/1.0.1/template-parts/author-info.php

    r88605 r88605  
    2727        </div> 
    2828    <?php endif ?> 
    29      
    30     <?php 
    31         if ( get_the_author_meta( 'url', $post_author ) || get_the_author_meta( 'facebook', $post_author ) || get_the_author_meta( 'twitter', $post_author ) || get_the_author_meta( 'googleplus', $post_author ) || get_the_author_meta( 'youtube', $post_author ) || get_the_author_meta( 'linkedin', $post_author ) || get_the_author_meta( 'pinterest', $post_author) || get_the_author_meta( 'flickr', $post_author ) || get_the_author_meta( 'instagram', $post_author ) ) : 
    32     ?> 
    33          
    34         <div class="author-social"> 
    35              
    36             <?php if ( $url = get_the_author_meta( 'url', $post_author ) ) : ?> 
    37                 <a class="social-icon globe" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-globe"></i><span></span></a> 
    38             <?php endif ?> 
    39              
    40             <?php if ( $url = get_the_author_meta( 'facebook', $post_author ) ) : ?> 
    41                 <a class="social-icon facebook" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-facebook"></i><span></span></a> 
    42             <?php endif ?> 
    43              
    44             <?php if ( $url = get_the_author_meta( 'twitter', $post_author ) ) : ?> 
    45                 <a class="social-icon twitter" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-twitter"></i><span></span></a> 
    46             <?php endif ?> 
    47              
    48             <?php if ( $url = get_the_author_meta( 'googleplus', $post_author ) ) : ?> 
    49                 <a class="social-icon google-plus" href="<?php echo esc_url( $url ); ?>?rel=author"><i class="fa fa-google-plus"></i><span></span></a> 
    50             <?php endif ?> 
    51              
    52             <?php if ( $url = get_the_author_meta( 'youtube', $post_author ) ) : ?> 
    53                 <a class="social-icon youtube" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-youtube"></i><span></span></a> 
    54             <?php endif ?> 
    55              
    56             <?php if ( $url = get_the_author_meta( 'pinterest', $post_author ) ) : ?> 
    57                 <a class="social-icon pinterest" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-pinterest"></i><span></span></a> 
    58             <?php endif ?> 
    59              
    60             <?php if ( $url = get_the_author_meta( 'instagram', $post_author ) ) : ?> 
    61                 <a class="social-icon instagram" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-instagram"></i><span></span></a> 
    62             <?php endif ?> 
    63              
    64             <?php if ( $url = get_the_author_meta( 'linkedin', $post_author ) ) : ?> 
    65                 <a class="social-icon linkedin" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-linkedin"></i><span></span></a> 
    66             <?php endif ?> 
    67              
    68             <?php if ( $url = get_the_author_meta( 'flickr', $post_author ) ) : ?> 
    69                 <a class="social-icon flickr" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-flickr"></i><span></span></a> 
    70             <?php endif ?> 
    71              
    72         </div> 
    73          
    74     <?php endif; ?> 
     29     
     30    <?php if ( $url = get_the_author_meta( 'url', $post_author ) ) : ?> 
     31    <div class="author-social"> 
     32        <a class="social-icon globe" href="<?php echo esc_url( $url ); ?>" rel="nofollow"><i class="fa fa-globe"></i><span></span></a> 
     33    </div> 
     34    <?php endif ?> 
    7535     
    7636</div> 
  • ef-practical/1.0.1/template-parts/header/top-bar.php

    r88605 r88605  
    11<?php 
    22    $contact_phone  = get_theme_mod( 'practical_contact_phone', '9876543210' ); 
    3     $contact_email  = get_theme_mod( 'practical_contact_email', 'youremail@info.com' ); 
     3    $contact_email  = get_theme_mod( 'practical_contact_email', 'youremail@example.com' ); 
    44    $top_bar_social = get_theme_mod( 'practical_top_bar_social', 1 ); 
    55?> 
Note: See TracChangeset for help on using the changeset viewer.