diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-04-30 14:12:35 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-04-30 14:12:35 -0400 |
commit | 6dabd859b6af8c0230971ab145cfeb5967cea37b (patch) | |
tree | e120c56222cb4956217b0e0f9645b9b3eb4bbb92 /plugins/wordpress-mobile-pack/admin/pages/content.php | |
parent | Adding jetpack-4.0.2 (diff) | |
download | blogs-gentoo-6dabd859b6af8c0230971ab145cfeb5967cea37b.tar.gz blogs-gentoo-6dabd859b6af8c0230971ab145cfeb5967cea37b.tar.bz2 blogs-gentoo-6dabd859b6af8c0230971ab145cfeb5967cea37b.zip |
Update plugin wordpress-mobile-pack to 2.2.3
Diffstat (limited to 'plugins/wordpress-mobile-pack/admin/pages/content.php')
-rwxr-xr-x | plugins/wordpress-mobile-pack/admin/pages/content.php | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/plugins/wordpress-mobile-pack/admin/pages/content.php b/plugins/wordpress-mobile-pack/admin/pages/content.php index 7524000d..1f5b813f 100755 --- a/plugins/wordpress-mobile-pack/admin/pages/content.php +++ b/plugins/wordpress-mobile-pack/admin/pages/content.php @@ -154,17 +154,48 @@ } else
$arrOrderedCategories = $categories;
-
+
+ $categories_details = WMobilePack_Options::get_setting('categories_details');
+
foreach ($arrOrderedCategories as $key => $category):
$status = 'active';
if (in_array($category->cat_ID, $inactive_categories))
$status = 'inactive';
+
+ // check category icon path
+ $icon_path = '';
+ if (is_array($categories_details)) {
+
+ if (array_key_exists($category->cat_ID, $categories_details)) {
+
+ if (is_array($categories_details[$category->cat_ID])) {
+
+ if (array_key_exists('icon', $categories_details[$category->cat_ID])) {
+
+ $icon_path = $categories_details[$category->cat_ID]['icon'];
+
+ if ($icon_path != ''){
+ if (!file_exists(WMP_FILES_UPLOADS_DIR . $icon_path))
+ $icon_path = '';
+ else
+ $icon_path = WMP_FILES_UPLOADS_URL . $icon_path;
+ }
+ }
+ }
+ }
+ }
?>
<li data-category-id="<?php echo $category->cat_ID;?>" data-order="<?php echo $key;?>">
- <span class="status <?php echo $status;?>"><?php echo $status;?></span>
- <span class="title"><?php echo $category->name;?></span>
- <span class="posts"><?php echo $category->category_count != 1 ? $category->category_count.' posts' : '1 post';?> published</span>
+ <div class="row">
+ <span class="status <?php echo $status;?>"><?php echo $status;?></span>
+ <span class="pic <?php echo $icon_path == '' ? 'default' : ''?>" <?php if ($icon_path != ''):?>style="background-image: url(<?php echo $icon_path;?>);"<?php endif;?>></span>
+ <span class="title"><?php echo $category->name;?></span>
+ <span class="posts"><?php echo $category->category_count != 1 ? $category->category_count.' posts' : '1 post';?> published</span>
+ </div>
+ <div class="buttons">
+ <a href="<?php echo admin_url('admin.php?page=wmp-category-details&id='.$category->cat_ID);?>" class="edit" title="Edit category for mobile"></a>
+ </div>
</li>
<?php endforeach;?>
</ul>
|