Plugin Directory

Changeset 1808453


Ignore:
Timestamp:
01/24/2018 10:25:22 AM (8 years ago)
Author:
afzalmultani
Message:

Compatibility Check

Location:
am-wp-which-template/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • am-wp-which-template/trunk/am-wp-which-template.php

    r1582853 r1808453  
    1111*/
    1212
    13 
    1413function amwpwt_admin_bar_init() {
    1514    // If not an admin or if admin bar isn't showing, do nothing
    16     if (!is_super_admin() || !is_admin_bar_showing() )
     15    if ( ! is_super_admin() || ! is_admin_bar_showing() ) {
    1716        return;
    18  
    19     add_action('admin_bar_menu', 'amwpwt_admin_bar_links', 500);
     17    }
     18
     19    add_action( 'admin_bar_menu', 'amwpwt_admin_bar_links', 500 );
    2020}
    2121
    22 add_action('admin_bar_init', 'amwpwt_admin_bar_init');
     22add_action( 'admin_bar_init', 'amwpwt_admin_bar_init' );
    2323
    2424function amwpwt_admin_bar_links() {
    2525    global $wp_admin_bar, $template;
    26    
     26
    2727    // clean up path
    28     $url = content_url();
    29     $template_name = substr( $template, ( strpos( $template , $url) ) );
     28    $url           = content_url();
     29    $template_name = substr( $template, ( strpos( $template, $url ) ) );
    3030
    3131    // Add as a parent menu
    3232    $wp_admin_bar->add_menu( array(
    3333        'title' => $template_name,
    34         'href' => false,
    35         'id' => 'amwpwt_links',
    36         'href' => false
    37     ));
     34        'href'  => false,
     35        'id'    => 'amwpwt_links',
     36        'href'  => false
     37    ) );
    3838}
  • am-wp-which-template/trunk/readme.txt

    r1604740 r1808453  
    11=== WP Template Name ===
    22
    3 Plugin Name: WP Template Name
     3Plugin Name: WordPress Which Template
    44Plugin URI: http://afzalmultani.com/
    55Author: Afzal Multani
     
    88Tags: which file, file, what file, template, which template, debug
    99Requires at least: 4.6
    10 Tested up to: 4.7
     10Tested up to: 4.9.2
    1111License: GPLv2 or later
    1212
    1313
    14 This is a debugging plugin that displays the current php file that is loading on the front end of the website.
     14This is a debugging plugin that displays the current php file that is loading on the front end of the website WordPress header.
    1515
    1616== Description ==
     
    2828= 1.0.0
    2929* This is the first version
     30* Compatibility check
Note: See TracChangeset for help on using the changeset viewer.