Plugin Directory

Changeset 1130505


Ignore:
Timestamp:
04/08/2015 03:30:40 PM (10 years ago)
Author:
Aurelien
Message:

Add special cap. News images in assets

Location:
display-template-name
Files:
4 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • display-template-name/trunk/display-template-name.php

    r847740 r1130505  
    22/*
    33Plugin Name: Display Template Name
    4 Description: Displays the name of the template used by the currently displayed page. Plugins very useful for developing your blog.
     4Description: Displays the name of the template used by the currently displayed page in the admin bar or inside the pages. Plugins very useful for developing your blog.
    55Version: 1.5
    66Author: Aurélien Chappard
     
    3232
    3333        function init() {
     34            // add special cap
     35            $admin_role = get_role("administrator");
     36            $admin_role->add_cap( 'view_template_name' );
     37           
     38            //get option
    3439            $this->getAdminOptions();
    3540        }
     
    136141               
    137142                // Css position according to the showing admin bar
    138                 if(!is_admin_bar_showing())
     143                if( !is_admin_bar_showing() && current_user_can('view_template_name') )
    139144                {
    140145                    $top = "0px";
     
    235240        function displayTplNameAdminBar()
    236241        {
    237             if(!is_admin() && is_admin_bar_showing()){
     242            if(!is_admin() && is_admin_bar_showing() && current_user_can('view_template_name') ){
    238243                global $wp_admin_bar;
    239244                $templateInfos = $this->get_current_template();
  • display-template-name/trunk/readme.txt

    r847740 r1130505  
    22Tags: developpement, template
    33Requires at least: 3.0.0
    4 Tested up to: 3.8
    5 Stable tag: 1.5
     4Tested up to: 4.1.1
     5Stable tag: 1.6
    66
    77
    88== Description ==
    99
    10 Displays the name of the template used by the currently displayed page. Plugins very useful for developing your blog.
     10Displays the name of the template used by the currently displayed page in the admin bar or inside the pages. Plugins very useful for developing your blog.
    1111
    1212
     
    2424
    2525== Changelog ==
     26
     27= 1.6 =
     28* Add special capability
    2629
    2730= 1.5 =
Note: See TracChangeset for help on using the changeset viewer.