-
-
Save aubreypwd/d38291898529be1ec351 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Test | |
* Plugin URI: | |
* Description: | |
* Version: | |
* Author: | |
* Author URI: | |
* License: GPL2 | |
*/ | |
/* Copyright YEAR PLUGIN_AUTHOR_NAME (email : PLUGIN AUTHOR EMAIL) | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License, version 2, as | |
published by the Free Software Foundation. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with this program; if not, write to the Free Software | |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
*/ | |
function a(){ | |
// define the way the pages should be displayed | |
$args = array(); | |
$args['title_li'] = ''; | |
$args['echo'] = '0'; | |
$list_pages = wp_list_pages($args); | |
if (!empty($list_pages)) { | |
$return = '<h2 class="wsp-pages-title">'.__('Pages', 'wp_sitemap_page').'</h2>'; | |
$return .= '<ul class="wsp-pages-list">'; | |
$return .= $list_pages; | |
$return .= '</ul>'; | |
} | |
return apply_filters('the_content', $return); | |
} | |
add_shortcode('a','a'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment