Plugin Directory

Changeset 1583570


Ignore:
Timestamp:
01/27/2017 02:06:40 PM (9 years ago)
Author:
shokola
Message:
  • Add image preview
  • Set WP version visible for admin users
Location:
shokola-custom-white-label
Files:
19 added
5 edited

Legend:

Unmodified
Added
Removed
  • shokola-custom-white-label/trunk/README.md

    r1562121 r1583570  
    6363
    6464##Changelog##
     65
     66 ###1.1.0 ###
     67
     68Release Date: January 27th, 2017
     69
     70* Add image preview
     71* Set WP version visible for admin users
    6572
    6673 ###1.0.11 ###
  • shokola-custom-white-label/trunk/admin/css/admin_style.css

    r1507460 r1583570  
     1.scwl-wrap{
     2
     3}
     4.scwl-wrap .image-preview{
     5    width: 150px;
     6    height: 150px;
     7}
     8.scwl-wrap .image-preview img{
     9    max-width: 100%;
     10    height: auto;
     11}
     12
    113li#wp-admin-bar-wp-logo {
    214    display: none;
  • shokola-custom-white-label/trunk/admin/js/admin_script.js

    r1508028 r1583570  
    55{
    66    var the_elmt = document.getElementById(the_id);
     7    var the_img_preview = document.getElementById(the_id + '_image_preview');
    78
    89    media_uploader = wp.media({
     
    2021
    2122        the_elmt.value = image_url;
     23        the_img_preview.src = image_url;
    2224
    2325    });
  • shokola-custom-white-label/trunk/readme.txt

    r1562121 r1583570  
    4444
    4545== Changelog ==
     46
     47= 1.1.0 =
     48
     49Release Date: January 27th, 2017
     50
     51* Add image preview
     52* Set WP version visible for admin users
    4653
    4754= 1.0.11 =
  • shokola-custom-white-label/trunk/shokola-custom-whitelabel.php

    r1562121 r1583570  
    2929    class Shokola_Custom_WhiteLabel {
    3030
    31         private $version = '1.0.11';
     31        private $version = '1.1.0';
    3232        private $plugin_slug = 'shokola-custom-whitelabel';
    3333
     
    153153            $settings = $this->shokola_custom_get_settings();
    154154            ?>
    155             <div class="wrap">
     155            <div class="wrap scwl-wrap">
    156156                <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
    157157
     
    216216
    217217
    218                                     <p class="description"
    219                                        id="tagline-description"><?php echo $setting['description']; ?></p>
     218                                    <p class="description" id="tagline-description"><?php echo $setting['description']; ?></p>
     219                                    <?php if ( $setting['type'] == 'file' && function_exists('wp_enqueue_media')) : ?>
     220                                        <p class="description"><?php echo __('Image preview', $this->plugin_slug); ?> :</p>
     221                                        <div class="image-preview">
     222                                            <img src="<?php echo $option_value; ?>" alt="Image preview" id="<?php echo $setting['key']; ?>_image_preview">
     223                                        </div>
     224                                    <?php endif; ?>
     225
    220226                                </td>
    221227                            </tr>
     
    359365
    360366        /**
    361          * BO - Footer - Remove version number for non Shokola user
     367         * BO - Footer - Remove version number for non admin user
    362368         */
    363369        public function remove_version_footer() {
    364             remove_filter( 'update_footer', 'core_update_footer' );
     370            if(!is_admin())
     371            {
     372                remove_filter( 'update_footer', 'core_update_footer' );
     373            }
    365374        }
    366375
     
    400409            $theme_dark          = get_option( 'shokola_theme_dark' );
    401410            $background_cover    = get_option( 'shokola_background_cover' );
    402             if ( $data = getimagesize( $logo_src ) ) {
     411
     412            if ( file_exists($logo_src) && $data = getimagesize( $logo_src ) ) {
    403413                $logo_src_width  = isset( $data[0] ) ? $data[0] : $default_width;
    404414                $logo_src_height = isset( $data[1] ) ? $data[1] : $default_height;
Note: See TracChangeset for help on using the changeset viewer.