Changeset 1495638
- Timestamp:
- 09/14/2016 08:39:08 AM (10 years ago)
- Location:
- wp-extend-toolbar/trunk
- Files:
-
- 3 edited
-
js/wp-extend-toolbar.js (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
-
wp-extend-toolbar.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-extend-toolbar/trunk/js/wp-extend-toolbar.js
r1379207 r1495638 1 jQuery( document).ready(function(jQuery){1 jQuery(function($){ 2 2 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'}); 5 7 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 } 26 34 }); -
wp-extend-toolbar/trunk/readme.txt
r1379207 r1495638 3 3 Tags: plugin, admin bar, tool bar, custom admin bar, custom tool bar 4 4 Requires at least: 4.0 5 Tested up to: 4. 46 Stable tag: 1. 1.55 Tested up to: 4.6.1 6 Stable tag: 1.2.1 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 17 17 * content of Title tag. 18 18 * content of Description tag. 19 * content of Current Theme name. 19 20 * content of Current Template file name. 20 21 … … 23 24 * Title タグの内容 24 25 * Description タグの内容 26 * テーマ名 25 27 * テンプレートファイル名 26 28 … … 39 41 40 42 == 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 * テーマ名の表示を追加。 41 55 42 56 = 1.1.5 = -
wp-extend-toolbar/trunk/wp-extend-toolbar.php
r1379207 r1495638 5 5 Description: Adds a page information to the admin bar. 6 6 Author: Michinari Odajima 7 Version: 1. 1.57 Version: 1.2.1 8 8 Author URI: http://piece-web.jp/ 9 9 Domain Path: /language … … 13 13 class WP_Extend_Toolbar { 14 14 15 function WP_Extend_Toolbar() {15 function __construct() { 16 16 17 17 add_theme_support( 'admin-bar', array( 'callback' => '__return_false' ) ); … … 37 37 'id' => 'extend-toolbar', 38 38 'meta' => array( 39 'class' => 'ab-extend-toolbar',39 'class' => 'ab-extend-toolbar', 40 40 ), 41 41 ) ); … … 56 56 57 57 $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(), 59 60 basename( $template ) 60 61 ); … … 71 72 function enqueue() { 72 73 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 ); 75 76 76 77 }
Note: See TracChangeset
for help on using the changeset viewer.