|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> |
|
3 <head> |
|
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
5 <title><?php _e('Social Broadcasts', 'social'); ?></title> |
|
6 <?php |
|
7 wp_admin_css('install', true); |
|
8 $social = Social::instance(); |
|
9 $social->admin_enqueue_assets(); |
|
10 ?> |
|
11 <link rel="stylesheet" id="social-css" href="<?php echo esc_url(SOCIAL_ADMIN_CSS); ?>" type="text/css" media="all" /> |
|
12 </head> |
|
13 <body class="<?php echo esc_attr($clean); ?>"> |
|
14 <h1 id="logo"><?php _e('Social Broadcasts', 'social'); ?></h1> |
|
15 <form id="setup" method="post" class="broadcast-interstitial" action="<?php echo esc_url(admin_url('post.php?social_controller=broadcast&social_action=options')); ?>"> |
|
16 <?php wp_nonce_field(); ?> |
|
17 <input type="hidden" name="post_ID" value="<?php echo $post->ID; ?>" /> |
|
18 <input type="hidden" name="location" value="<?php echo $location; ?>" /> |
|
19 <div class="form-table social-broadcast-options"> |
|
20 <?php |
|
21 foreach ($_services as $key => $accounts) { |
|
22 $service = $services[$key]; |
|
23 if (count($accounts)) { |
|
24 ?> |
|
25 <section> |
|
26 <header> |
|
27 <h2><?php _e($service->title(), 'social'); ?></h2> |
|
28 </header> |
|
29 <ul class="accounts"> |
|
30 <?php |
|
31 $i = 0; |
|
32 foreach ($accounts as $account) { |
|
33 $classes = array($service->key()); |
|
34 if ($i == 0) { |
|
35 $classes[] = 'proto'; |
|
36 } |
|
37 if (!empty($account['error'])) { |
|
38 $classes[] = 'error'; |
|
39 } |
|
40 ?> |
|
41 <li class="account <?php echo implode(' ', $classes); ?>"> |
|
42 <label for="<?php echo esc_attr($account['field_name_checked'].$account['field_value_checked']); ?>"> |
|
43 <img src="<?php echo esc_attr($account['avatar']); ?>" width="32" height="32" /> |
|
44 <span class="name"><?php echo esc_html($account['name']); ?></span> |
|
45 </label> |
|
46 <div class="broadcast-content"> |
|
47 <?php |
|
48 if (count($account['broadcasts'])) { |
|
49 ?> |
|
50 <h3><?php _e('Previous Broadcasts', 'social'); ?></h3> |
|
51 <ul class="broadcasts"> |
|
52 <?php |
|
53 foreach ($account['broadcasts'] as $broadcast) { |
|
54 // already escaped in controller |
|
55 ?> |
|
56 <li><?php echo $broadcast; ?></li> |
|
57 <?php |
|
58 } |
|
59 ?> |
|
60 </ul> |
|
61 <?php |
|
62 } |
|
63 if (!empty($account['error'])) { |
|
64 echo '<p class="error">'.esc_html($account['error']).'</p>'; |
|
65 } |
|
66 ?> |
|
67 <div class="broadcast-edit<?php echo ($account['edit'] ? ' edit' : ''); echo ($account['checked'] ? ' checked' : ''); ?>"> |
|
68 <input type="checkbox" name="<?php echo esc_attr($account['field_name_checked']); ?>" id="<?php echo esc_attr($account['field_name_checked'].$account['field_value_checked']); ?>" value="<?php echo esc_attr($account['field_value_checked']); ?>"<?php checked($account['checked'], true); ?> /> |
|
69 <textarea name="<?php echo esc_attr($account['field_name_content']); ?>" cols="40" rows="2" maxlength="<?php echo esc_attr($account['maxlength']); ?>"><?php echo esc_textarea($account['content']); ?></textarea> |
|
70 <p class="readonly"><?php echo esc_textarea($account['content']); ?></p> |
|
71 <a href="#" class="edit"><?php _e('Edit', 'social'); ?></a> |
|
72 <span class="counter"></span> |
|
73 <?php do_action('social_broadcast_form_item_edit', $post, $service, $account); ?> |
|
74 </div> |
|
75 <?php do_action('social_broadcast_form_item_content', $post, $service, $account); ?> |
|
76 </div> |
|
77 <?php do_action('social_broadcast_form_item', $post, $service, $account); ?> |
|
78 </li> |
|
79 <?php |
|
80 $i++; |
|
81 } |
|
82 ?> |
|
83 </ul> |
|
84 </section> |
|
85 <?php |
|
86 } |
|
87 } |
|
88 ?> |
|
89 </div> |
|
90 <p class="step"> |
|
91 <input type="hidden" name="social_action" value="<?php echo esc_attr($step); ?>" /> |
|
92 <input type="submit" name="social_submit" value="<?php echo $step_text; // already localized in controller ?>" class="button" /> |
|
93 <a href="<?php echo esc_url(get_edit_post_link($post->ID, 'url')); ?>"><?php _e('Cancel', 'social'); ?></a> |
|
94 </p> |
|
95 </form> |
|
96 <script type="text/javascript" src="<?php echo esc_url(includes_url('/js/jquery/jquery.js')); ?>"></script> |
|
97 <script type="text/javascript" src="<?php echo esc_url(SOCIAL_ADMIN_JS); ?>"></script> |
|
98 </body> |
|
99 </html> |