Plugin Directory

Changeset 1495638


Ignore:
Timestamp:
09/14/2016 08:39:08 AM (10 years ago)
Author:
michouse
Message:

Update to Version 1.2.1

Location:
wp-extend-toolbar/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-extend-toolbar/trunk/js/wp-extend-toolbar.js

    r1379207 r1495638  
    1 jQuery(document).ready(function(jQuery){
     1jQuery(function($){
    22   
    3     var title = jQuery("title").text();
    4     var description = jQuery("meta[name=description]").attr("content");
     3    var ua = navigator.userAgent;
     4    if($(window).width() < 748  ||  ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 ) {
     5       
     6        $('wp-admin-bar-extend-toolbar').css({'display':'none'});
    57   
    6     jQuery("#wp-admin-bar-extend-toolbar-title .ab-item").text("PAGE TITLE:" + title);
    7     jQuery("#wp-admin-bar-extend-toolbar-description .ab-item").text("DESCRIPTION:" + description);
    8    
    9     var total_height = 32;
    10     total_height += jQuery('#wp-admin-bar-extend-toolbar-title').height();
    11     total_height += jQuery('#wp-admin-bar-extend-toolbar-description').height();
    12    
    13     jQuery('html').css({
    14         'margin-top': total_height + 'px',
    15         'position': 'relative'
    16     });
    17     jQuery('* html body').css({
    18         'margin-top': total_height + 'px'
    19     });
    20     jQuery('#wpadminbar').css({
    21         'height': total_height + 'px'
    22     });
    23     jQuery('body.admin-bar .navbar-fixed-top').css({
    24         'cssText': 'top:' + total_height + 'px !important'
    25     });
     8    } else {
     9
     10        var title = $("title").text();
     11        var description = $("meta[name=description]").attr("content");
     12       
     13        $("#wp-admin-bar-extend-toolbar-title .ab-item").text("PAGE TITLE:" + title);
     14        $("#wp-admin-bar-extend-toolbar-description .ab-item").text("DESCRIPTION:" + description);
     15       
     16        var total_height = 32;
     17        total_height += $('#wp-admin-bar-extend-toolbar-title').height();
     18        total_height += $('#wp-admin-bar-extend-toolbar-description').height();
     19       
     20        $('html').css({
     21            'margin-top': total_height + 'px'
     22        });
     23        $('* html body').css({
     24            'margin-top': total_height + 'px'
     25        });
     26        $('#wpadminbar').css({
     27            'height': total_height + 'px'
     28        });
     29        $('body.admin-bar .navbar-fixed-top').css({
     30            'cssText': 'top:' + total_height + 'px !important'
     31        });
     32       
     33    }
    2634});
  • wp-extend-toolbar/trunk/readme.txt

    r1379207 r1495638  
    33Tags: plugin, admin bar, tool bar, custom admin bar, custom tool bar
    44Requires at least: 4.0
    5 Tested up to: 4.4
    6 Stable tag: 1.1.5
     5Tested up to: 4.6.1
     6Stable tag: 1.2.1
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1717* content of Title tag.
    1818* content of Description tag.
     19* content of Current Theme name.
    1920* content of Current Template file name.
    2021
     
    2324* Title タグの内容
    2425* Description タグの内容
     26* テーマ名
    2527* テンプレートファイル名
    2628
     
    3941
    4042== Changelog ==
     43
     44= 1.2.1 =
     45* It is set not to display when the smartphone.
     46* Adapt to PHP 7.x.
     47
     48* スマホ閲覧時に非表示。
     49* PHP 7.x 対応。
     50
     51= 1.2.0 =
     52* Display "Theme" to the admin bar.
     53
     54* テーマ名の表示を追加。
    4155
    4256= 1.1.5 =
  • wp-extend-toolbar/trunk/wp-extend-toolbar.php

    r1379207 r1495638  
    55 Description: Adds a page information to the admin bar.
    66 Author: Michinari Odajima
    7  Version: 1.1.5
     7 Version: 1.2.1
    88 Author URI: http://piece-web.jp/
    99 Domain Path: /language
     
    1313class WP_Extend_Toolbar {
    1414
    15     function WP_Extend_Toolbar() {
     15    function __construct() {
    1616       
    1717        add_theme_support( 'admin-bar', array( 'callback' => '__return_false' ) );
     
    3737            'id'     => 'extend-toolbar',
    3838            'meta'   => array(
    39             'class' => 'ab-extend-toolbar',
     39                'class' => 'ab-extend-toolbar',
    4040            ),
    4141        ) );
     
    5656       
    5757        $title = sprintf(
    58             '<span class="" style="font-size:13px;">テンプレート : </span> <span class="ab-label">%s</span>',
     58            '<span class="" style="font-size:13px;">テーマ : </span> <span class="ab-label">%s</span><span class="" style="font-size:13px;">テンプレート : </span> <span class="ab-label">%s</span>',
     59            get_template(),
    5960            basename( $template )
    6061        );
     
    7172    function enqueue() {
    7273       
    73         wp_enqueue_style( 'wp-extend-toolbar', plugins_url( "css/wp-extend-toolbar.css", __FILE__ ), array(), '1.1.4' );
    74         wp_enqueue_script( 'wp-extend-toolbar', plugins_url( "js/wp-extend-toolbar.js", __FILE__ ), array( 'jquery' ), '1.1.4', true );
     74        wp_enqueue_style( 'wp-extend-toolbar', plugins_url( "css/wp-extend-toolbar.css", __FILE__ ), array(), '1.2.1' );
     75        wp_enqueue_script( 'wp-extend-toolbar', plugins_url( "js/wp-extend-toolbar.js", __FILE__ ), array( 'jquery' ), '1.2.1', true );
    7576       
    7677    }
Note: See TracChangeset for help on using the changeset viewer.