Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created September 27, 2013 00:13
Show Gist options
  • Save cliffordp/6722437 to your computer and use it in GitHub Desktop.
Save cliffordp/6722437 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: PageLines DMS Tell Me Type and Template
Author: TourKick (Clifford P)
Author URI: http://tourkick.com/?utm_source=pagelines&utm_medium=plugin&utm_content=pluginuri&utm_campaign=dmstellmetemplate
Plugin URI: http://www.pagelinestheme.com/tell-me-dms-type-template/?utm_source=pagelines&utm_medium=plugin&utm_content=pluginuri&utm_campaign=dmstellmetemplate
Description: Shows logged in editors which PageLines DMS "page type" and "applied template" is detected by the DMS Editor. May also choose to copy code directly into your DMS child theme's functions.php file instead of activating this plugin. <a href="http://www.pagelinestheme.com/tell-me-dms-type-template/" target="_blank">http://www.pagelinestheme.com/tell-me-dms-type-template/</a> may also be helpful.
License: GPLv2
Version: 1.0.20131002
*/
add_action('pagelines_page', 'tellmepldmstypetemplate'); // many other hooks, like wp_header, conflict with PL Action Map
function tellmepldmstypetemplate(){
if( function_exists('pl_has_editor') && current_user_can('edit_theme_options') ){
global $plpg;
echo '<span class="tellmepldmstypetemplate alert-info">PageLines Page Type: <strong>' . $plpg->type_name . '</strong>. Applied Template: <strong>' . $plpg->template . '</strong>.</span>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment