Changeset 1369565
- Timestamp:
- 03/11/2016 11:23:47 PM (10 years ago)
- File:
-
- 1 edited
-
super-subpages/super-subpages.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
super-subpages/super-subpages.php
r1366863 r1369565 1 1 <?php 2 2 /** 3 * Plugin Name: Super Subpage Display4 * Plugin URI: http://jessemorgan.me/super-subpage -display5 * Description: A simple plugin for displaying subpages of the current page, with the options for depth and list style. Can be used as a widget or placed anywhere in a template file using <code>superSubpages()</code>and custom styles can be applied using the class <code>super-subpages</code>.6 * Version: 1. 03 * Plugin Name: Super Subpages 4 * Plugin URI: http://jessemorgan.me/super-subpages 5 * Description: A simple plugin for displaying subpages of the current page, with the options for depth and list style. Can be used as a widget, placed anywhere in a template file using <code>superSubpages()</code>, or inserting the shortcode <code>[super_subpages]</code> on any page and custom styles can be applied using the class <code>super-subpages</code>. 6 * Version: 1.1 7 7 * Author: Jesse Morgan 8 8 * Author URI: http://jessemorgan.me/ … … 90 90 91 91 <form method="post" action="" id="super-subpages-form"> 92 <!-- input type="text" name="style[]" />93 <input type="text" name="style[]" />94 <input type="text" name="style[]" />95 <input type="text" name="style[]" / -->96 92 <label for="pages-deep">How many levels deep?</label> 97 93 <input type="number" name="pages-deep" id="pages-deep" min="1" max="4" value="<?php echo esc_attr($getCurrentOptions[0]->levels);?>" /><br /> … … 241 237 ?> 242 238 <style> 243 .super-subpages { list-style-type:<?php echo $getCurrentOptions[0]->style_one; ?>; } 244 .super-subpages li ul { list-style-type:<?php echo $getCurrentOptions[0]->style_two; ?>; } 245 .super-subpages li ul li ul { list-style-type:<?php echo $getCurrentOptions[0]->style_three; ?>; } 246 .super-subpages li ul li ul li ul { list-style-type:<?php echo $getCurrentOptions[0]->style_four; ?>; } 239 .super-subpages { list-style-type:<?php echo $getCurrentOptions[0]->style_one; ?>; } 240 <?php 241 if($getCurrentOptions[0]->style_two != ''){ 242 echo '.super-subpages li ul { list-style-type:'.$getCurrentOptions[0]->style_two.'; }'; 243 } 244 if($getCurrentOptions[0]->style_three != ''){ 245 echo '.super-subpages li ul { list-style-type:'.$getCurrentOptions[0]->style_three.'; }'; 246 } 247 if($getCurrentOptions[0]->style_four != ''){ 248 echo '.super-subpages li ul { list-style-type:'.$getCurrentOptions[0]->style_four.'; }'; 249 } 250 ?> 247 251 </style> 248 252 <ul class="super-subpages"> 249 <?php echo esc_html($sidelinks); ?>253 <?php echo $sidelinks; ?> 250 254 </ul> 251 255 <?php … … 297 301 <style> 298 302 .super-subpages { list-style-type:<?php echo $getCurrentOptions[0]->style_one; ?>; } 299 .super-subpages li ul { list-style-type:<?php echo $getCurrentOptions[0]->style_two; ?>; } 300 .super-subpages li ul li ul { list-style-type:<?php echo $getCurrentOptions[0]->style_three; ?>; } 301 .super-subpages li ul li ul li ul { list-style-type:<?php echo $getCurrentOptions[0]->style_four; ?>; } 303 <?php 304 if($getCurrentOptions[0]->style_two != ''){ 305 echo '.super-subpages li ul { list-style-type:'.$getCurrentOptions[0]->style_two.'; }'; 306 } 307 if($getCurrentOptions[0]->style_three != ''){ 308 echo '.super-subpages li ul { list-style-type:'.$getCurrentOptions[0]->style_three.'; }'; 309 } 310 if($getCurrentOptions[0]->style_four != ''){ 311 echo '.super-subpages li ul { list-style-type:'.$getCurrentOptions[0]->style_four.'; }'; 312 } 313 ?> 302 314 </style> 303 315 <ul class="super-subpages"> 304 <?php echo esc_html($sidelinks); ?>316 <?php echo $sidelinks; ?> 305 317 </ul> 306 318 <?php 307 319 } 308 ?> 320 321 add_shortcode('super_subpages','superSubpages'); 322 323 ?>
Note: See TracChangeset
for help on using the changeset viewer.