Blog Designer - Version 1.0

Version Description

Download this release

Release Info

Developer solwininfotech
Plugin Icon 128x128 Blog Designer
Version 1.0
Comparing to
See all releases

Version 1.0

blog-designer.php ADDED
@@ -0,0 +1,1127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ Plugin Name: Blog Designer
4
+ Plugin URI:
5
+ Description: To make your blog design more attractive and colorful.
6
+ Version: 1.4.3
7
+ License: GPLv2 or later
8
+ */
9
+ add_action('admin_menu', 'wp_blog_designer_add_menu');
10
+ add_action('admin_init', 'wp_blog_designer_reg_function');
11
+ add_action('admin_init', 'wp_blog_designer_admin_stylesheet');
12
+ add_action('init', 'wp_blog_designer_front_stylesheet');
13
+ add_action('admin_init', 'wp_blog_designer_scripts');
14
+ add_action('wp_head', 'wp_blog_designer_stylesheet', 20);
15
+ add_shortcode('wp_blog_designer', 'wp_blog_designer_views');
16
+
17
+ register_activation_hook(__FILE__, 'wp_blog_designer_activate');
18
+
19
+ function wp_blog_designer_add_menu() {
20
+ add_menu_page('Blog designer', 'Blog designer', 'administrator', 'designer_settings', 'wp_blog_designer_menu_function');
21
+ add_submenu_page('designer_settings', 'Blog designer Settings', 'Settings', 'manage_options', 'designer_settings', 'wp_blog_designer_add_menu');
22
+ }
23
+
24
+ function wp_blog_designer_reg_function() {
25
+
26
+ if ('posts' == get_option('show_on_front') && '0' == get_option('page_on_front')) {
27
+ update_option("show_on_front", 'page');
28
+ update_option("page_on_front", 2);
29
+
30
+ $templates = array();
31
+ $templates['ID'] = 2;
32
+ $templates['post_content'] = '[wp_blog_designer]';
33
+ wp_update_post($templates);
34
+ }
35
+
36
+ $settings = get_option("wp_blog_designer_settings");
37
+ if (empty($settings)) {
38
+ $settings = array(
39
+ 'template_category' => '',
40
+ 'template_name' => 'classical',
41
+ 'template_bgcolor' => '#ffffff',
42
+ 'template_ftcolor' => '#58d658',
43
+ 'template_titlecolor' => '#1fab8e',
44
+ 'template_contentcolor' => '#7b95a6',
45
+ 'template_readmorecolor' => '#2376ad',
46
+ 'template_readmorebackcolor' => '#dcdee0',
47
+ 'template_alterbgcolor' => '#ffffff',
48
+ 'template_titlebackcolor' => '#ffffff'
49
+ );
50
+
51
+ add_option("wp_blog_designer_settings", $settings, '', 'yes');
52
+ }
53
+ }
54
+
55
+ if ($_REQUEST['action'] === 'save' && $_REQUEST['updated'] === 'true') {
56
+
57
+ update_option("page_on_front", $_POST['page_on_front']);
58
+ update_option("posts_per_page", $_POST['posts_per_page']);
59
+ update_option("rss_use_excerpt", $_POST['rss_use_excerpt']);
60
+ update_option("display_date", $_POST['display_date']);
61
+ update_option("display_author", $_POST['display_author']);
62
+ update_option("display_category", $_POST['display_category']);
63
+ update_option("display_tag", $_POST['display_tag']);
64
+
65
+ update_option("excerpt_length", $_POST['txtExcerptlength']);
66
+ update_option("read_more_text", $_POST['txtReadmoretext']);
67
+
68
+ update_option("template_alternativebackground", $_POST['template_alternativebackground']);
69
+
70
+ update_option("social_icon_style", $_POST['social_icon_style']);
71
+ update_option("facebook_link", $_POST['facebook_link']);
72
+ update_option("twitter_link", $_POST['twitter_link']);
73
+ update_option("google_link", $_POST['google_link']);
74
+ update_option("dribble_link", $_POST['dribble_link']);
75
+ update_option("pinterest_link", $_POST['pinterest_link']);
76
+ update_option("instagram_link", $_POST['instagram_link']);
77
+ update_option("linkedin_link", $_POST['linkedin_link']);
78
+
79
+
80
+ $o_templates = array();
81
+ $o_templates['ID'] = 2;
82
+ $o_templates['post_content'] = '';
83
+ wp_update_post($o_templates);
84
+
85
+ $templates = array();
86
+ $templates['ID'] = $_POST['page_on_front'];
87
+ $templates['post_content'] = '[wp_blog_designer]';
88
+ wp_update_post($templates);
89
+
90
+ $settings = $_POST;
91
+ $settings = is_array($settings) ? $settings : unserialize($settings);
92
+ $updated = update_option("wp_blog_designer_settings", $settings);
93
+ }
94
+
95
+ function wp_blog_designer_activate() {
96
+
97
+ }
98
+
99
+ function wp_blog_designer_admin_stylesheet() {
100
+
101
+ $adminstylesheetURL = plugins_url('css/admin.css', __FILE__);
102
+ $adminstylesheet = dirname(__FILE__) . '/css/admin.css';
103
+
104
+ $colorpickerstylesheetURL = plugins_url('css/colorpicker.css', __FILE__);
105
+ $colorpickerstylesheet = dirname(__FILE__) . '/css/colorpicker.css';
106
+
107
+
108
+ if (file_exists($adminstylesheet)) {
109
+
110
+ wp_register_style('wp-blog-designer-admin-stylesheets', $adminstylesheetURL);
111
+ wp_enqueue_style('wp-blog-designer-admin-stylesheets');
112
+ }
113
+
114
+ if (file_exists($colorpickerstylesheet)) {
115
+
116
+ wp_register_style('wp-blog-designer-colorpicker-stylesheets', $colorpickerstylesheetURL);
117
+ wp_enqueue_style('wp-blog-designer-colorpicker-stylesheets');
118
+ }
119
+
120
+
121
+ }
122
+ function wp_blog_designer_front_stylesheet(){
123
+
124
+ $fontawesomeiconURL = plugins_url('css/font-awesome.min.css', __FILE__);
125
+ $fontawesomeicon = dirname(__FILE__) . '/css/font-awesome.min.css';
126
+
127
+ if (file_exists($fontawesomeicon)) {
128
+
129
+ wp_register_style('wp-blog-designer-fontawesome-stylesheets', $fontawesomeiconURL);
130
+ wp_enqueue_style('wp-blog-designer-fontawesome-stylesheets');
131
+ }
132
+
133
+ }
134
+
135
+ function wp_blog_designer_scripts() {
136
+
137
+ wp_enqueue_script('jquery');
138
+ wp_enqueue_script('cpicker', plugins_url('/js/cpicker.js', __FILE__), '1.2');
139
+ wp_enqueue_script('eye', plugins_url('/js/eye.js', __FILE__), '2.0');
140
+ wp_enqueue_script('bound', plugins_url('/js/bound.js', __FILE__), '1.8.5');
141
+ wp_enqueue_script('designer', plugins_url('/js/designer.js', __FILE__), '1.0.2');
142
+ }
143
+
144
+ function wp_blog_designer_stylesheet() {
145
+
146
+ if (!is_admin()) {
147
+ $stylesheetURL = plugins_url('css/designer_css.php', __FILE__);
148
+ $stylesheet = dirname(__FILE__) . '/css/designer_css.php';
149
+
150
+ if (file_exists($stylesheet)) {
151
+ wp_register_style('wp-blog-designer-stylesheets', $stylesheetURL);
152
+ wp_enqueue_style('wp-blog-designer-stylesheets');
153
+ }
154
+ }
155
+ }
156
+
157
+ function continue_reading_link_temp() {
158
+ return ' <a href="' . esc_url(get_permalink()) . '">' . __('Read more', 'twentyeleven') . '</a>';
159
+ }
160
+
161
+ function auto_excerpt_more_template($more) {
162
+ return ' &hellip;' . continue_reading_link_temp();
163
+ }
164
+
165
+ add_filter('excerpt_more', 'auto_excerpt_more_template');
166
+
167
+ function custom_excerpt_length($length) {
168
+
169
+ if (get_option('excerpt_length') != '') {
170
+
171
+ return get_option('excerpt_length');
172
+
173
+ } else {
174
+
175
+ return 50;
176
+ }
177
+ }
178
+
179
+ add_filter('excerpt_length', 'custom_excerpt_length', 999);
180
+
181
+ function wp_blog_designer_views() {
182
+
183
+ $settings = get_option("wp_blog_designer_settings");
184
+
185
+ if (!isset($settings['template_name']) || empty($settings['template_name'])) {
186
+ return '[wp_blog_designer] ' . __('Invalid shortcode', 'wp_blog_designer') . '';
187
+ }
188
+
189
+ $theme = $settings['template_name'];
190
+ $cat = $settings['template_category'];
191
+
192
+ if (!empty($cat)) {
193
+ foreach ($cat as $catObj):
194
+ $category .= $catObj . ',';
195
+ endforeach;
196
+ $cat = rtrim($category, ',');
197
+ }else {
198
+ $cat = '';
199
+ }
200
+
201
+
202
+
203
+
204
+ $posts_per_page = get_option('posts_per_page');
205
+ $paged = lumiapaged();
206
+
207
+
208
+ $posts = query_posts(array('cat' => $cat, 'posts_per_page' => $posts_per_page, 'paged' => $paged));
209
+ $alter= 1;
210
+ while (have_posts()) : the_post();
211
+ if ($theme == 'classical') {
212
+ wp_classical_template();
213
+ } elseif ($theme == 'lightbreeze') {
214
+ if(get_option('template_alternativebackground') == 0){
215
+ if($alter % 2 == 0){
216
+ $alter_class = ' alternative-back';
217
+ }else{
218
+ $alter_class = ' ';
219
+ }
220
+ }
221
+ $class = ' lightbreeze';
222
+ wp_lightbreeze_template($alter_class);
223
+ $alter ++;
224
+ } elseif ($theme == 'spektrum') {
225
+
226
+ $class = ' spektrum';
227
+ wp_spektrum_template();
228
+ } elseif ($theme == 'evolution') {
229
+ if(get_option('template_alternativebackground') == 0){
230
+ if($alter % 2 == 0){
231
+ $alter_class = ' alternative-back';
232
+ }else{
233
+ $alter_class = ' ';
234
+ }
235
+ }
236
+ $class = ' evolution';
237
+ wp_evolution_template($alter_class);
238
+ $alter ++;
239
+ }
240
+ endwhile;
241
+
242
+ echo '<div class="wl_pagination_box' . $class . '">';
243
+ lumia_pagination();
244
+ echo '</div>';
245
+
246
+ wp_reset_query();
247
+ }
248
+
249
+ /* * **************************** display function for classical layout ************************************ */
250
+
251
+ function wp_classical_template() {
252
+ ?>
253
+
254
+ <div class="blog_template classical">
255
+ <div class="blog_header">
256
+ <?php the_post_thumbnail('full'); ?>
257
+ <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
258
+ <div class="metadatabox">
259
+ <?php
260
+ $display_date = get_option('display_date');
261
+ $display_author = get_option('display_author');
262
+ if ($display_author == 0 && $display_date == 0) {
263
+ ?>
264
+
265
+ <div class="icon-date"></div>Posted by <span><?php the_author(); ?></span> on <?php the_time(__('F d, Y')); ?>
266
+
267
+ <?php } elseif ($display_author == 1 && $display_date == 1) { ?>
268
+ <?php } elseif ($display_author == 0) { ?>
269
+ <div class="icon-date"></div>Posted by <span><?php the_author(); ?></span>
270
+ <?php } elseif ($display_date == 0) { ?>
271
+ <div class="icon-date"></div>Posted on <?php the_time(__('F d, Y')); ?>
272
+ <?php }
273
+ ?>
274
+ <div class="metacomments">
275
+ <i class="fa fa-comment"></i><?php comments_popup_link('0', '1', '%'); ?>
276
+ </div>
277
+ </div>
278
+ <?php if (get_option('display_category') == 0) { ?>
279
+ <span class="category-link">
280
+ Category:
281
+ <?php
282
+ $categories_list = get_the_category_list(__(', ', 'twentyeleven'));
283
+ if ($categories_list):
284
+ printf(__(' %2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $categories_list);
285
+ $show_sep = true;
286
+ endif;
287
+ ?>
288
+ </span>
289
+ <?php } ?>
290
+ <?php
291
+ if (get_option('display_tag') == 0) {
292
+ $tags_list = get_the_tag_list('', __(', ', 'twentyeleven'));
293
+ if ($tags_list):
294
+ ?>
295
+ <div class="tags">
296
+ <div class="icon-tags"></div>
297
+ <?php
298
+ printf(__('%2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list);
299
+ $show_sep = true;
300
+ ?>
301
+ </div>
302
+ <?php endif;
303
+ } ?>
304
+ </div>
305
+ <div class="post_content">
306
+ <?php if (get_option('rss_use_excerpt') == 0): ?>
307
+ <?php the_content(); ?>
308
+ <?php else: ?>
309
+ <?php
310
+ the_excerpt(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve'));
311
+ if (get_option('read_more_text') != '') {
312
+ echo '<a class="more-tag" href="' . get_permalink($post->ID) . '">' . get_option('read_more_text') . ' </a>';
313
+ } else {
314
+ echo ' <a class="more-tag" href="' . get_permalink($post->ID) . '">Read More</a>';
315
+ }
316
+ ?>
317
+
318
+ <?php endif; ?>
319
+ </div>
320
+ <div class="social-component">
321
+ <?php if (get_option('facebook_link') == 0): ?>
322
+ <a href="<?php echo 'https://www.facebook.com/dialog/share?&href=' . get_the_permalink(); ?>" target= _blank class="facebook-share"><i class="fa fa-facebook"></i></a>
323
+ <?php endif; ?>
324
+ <?php if (get_option('twitter_link') == 0): ?>
325
+ <a href="<?php echo 'http://twitter.com/share?&url=' . get_the_permalink(); ?>" target= _blank class="twitter"><i class="fa fa-twitter"></i></a>
326
+ <?php endif; ?>
327
+ <?php if (get_option('google_link') == 0): ?>
328
+ <a href="<?php echo 'https://plus.google.com/share?url=' . get_the_permalink(); ?>" target= _blank class="google"><i class="fa fa-google-plus"></i></a>
329
+ <?php endif; ?>
330
+ <?php if (get_option('linkedin_link') == 0): ?>
331
+ <a href="<?php echo 'http://www.linkedin.com/shareArticle?url=' . get_the_permalink(); ?>" target= _blank class="linkedin"><i class="fa fa-linkedin"></i></a>
332
+ <?php endif; ?>
333
+ <?php if (get_option('instagram_link') == 0): ?>
334
+ <a href="<?php echo 'mailto:enteryour@addresshere.com?subject=Share and Follow&body=' . get_the_permalink(); ?>" target= _blank class="instagram"><i class="fa fa-envelope-o"></i></a>
335
+ <?php endif; ?>
336
+ <?php if (get_option('pinterest_link') == 0): ?>
337
+ <a href="<?php echo '//pinterest.com/pin/create/button/?url=' . get_the_permalink(); ?>" target= _blank class="pinterest"> <i class="fa fa-pinterest"></i></a>
338
+ <?php endif; ?>
339
+ </div>
340
+ </div>
341
+ <?php
342
+ }
343
+
344
+ /* * **************************** display function for lightbreeze layout ************************************ */
345
+
346
+ function wp_lightbreeze_template($alterclass) {
347
+ ?>
348
+
349
+ <div class="blog_template box-template active <?php echo $alterclass; ?>">
350
+ <div class="blog_header">
351
+ <?php the_post_thumbnail('full'); ?>
352
+ <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
353
+ <div class="meta_data_box">
354
+
355
+ <?php
356
+ $display_date = get_option('display_date');
357
+ $display_author = get_option('display_author');
358
+ if ($display_author == 0) {
359
+ ?>
360
+ <div class="metadate">
361
+ <i class="fa fa-user"></i>Posted by <span><?php the_author(); ?></span><br />
362
+ </div>
363
+
364
+ <?php
365
+ }
366
+ if ($display_date == 0) {
367
+ ?>
368
+
369
+
370
+ <div class="metauser">
371
+ <span class="mdate"><i class="fa fa-calendar"></i> <?php the_time(__('F d, Y')); ?></span>
372
+ </div>
373
+ <?php } ?>
374
+
375
+ <?php if (get_option('display_category') == 0) { ?>
376
+ <div class="metacats">
377
+ <div class="icon-cats"></div>
378
+ <?php
379
+ $categories_list = get_the_category_list(__(', ', 'twentyeleven'));
380
+ if ($categories_list):
381
+ printf(__('%2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $categories_list);
382
+ $show_sep = true;
383
+ endif;
384
+ ?>
385
+ </div>
386
+ <?php } ?>
387
+ <div class="metacomments">
388
+ <div class="icon-comment"></div>
389
+ <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>
390
+ </div>
391
+ </div></div>
392
+ <div class="post_content">
393
+ <?php if (get_option('rss_use_excerpt') == 0): ?>
394
+ <?php the_content(); ?>
395
+ <?php else: ?>
396
+ <?php
397
+ the_excerpt(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve'));
398
+ if (get_option('read_more_text') != '') {
399
+ echo '<a class="more-tag" href="' . get_permalink($post->ID) . '">' . get_option(read_more_text) . ' </a>';
400
+ } else {
401
+ echo ' <a class="more-tag" href="' . get_permalink($post->ID) . '">Read More</a>';
402
+ }
403
+ ?>
404
+ <?php endif; ?>
405
+ </div>
406
+ <?php
407
+ if (get_option('display_tag') == 0) {
408
+ $tags_list = get_the_tag_list('', __(', ', 'twentyeleven'));
409
+ if ($tags_list):
410
+ ?>
411
+ <div class="tags">
412
+ <div class="icon-tags"></div>
413
+ <?php
414
+ printf(__('%2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list);
415
+ $show_sep = true;
416
+ ?>
417
+ </div>
418
+ <?php endif;
419
+ } ?>
420
+ <div class="social-component">
421
+ <?php if (get_option('facebook_link') == 0): ?>
422
+ <a href="<?php echo 'https://www.facebook.com/dialog/share?&href=' . get_the_permalink(); ?>" target= _blank class="facebook-share"><i class="fa fa-facebook"></i></a>
423
+ <?php endif; ?>
424
+ <?php if (get_option('twitter_link') == 0): ?>
425
+ <a href="<?php echo 'http://twitter.com/share?&url=' . get_the_permalink(); ?>" target= _blank class="twitter"><i class="fa fa-twitter"></i></a>
426
+ <?php endif; ?>
427
+ <?php if (get_option('google_link') == 0): ?>
428
+ <a href="<?php echo 'https://plus.google.com/share?url=' . get_the_permalink(); ?>" target= _blank class="google"><i class="fa fa-google-plus"></i></a>
429
+ <?php endif; ?>
430
+ <?php if (get_option('linkedin_link') == 0): ?>
431
+ <a href="<?php echo 'http://www.linkedin.com/shareArticle?url=' . get_the_permalink(); ?>" target= _blank class="linkedin"><i class="fa fa-linkedin"></i></a>
432
+ <?php endif; ?>
433
+ <?php if (get_option('instagram_link') == 0): ?>
434
+ <a href="<?php echo 'mailto:enteryour@addresshere.com?subject=Share and Follow&body=' . get_the_permalink(); ?>" target= _blank class="instagram"><i class="fa fa-envelope-o"></i></a>
435
+ <?php endif; ?>
436
+ <?php if (get_option('pinterest_link') == 0): ?>
437
+ <a href="<?php echo '//pinterest.com/pin/create/button/?url=' . get_the_permalink(); ?>" target= _blank class="pinterest"> <i class="fa fa-pinterest"></i></a>
438
+ <?php endif; ?>
439
+ </div>
440
+ </div>
441
+ <?php
442
+ }
443
+
444
+ /* * **************************** display function for spektrum layout ************************************ */
445
+
446
+ function wp_spektrum_template() {
447
+ ?>
448
+
449
+ <div class="blog_template spektrum">
450
+ <?php the_post_thumbnail('full'); ?>
451
+ <div class="blog_header">
452
+ <?php if (get_option('display_date') == 0) { ?>
453
+ <span class="date"><span class="number-date"><?php the_time(__('d')); ?></span><?php the_time(__('F')); ?></span>
454
+ <?php } ?>
455
+ <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
456
+ </div>
457
+ <div class="post_content">
458
+ <?php if (get_option('rss_use_excerpt') == 0): ?>
459
+ <?php the_content(); ?>
460
+ <?php else: ?>
461
+ <?php the_excerpt(); ?>
462
+ <?php endif; ?>
463
+ </div>
464
+ <div class="post-bottom">
465
+ <?php if (get_option('display_category') == 0) { ?>
466
+ <span class="categories">
467
+ <?php
468
+ $categories_list = get_the_category_list(__(', ', 'twentyeleven'));
469
+ if ($categories_list):
470
+ printf(__('Catrgories : %2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $categories_list);
471
+ $show_sep = true;
472
+ endif;
473
+ ?>
474
+ </span>
475
+ <?php } ?>
476
+ <?php if (get_option('display_author') == 0) { ?>
477
+ <span class="post-by">
478
+ <div class="icon-author"></div>Posted by <span><?php the_author(); ?></span>
479
+ </span>
480
+ <?php } ?>
481
+ <?php
482
+ if (get_option('display_tag') == 0) {
483
+ $tags_list = get_the_tag_list('', __(', ', 'twentyeleven'));
484
+ if ($tags_list):
485
+ ?>
486
+ <span class="tags">
487
+ <div class="icon-tags"></div>
488
+ <?php
489
+ printf(__('%2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list);
490
+ $show_sep = true;
491
+ ?>
492
+ </span>
493
+ <?php endif;
494
+ } ?>
495
+ <?php if (get_option('rss_use_excerpt') == 1): ?>
496
+ <span class="details">
497
+ <?php
498
+ if (get_option('read_more_text') != '') {
499
+ echo '<a href="' . get_permalink($post->ID) . '">' . get_option(read_more_text) . ' </a>';
500
+ } else {
501
+ echo ' <a href="' . get_permalink($post->ID) . '">Read More</a>';
502
+ }
503
+ ?>
504
+ </span>
505
+ <?php endif; ?>
506
+ </div>
507
+ </div>
508
+ <div class="social-component spektrum-social">
509
+ <?php if (get_option('facebook_link') == 0): ?>
510
+ <a href="<?php echo 'https://www.facebook.com/dialog/share?&href=' . get_the_permalink(); ?>" target= _blank class="facebook-share"><i class="fa fa-facebook"></i></a>
511
+ <?php endif; ?>
512
+ <?php if (get_option('twitter_link') == 0): ?>
513
+ <a href="<?php echo 'http://twitter.com/share?&url=' . get_the_permalink(); ?>" target= _blank class="twitter"><i class="fa fa-twitter"></i></a>
514
+ <?php endif; ?>
515
+ <?php if (get_option('google_link') == 0): ?>
516
+ <a href="<?php echo 'https://plus.google.com/share?url=' . get_the_permalink(); ?>" target= _blank class="google"><i class="fa fa-google-plus"></i></a>
517
+ <?php endif; ?>
518
+ <?php if (get_option('linkedin_link') == 0): ?>
519
+ <a href="<?php echo 'http://www.linkedin.com/shareArticle?url=' . get_the_permalink(); ?>" target= _blank class="linkedin"><i class="fa fa-linkedin"></i></a>
520
+ <?php endif; ?>
521
+ <?php if (get_option('instagram_link') == 0): ?>
522
+ <a href="<?php echo 'mailto:enteryour@addresshere.com?subject=Share and Follow&body=' . get_the_permalink(); ?>" target= _blank class="instagram"><i class="fa fa-envelope-o"></i></a>
523
+ <?php endif; ?>
524
+ <?php if (get_option('pinterest_link') == 0): ?>
525
+ <a href="<?php echo '//pinterest.com/pin/create/button/?url=' . get_the_permalink(); ?>" target= _blank class="pinterest"> <i class="fa fa-pinterest"></i></a>
526
+ <?php endif; ?>
527
+ </div>
528
+ </div>
529
+ <?php
530
+ }
531
+
532
+ /* * **************************** display function for evolution layout ************************************ */
533
+
534
+ function wp_evolution_template($alterclass) {
535
+ ?>
536
+
537
+ <div class="blog_template marketer <?php echo $alterclass; ?>">
538
+ <div class="post-category">
539
+ <?php
540
+ if (get_option('display_category') == 0) {
541
+ ?>
542
+ <?php
543
+ $categories_list = get_the_category_list(__(', ', 'twentyeleven'));
544
+ if ($categories_list):
545
+ printf(__('%2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $categories_list);
546
+ $show_sep = true;
547
+ endif;
548
+ }
549
+ ?>
550
+ </div>
551
+ <h1 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
552
+ <div class="post-entry-meta">
553
+ <?php if (get_option('display_date') == 0) { ?>
554
+ <span class="date"><span class="number-date"><?php the_time(__('d')); ?></span><?php the_time(__('F')); ?></span>
555
+ <?php } ?>
556
+
557
+ <?php if (get_option('display_author') == 0) { ?>
558
+ <span class="author"> Posted by <?php the_author(); ?></span>
559
+ <?php
560
+ }
561
+ if (!post_password_required() && ( comments_open() || get_comments_number() )) :
562
+ ?>
563
+ <span class="comment"><span class="icon_cnt"><i class="fa fa-comment"></i><?php comments_popup_link('0', '1', '%'); ?></span></span>
564
+ <?php endif; ?>
565
+ <?php
566
+ if (get_option('display_tag') == 0) {
567
+ $tags_list = get_the_tag_list('', __(', ', 'twentyeleven'));
568
+ if ($tags_list):
569
+ ?>
570
+ <span class="tags">
571
+ <div class="icon-tags"></div>
572
+ <?php
573
+ printf(__('%2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list);
574
+ $show_sep = true;
575
+ ?>
576
+ </span>
577
+ <?php
578
+ endif;
579
+ }
580
+ ?>
581
+ </div>
582
+ <div class="post-image">
583
+ <?php the_post_thumbnail('full'); ?>
584
+ </div>
585
+ <div class="post-content-body">
586
+ <?php if (get_option('rss_use_excerpt') == 0): ?>
587
+ <?php the_content(); ?>
588
+ <?php else: ?>
589
+ <?php the_excerpt(); ?>
590
+ <?php endif; ?>
591
+ </div>
592
+ <?php if (get_option('rss_use_excerpt') == 1): ?>
593
+ <div class="post-bottom">
594
+ <?php
595
+ if (get_option('read_more_text') != '') {
596
+ echo '<a href="' . get_permalink($post->ID) . '">' . get_option(read_more_text) . ' </a>';
597
+ } else {
598
+ echo ' <a href="' . get_permalink($post->ID) . '">Read more &raquo;</a>';
599
+ }
600
+ ?>
601
+ </div>
602
+ <?php endif; ?>
603
+ <div class="social-component">
604
+ <?php if (get_option('facebook_link') == 0): ?>
605
+ <a href="<?php echo 'https://www.facebook.com/dialog/share?&href=' . get_the_permalink(); ?>" target= _blank class="facebook-share"><i class="fa fa-facebook"></i></a>
606
+ <?php endif; ?>
607
+ <?php if (get_option('twitter_link') == 0): ?>
608
+ <a href="<?php echo 'http://twitter.com/share?&url=' . get_the_permalink(); ?>" target= _blank class="twitter"><i class="fa fa-twitter"></i></a>
609
+ <?php endif; ?>
610
+ <?php if (get_option('google_link') == 0): ?>
611
+ <a href="<?php echo 'https://plus.google.com/share?url=' . get_the_permalink(); ?>" target= _blank class="google"><i class="fa fa-google-plus"></i></a>
612
+ <?php endif; ?>
613
+ <?php if (get_option('linkedin_link') == 0): ?>
614
+ <a href="<?php echo 'http://www.linkedin.com/shareArticle?url=' . get_the_permalink(); ?>" target= _blank class="linkedin"><i class="fa fa-linkedin"></i></a>
615
+ <?php endif; ?>
616
+ <?php if (get_option('instagram_link') == 0): ?>
617
+ <a href="<?php echo 'mailto:enteryour@addresshere.com?subject=Share and Follow&body=' . get_the_permalink(); ?>" target= _blank class="instagram"><i class="fa fa-envelope-o"></i></a>
618
+ <?php endif; ?>
619
+ <?php if (get_option('pinterest_link') == 0): ?>
620
+ <a href="<?php echo '//pinterest.com/pin/create/button/?url=' . get_the_permalink(); ?>" target= _blank class="pinterest"> <i class="fa fa-pinterest"></i></a>
621
+ <?php endif; ?>
622
+ </div>
623
+ </div>
624
+ <?php
625
+ }
626
+
627
+ function wp_blog_designer_menu_function() {
628
+ ?>
629
+
630
+ <div class="wrap">
631
+ <h2><?php _e('Blog Desiner Settings', 'wp-blog-desiner') ?></h2>
632
+ <?php if ('true' == esc_attr($_GET['updated'])) echo '<div class="updated" ><p>Designer Settings updated.</p></div>'; ?>
633
+ <?php $settings = get_option("wp_blog_designer_settings"); ?>
634
+ <form method="post" action="?page=designer_settings&action=save&updated=true">
635
+ <!--script type="text/javascript">jQuery( window ).load( function() { jQuery( "#template_category" ).attr( "multiple", "multiple" );});</script-->
636
+ <div class="wl-pages" >
637
+ <div class="wl-page wl-settings active">
638
+ <div class="wl-box wl-settings">
639
+ <h3 class="header"><?php _e('General Settings', 'wp-blog-desiner') ?></h3>
640
+ <table>
641
+ <tbody>
642
+ <tr>
643
+ <td><?php _e('Blog page displays', 'wp-blog-desiner') ?></td>
644
+ <td>
645
+ <?php printf(__('%s'), wp_dropdown_pages(array('name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __('&mdash; Select &mdash;'), 'option_none_value' => '0', 'selected' => get_option('page_on_front')))); ?>
646
+ </td>
647
+ </tr>
648
+ <tr>
649
+ <td><?php _e('Blog pages show at most', 'wp-blog-desiner') ?></td>
650
+ <td>
651
+ <input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="<?php echo get_option('posts_per_page'); ?>" class="small-text" /> <?php _e('posts'); ?>
652
+ </td>
653
+ </tr>
654
+
655
+ <tr>
656
+ <td><?php _e('Display Category ', 'wp-blog-desiner') ?></td>
657
+ <td>
658
+ <input name="display_category" type="radio" value="0" <?php checked(0, get_option('display_category')); ?> /> <?php _e('Yes'); ?>
659
+ <input name="display_category" type="radio" value="1" <?php checked(1, get_option('display_category')); ?> /> <?php _e('No'); ?>
660
+ </td>
661
+ </tr>
662
+ <tr>
663
+ <td><?php _e('Display Tag ', 'wp-blog-desiner') ?></td>
664
+ <td>
665
+ <input name="display_tag" type="radio" value="0" <?php checked(0, get_option('display_tag')); ?> /> <?php _e('Yes'); ?>
666
+ <input name="display_tag" type="radio" value="1" <?php checked(1, get_option('display_tag')); ?> /> <?php _e('No'); ?>
667
+ </td>
668
+ </tr>
669
+ <tr>
670
+ <td><?php _e('Display author ', 'wp-blog-desiner') ?></td>
671
+ <td>
672
+ <input name="display_author" type="radio" value="0" <?php checked(0, get_option('display_author')); ?> /> <?php _e('Yes'); ?>
673
+ <input name="display_author" type="radio" value="1" <?php checked(1, get_option('display_author')); ?> /> <?php _e('No'); ?>
674
+ </td>
675
+ </tr>
676
+ <tr>
677
+ <td><?php _e('Display date ', 'wp-blog-desiner') ?></td>
678
+ <td>
679
+ <input name="display_date" type="radio" value="0" <?php checked(0, get_option('display_date')); ?> /> <?php _e('Yes'); ?>
680
+ <input name="display_date" type="radio" value="1" <?php checked(1, get_option('display_date')); ?> /> <?php _e('No'); ?>
681
+ </td>
682
+ </tr>
683
+ </tbody>
684
+ </table>
685
+ <h3 class="header"><?php _e('Standard Settings', 'wp-blog-desiner') ?></h3>
686
+ <table>
687
+ <tbody>
688
+ <tr>
689
+ <td><?php _e('Blog page categories', 'wp-blog-desiner') ?></td>
690
+ <td>
691
+ <?php $categories = get_categories(array('child_of' => '', 'hide_empty' => 1)); ?>
692
+ <select name="template_category[]" id="template_category" multiple="multiple">
693
+ <option><?php echo '&mdash; Select &mdash;'; ?></option>
694
+ <?php foreach ($categories as $categoryObj): ?>
695
+ <option value="<?php echo $categoryObj->term_id; ?>" <?php
696
+ if (@in_array($categoryObj->term_id, $settings['template_category'])) {
697
+ echo 'selected="selected"';
698
+ }
699
+ ?>><?php echo $categoryObj->name; ?></option>
700
+ <?php endforeach; ?>
701
+ </select>
702
+ </td>
703
+ </tr>
704
+ <tr>
705
+ <td><?php _e('Blog Designs', 'wp-blog-desiner') ?></td>
706
+ <td>
707
+ <select name="template_name" id="template_name">
708
+ <option value="">---select---</option>
709
+ <option value="classical" <?php if ($settings["template_name"] == 'classical') { ?> selected="selected"<?php } ?>>Design 1</option>
710
+ <option value="lightbreeze" <?php if ($settings["template_name"] == 'lightbreeze') { ?> selected="selected"<?php } ?>>Design 2</option>
711
+ <option value="spektrum" <?php if ($settings["template_name"] == 'spektrum') { ?> selected="selected"<?php } ?>>Design 3</option>
712
+ <option value="evolution" <?php if ($settings["template_name"] == 'evolution') { ?> selected="selected"<?php } ?>>Design 4</option>
713
+ </select>
714
+ </td>
715
+ </tr>
716
+ <tr class="blog-template-tr">
717
+ <td><?php _e('Choose a background color for blog design', 'wp-blog-desiner') ?></td>
718
+ <td>
719
+ <div id="bgcolorSelector"><div style="background-color:<?php echo $settings["template_bgcolor"]; ?>"></div></div>
720
+ <input type="hidden" name="template_bgcolor" id="template_bgcolor" value="<?php echo $settings["template_bgcolor"]; ?>"/>
721
+ Alternative background color: <input type="radio" value="0" name="template_alternativebackground" <?php checked(0, get_option('template_alternativebackground')); ?> /> <?php _e('Yes'); ?>
722
+ <input type="radio" value="1" name="template_alternativebackground" <?php checked(1, get_option('template_alternativebackground')); ?> /> <?php _e('No'); ?>
723
+ </td>
724
+ </tr>
725
+ <tr class="alternative-color-tr">
726
+ <td><?php _e('Choose alternative background color', 'wp-blog-desiner') ?></td>
727
+ <td>
728
+ <div id="alterbgcolorSelector"><div style="background-color:<?php echo $settings["template_alterbgcolor"]; ?>"></div></div>
729
+ <input type="hidden" name="template_alterbgcolor" id="template_alterbgcolor" value="<?php echo $settings["template_alterbgcolor"]; ?>"/>
730
+ </td>
731
+ </tr>
732
+ <tr>
733
+ <td><?php _e('Choose font color for anchor tag in blog design', 'wp-blog-desiner') ?></td>
734
+ <td>
735
+ <div id="ftcolorSelector"><div style="background-color:<?php echo $settings["template_ftcolor"]; ?>"></div></div>
736
+ <input type="hidden" name="template_ftcolor" id="template_ftcolor" value="<?php echo $settings["template_ftcolor"]; ?>"/>
737
+ </td>
738
+ </tr>
739
+ </tbody>
740
+ </table>
741
+
742
+ <h3 class="header"><?php _e('Title Settings', 'wp-blog-desiner') ?></h3>
743
+ <table>
744
+ <tbody>
745
+ <tr>
746
+ <td><?php _e('Title color', 'wp-blog-desiner') ?></td>
747
+ <td>
748
+ <div id="titlecolorSelector"><div style="background-color:<?php echo $settings["template_titlecolor"]; ?>"></div></div>
749
+ <input type="hidden" name="template_titlecolor" id="template_titlecolor" value="<?php echo $settings["template_titlecolor"]; ?>"/>
750
+ </td>
751
+ </tr>
752
+ <tr>
753
+ <td><?php _e('Title background color', 'wp-blog-desiner') ?></td>
754
+ <td>
755
+ <div id="titlebackcolorSelector"><div style="background-color:<?php echo $settings["template_titlebackcolor"]; ?>"></div></div>
756
+ <input type="hidden" name="template_titlebackcolor" id="template_titlebackcolor" value="<?php echo $settings["template_titlebackcolor"]; ?>"/>
757
+ </td>
758
+ </tr>
759
+ </tbody>
760
+ </table>
761
+ <h3 class="header"><?php _e('Content Settings', 'wp-blog-desiner') ?></h3>
762
+ <table>
763
+ <tbody>
764
+ <tr>
765
+ <td><?php _e('For each article in a feed, show ', 'wp-blog-desiner') ?></td>
766
+ <td class="rss_use_excerpt">
767
+ <input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text'); ?>
768
+ <input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary'); ?>
769
+ </td>
770
+ </tr>
771
+ <tr class="excerpt_length">
772
+ <td><?php _e('Content length', 'wp-blog-desiner') ?></td>
773
+ <td >
774
+ <input type="text" name="txtExcerptlength" value="<?php echo get_option('excerpt_length'); ?>" placeholder="Enter excerpt length">
775
+ </td>
776
+ </tr>
777
+ <tr>
778
+ <td><?php _e('Content color', 'wp-blog-desiner') ?></td>
779
+ <td>
780
+ <div id="contentcolorSelector"><div style="background-color:<?php echo $settings["template_contentcolor"]; ?>"></div></div>
781
+ <input type="hidden" name="template_contentcolor" id="template_contentcolor" value="<?php echo $settings["template_contentcolor"]; ?>"/>
782
+ </td>
783
+ </tr>
784
+ <tr class="read_more_text">
785
+ <td><?php _e('Read more text', 'wp-blog-desiner') ?></td>
786
+ <td>
787
+ <input type="text" name="txtReadmoretext" value="<?php echo get_option('read_more_text'); ?>" placeholder="Enter read more text">
788
+ </td>
789
+ </tr>
790
+ <tr class="read_more_text_color">
791
+ <td><?php _e('Read more text color', 'wp-blog-desiner') ?></td>
792
+ <td>
793
+ <div id="readmorecolorSelector"><div style="background-color:<?php echo $settings["template_readmorecolor"]; ?>"></div></div>
794
+ <input type="hidden" name="template_readmorecolor" id="template_readmorecolor" value="<?php echo $settings["template_readmorecolor"]; ?>"/>
795
+ </td>
796
+ </tr>
797
+ <tr class="read_more_text_background">
798
+ <td><?php _e('Read more background', 'wp-blog-desiner') ?></td>
799
+ <td>
800
+ <div id="readmorebackcolorSelector"><div style="background-color:<?php echo $settings["template_readmorebackcolor"]; ?>"></div></div>
801
+ <input type="hidden" name="template_readmorebackcolor" id="template_readmorebackcolor" value="<?php echo $settings["template_readmorebackcolor"]; ?>"/>
802
+ </td>
803
+ </tr>
804
+ </tbody>
805
+ </table>
806
+ <h3 class="header"><?php _e('Social Settings', 'wp-blog-desiner') ?></h3>
807
+ <table>
808
+ <tbody>
809
+ <tr>
810
+ <td><?php _e('Social icon style', 'wp-blog-desiner') ?></td>
811
+ <td>
812
+ <input name="social_icon_style" type="radio" value="0" checked="checked" <?php checked(0, get_option('social_icon_style')); ?> /> <?php _e('Style1'); ?>
813
+ <input name="social_icon_style" type="radio" value="1" <?php checked(1, get_option('social_icon_style')); ?> /> <?php _e('Style2'); ?>
814
+ </td>
815
+ </tr>
816
+ <tr>
817
+ <td><?php _e('Facebook link', 'wp-blog-desiner') ?></td>
818
+ <td>
819
+ <input name="facebook_link" type="radio" value="0" <?php checked(0, get_option('facebook_link')); ?> /> <?php _e('Yes'); ?>
820
+ <input name="facebook_link" type="radio" value="1" <?php checked(1, get_option('facebook_link')); ?> /> <?php _e('No'); ?>
821
+ </td>
822
+ </tr>
823
+ <tr>
824
+ <td><?php _e('Twitter link', 'wp-blog-desiner') ?></td>
825
+ <td>
826
+ <input name="twitter_link" type="radio" value="0" <?php checked(0, get_option('twitter_link')); ?> /> <?php _e('Yes'); ?>
827
+ <input name="twitter_link" type="radio" value="1" <?php checked(1, get_option('twitter_link')); ?> /> <?php _e('No'); ?>
828
+ </td>
829
+ </tr>
830
+ <tr>
831
+ <td><?php _e('Google+ link', 'wp-blog-desiner') ?></td>
832
+ <td>
833
+ <input name="google_link" type="radio" value="0" <?php checked(0, get_option('google_link')); ?> /> <?php _e('Yes'); ?>
834
+ <input name="google_link" type="radio" value="1" <?php checked(1, get_option('google_link')); ?> /> <?php _e('No'); ?>
835
+ </td>
836
+ </tr>
837
+ <tr>
838
+ <td><?php _e('Linkedin link', 'wp-blog-desiner') ?></td>
839
+ <td>
840
+
841
+ <input name="linkedin_link" type="radio" value="0" <?php checked(0, get_option('linkedin_link')); ?> /> <?php _e('Yes'); ?>
842
+ <input name="linkedin_link" type="radio" value="1" <?php checked(1, get_option('linkedin_link')); ?> /> <?php _e('No'); ?>
843
+ </td>
844
+ </tr>
845
+ <tr>
846
+ <td><?php _e('Using mail', 'wp-blog-desiner') ?></td>
847
+ <td>
848
+
849
+ <input name="instagram_link" type="radio" value="0" <?php checked(0, get_option('instagram_link')); ?> /> <?php _e('Yes'); ?>
850
+ <input name="instagram_link" type="radio" value="1" <?php checked(1, get_option('instagram_link')); ?> /> <?php _e('No'); ?>
851
+ </td>
852
+ </tr>
853
+
854
+ <tr>
855
+ <td><?php _e('Pinterest link', 'wp-blog-desiner') ?></td>
856
+ <td>
857
+ <input name="pinterest_link" type="radio" value="0" <?php checked(0, get_option('pinterest_link')); ?> /> <?php _e('Yes'); ?>
858
+ <input name="pinterest_link" type="radio" value="1" <?php checked(1, get_option('pinterest_link')); ?> /> <?php _e('No'); ?>
859
+ </td>
860
+ </tr>
861
+ </tbody>
862
+ </table>
863
+ </div>
864
+ </div>
865
+ </div>
866
+ <div class="inner">
867
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'wp-blog-desiner'); ?>" />
868
+ <p class="wl-saving-warning"></p>
869
+ <div class="clear"></div>
870
+ </div>
871
+ </form>
872
+ </div>
873
+
874
+ <?php
875
+ }
876
+
877
+ function lumia_pagination($args = array()) {
878
+
879
+ if (!is_array($args)) {
880
+ $argv = func_get_args();
881
+ $args = array();
882
+ foreach (array('before', 'after', 'options') as $i => $key)
883
+ $args[$key] = $argv[$i];
884
+ }
885
+ $args = wp_parse_args($args, array(
886
+ 'before' => '',
887
+ 'after' => '',
888
+ 'options' => array(),
889
+ 'query' => $GLOBALS['wp_query'],
890
+ 'type' => 'posts',
891
+ 'echo' => true
892
+ ));
893
+
894
+ extract($args, EXTR_SKIP);
895
+ $instance = new LBNavi_Call($args);
896
+
897
+ list( $posts_per_page, $paged, $total_pages ) = $instance->get_pagination_args();
898
+
899
+ if (1 == $total_pages && !$options['always_show'])
900
+ return;
901
+
902
+ $pages_to_show = 100;
903
+ $larger_page_to_show = 3;
904
+ $larger_page_multiple = 10;
905
+ $pages_to_show_minus_1 = $pages_to_show - 1;
906
+ $half_page_start = floor($pages_to_show_minus_1 / 2);
907
+ $half_page_end = ceil($pages_to_show_minus_1 / 2);
908
+ $start_page = $paged - $half_page_start;
909
+
910
+ if ($start_page <= 0)
911
+ $start_page = 1;
912
+
913
+ $end_page = $paged + $half_page_end;
914
+
915
+ if (( $end_page - $start_page ) != $pages_to_show_minus_1)
916
+ $end_page = $start_page + $pages_to_show_minus_1;
917
+
918
+ if ($end_page > $total_pages) {
919
+ $start_page = $total_pages - $pages_to_show_minus_1;
920
+ $end_page = $total_pages;
921
+ }
922
+
923
+ if ($start_page < 1)
924
+ $start_page = 1;
925
+
926
+ $out = '';
927
+ $options['style'] = 1;
928
+ $options['pages_text'] = 'Page %CURRENT_PAGE% of %TOTAL_PAGES%';
929
+ $options['current_text'] = '%PAGE_NUMBER%';
930
+ $options['page_text'] = '%PAGE_NUMBER%';
931
+ $options['first_text'] = '&laquo; First';
932
+ $options['last_text'] = 'Last &raquo;';
933
+ $options['prev_text'] = '';
934
+ $options['next_text'] = '';
935
+ $options['dotright_text'] = '';
936
+
937
+ switch (intval($options['style'])) {
938
+
939
+
940
+ // Normal
941
+ case 1:
942
+ // Text
943
+ if (!empty($options['pages_text'])) {
944
+ $pages_text = str_replace(
945
+ array("%CURRENT_PAGE%", "%TOTAL_PAGES%"), array(number_format_i18n($paged), number_format_i18n($total_pages)), $options['pages_text']);
946
+ $out .= "<span class='pages'>$pages_text</span>";
947
+ }
948
+
949
+ if ($start_page >= 2 && $pages_to_show < $total_pages) {
950
+ // First
951
+ $first_text = str_replace('%TOTAL_PAGES%', number_format_i18n($total_pages), $options['first_text']);
952
+ $out .= $instance->get_single(1, 'first', $first_text, '%TOTAL_PAGES%');
953
+ }
954
+
955
+ // Previous
956
+ if ($paged > 1 && !empty($options['prev_text']))
957
+ $out .= $instance->get_single($paged - 1, 'previouspostslink', $options['prev_text']);
958
+
959
+ if ($start_page >= 2 && $pages_to_show < $total_pages) {
960
+ if (!empty($options['dotleft_text']))
961
+ $out .= "<span class='extend'>{$options['dotleft_text']}</span>";
962
+ }
963
+
964
+ // Smaller pages
965
+ $larger_pages_array = array();
966
+ if ($larger_page_multiple)
967
+ for ($i = $larger_page_multiple; $i <= $total_pages; $i+= $larger_page_multiple)
968
+ $larger_pages_array[] = $i;
969
+
970
+ $larger_page_start = 0;
971
+ foreach ($larger_pages_array as $larger_page) {
972
+ if ($larger_page < ($start_page - $half_page_start) && $larger_page_start < $larger_page_to_show) {
973
+ $out .= $instance->get_single($larger_page, 'smaller page', $options['page_text']);
974
+ $larger_page_start++;
975
+ }
976
+ }
977
+
978
+ if ($larger_page_start)
979
+ $out .= "<span class='extend'>{$options['dotleft_text']}</span>";
980
+
981
+ // Page numbers
982
+ $timeline = 'smaller';
983
+ foreach (range($start_page, $end_page) as $i) {
984
+ if ($i == $paged && !empty($options['current_text'])) {
985
+ $current_page_text = str_replace('%PAGE_NUMBER%', number_format_i18n($i), $options['current_text']);
986
+ $out .= "<span class='current'>$current_page_text</span>";
987
+ $timeline = 'larger';
988
+ } else {
989
+ $out .= $instance->get_single($i, "page $timeline", $options['page_text']);
990
+ }
991
+ }
992
+
993
+ // Large pages
994
+ $larger_page_end = 0;
995
+ $larger_page_out = '';
996
+ foreach ($larger_pages_array as $larger_page) {
997
+ if ($larger_page > ($end_page + $half_page_end) && $larger_page_end < $larger_page_to_show) {
998
+ $larger_page_out .= $instance->get_single($larger_page, 'larger page', $options['page_text']);
999
+ $larger_page_end++;
1000
+ }
1001
+ }
1002
+
1003
+ if ($larger_page_out) {
1004
+ $out .= "<span class='extend'>{$options['dotright_text']}</span>";
1005
+ }
1006
+ $out .= $larger_page_out;
1007
+
1008
+ if ($end_page < $total_pages) {
1009
+ if (!empty($options['dotright_text']))
1010
+ $out .= "<span class='extend'>{$options['dotright_text']}</span>";
1011
+ }
1012
+
1013
+ // Next
1014
+ if ($paged < $total_pages && !empty($options['next_text']))
1015
+ $out .= $instance->get_single($paged + 1, 'nextpostslink', $options['next_text']);
1016
+
1017
+ if ($end_page < $total_pages) {
1018
+ // Last
1019
+ $out .= $instance->get_single($total_pages, 'last', $options['last_text'], '%TOTAL_PAGES%');
1020
+ }
1021
+ break;
1022
+
1023
+ // Dropdown
1024
+ case 2:
1025
+ $out .= '<form action="" method="get">' . "\n";
1026
+ $out .= '<select size="1" onchange="document.location.href = this.options[this.selectedIndex].value;">' . "\n";
1027
+
1028
+ foreach (range(1, $total_pages) as $i) {
1029
+ $page_num = $i;
1030
+ if ($page_num == 1)
1031
+ $page_num = 0;
1032
+
1033
+ if ($i == $paged) {
1034
+ $current_page_text = str_replace('%PAGE_NUMBER%', number_format_i18n($i), $options['current_text']);
1035
+ $out .= '<option value="' . esc_url($instance->get_url($page_num)) . '" selected="selected" class="current">' . $current_page_text . "</option>\n";
1036
+ } else {
1037
+ $page_text = str_replace('%PAGE_NUMBER%', number_format_i18n($i), $options['page_text']);
1038
+ $out .= '<option value="' . esc_url($instance->get_url($page_num)) . '">' . $page_text . "</option>\n";
1039
+ }
1040
+ }
1041
+
1042
+ $out .= "</select>\n";
1043
+ $out .= "</form>\n";
1044
+ break;
1045
+ }
1046
+ $out = $before . "<div class='wl_pagination'>\n$out\n</div>" . $after;
1047
+
1048
+ $out = apply_filters('lumia_pagination', $out);
1049
+
1050
+ if (!$echo)
1051
+ return $out;
1052
+
1053
+ echo $out;
1054
+ }
1055
+
1056
+ class LBNavi_Call {
1057
+
1058
+ protected $args;
1059
+
1060
+ function __construct($args) {
1061
+ $this->args = $args;
1062
+ }
1063
+
1064
+ function __get($key) {
1065
+ return $this->args[$key];
1066
+ }
1067
+
1068
+ function get_pagination_args() {
1069
+ global $numpages;
1070
+
1071
+ $query = $this->query;
1072
+
1073
+ switch ($this->type) {
1074
+ case 'multipart':
1075
+ // Multipart page
1076
+ $posts_per_page = 1;
1077
+ $paged = max(1, absint(get_query_var('page')));
1078
+ $total_pages = max(1, $numpages);
1079
+ break;
1080
+ case 'users':
1081
+ // WP_User_Query
1082
+ $posts_per_page = $query->query_vars['number'];
1083
+ $paged = max(1, floor($query->query_vars['offset'] / $posts_per_page) + 1);
1084
+ $total_pages = max(1, ceil($query->total_users / $posts_per_page));
1085
+ break;
1086
+ default:
1087
+ // WP_Query
1088
+ $posts_per_page = intval($query->get('posts_per_page'));
1089
+ $paged = max(1, absint($query->get('paged')));
1090
+ $total_pages = max(1, absint($query->max_num_pages));
1091
+ break;
1092
+ }
1093
+
1094
+ return array($posts_per_page, $paged, $total_pages);
1095
+ }
1096
+
1097
+ function get_single($page, $class, $raw_text, $format = '%PAGE_NUMBER%') {
1098
+ if (empty($raw_text))
1099
+ return '';
1100
+
1101
+ $text = str_replace($format, number_format_i18n($page), $raw_text);
1102
+
1103
+ return "<a href='" . esc_url($this->get_url($page)) . "' class='$class'>$text</a>";
1104
+ }
1105
+
1106
+ function get_url($page) {
1107
+ return ( 'multipart' == $this->type ) ? get_multipage_link($page) : get_pagenum_link($page);
1108
+ }
1109
+
1110
+ }
1111
+
1112
+ function lumiapaged() {
1113
+ if (strstr($_SERVER['REQUEST_URI'], 'paged') || strstr($_SERVER['REQUEST_URI'], 'page')) {
1114
+ if (isset($_REQUEST['paged'])) {
1115
+ $paged = $_REQUEST['paged'];
1116
+ } else {
1117
+ $uri = explode('/', $_SERVER['REQUEST_URI']);
1118
+ $uri = array_reverse($uri);
1119
+ $paged = $uri[1];
1120
+ }
1121
+ } else {
1122
+ $paged = 1;
1123
+ }
1124
+
1125
+ return $paged;
1126
+ }
1127
+ ?>
css/admin.css ADDED
@@ -0,0 +1,1693 @@