• Resolved tolkodelo

    (@tolkodelo)


    I suggest you introduce a [divider] shortcode. In my copy of the plugin, I changed the code below line 162 as follows:

    foreach($linklist as $a){
    			if(strpos($a,"[divider]") !== false){
    				$newarrayline = '[divider]';
    			} else {
    				$newarrayline = explode('|', $a);
    				$newarrayline = array_map('trim', $newarrayline);
    				if(sizeof($newarrayline)<3) continue;
    			}
    			
    			array_push($finalarray, $newarrayline);
    		}
    
    		if(trim($list) != false) { ?>
    
    			<table class="skip-dashboard-link-widget">
    		<?php foreach ($finalarray as $dqlw_links){ 
    			if(is_array($dqlw_links)){?>
    				<tr valign="top">
    				<td scope="row">
    				<?php if(!empty($dqlw_links[3])){ ?>
    				<i class="fa fa-lg <?php echo $dqlw_links[3]; ?>" aria-hidden="true"></i> &nbsp;
    				<?php } ?>
    				<?php echo $dqlw_links[0]; ?></td>
    				<td><a href="<?php echo $dqlw_links[1]; ?>"  class="button-primary skip-dashboard-link-widget-button" target="<?php if(trim(esc_attr(get_option('dashboard_quick_link_widget_open_link')))=='on'){ echo "_blank"; }?>"><?php echo $dqlw_links[2]; ?></a></td>
    				</tr>
    			<?php
    			} else {
    				if($dqlw_links == '[divider]') echo '<tr><td colspan="2" style="padding:15px 0;"></td></tr><tr></tr>';
    			} ?>
    		<?php } ?>
    			</table>
    		<?php } ?>

    Inserts 2 blank rows. Could be a horizontal line.

  • The topic ‘Suggestion: introduce a divider shortcode’ is closed to new replies.