Changeset 1985016
- Timestamp:
- 12/04/2018 09:57:25 AM (7 years ago)
- Location:
- register-sidebar-by-admin/trunk
- Files:
-
- 3 edited
-
register-sidebar-by-admin.php (modified) (3 diffs)
-
screenshot-1.png (modified) (previous)
-
screenshot-2.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
register-sidebar-by-admin/trunk/register-sidebar-by-admin.php
r1984854 r1985016 82 82 if(!$is_nonce_valid) return array('status'=>false,'msg'=>"Error occurred! Form not secure."); 83 83 $_new_sidebars = array(); 84 $key = ' dyn-sidebar-' . sanitize_key( $data['_dyn_sidebar_name'] );84 $key = 'register-sidebar-by-admin-' . sanitize_key( $data['_dyn_sidebar_name'] ); 85 85 $_new_sidebars[$key] = array('id'=>$key,'name'=>$data['_dyn_sidebar_name'],'description'=>$data['_dyn_sidebar_description']); 86 86 if($_old_sidebars = get_option('_dynamic_register_sidebars')){ … … 129 129 public function register_sidebars_by_admin_view_callback(){ 130 130 echo '<div class="wrap"><div id="icon-tools" class="icon32"></div>'; 131 echo '<h2> Dynamically Register Sidebars</h2>';131 echo '<h2>Register Sidebars By Admin</h2>'; 132 132 $response = null; 133 133 if(isset($_REQUEST['frm-action']) && !empty($_REQUEST['frm-action'])){ /*Apply Form Action*/ … … 149 149 <?php } ?> 150 150 <ul class="dynamic_sidebar_list"> 151 <?php foreach ($_register_siderbar_arr as $sidebar ) { ?> 151 <?php 152 $count_sidebar = 1; 153 foreach ($_register_siderbar_arr as $sidebar ) { ?> 152 154 <li> 153 155 <div class="item" data-sidebar-id="<?php echo $sidebar['id'];?>"> 154 156 <span><?php echo ucwords( $sidebar['name'] );?></span> 157 <?php if ( $count_sidebar != 1 ): echo '<span>Sidebar Key - '.'register-sidebar-by-admin-' . sanitize_key( $sidebar['name'] ).'</span>'; endif; $count_sidebar = $count_sidebar + 1?> 155 158 <?php if($_register_siderbar && array_key_exists($sidebar['id'],$_register_siderbar)){ ?> 156 159 <a class="actions edit-sidebar" title="Edit Sidebar" href="javascript:"><span class="dashicons dashicons-edit"></span></a>
Note: See TracChangeset
for help on using the changeset viewer.