Version Description
Download this release
Release Info
Developer | takayukister |
Plugin | Flamingo |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- admin/admin-functions.php +25 -0
- admin/admin.php +358 -0
- admin/edit-contact-form.php +75 -0
- admin/edit-inbound-form.php +84 -0
- admin/images/menu-icon.png +0 -0
- admin/images/screen-icon.png +0 -0
- admin/includes/class-contacts-list-table.php +248 -0
- admin/includes/class-inbound-messages-list-table.php +257 -0
- admin/includes/meta-boxes.php +164 -0
- admin/script.js +7 -0
- admin/style.css +36 -0
- flamingo.php +48 -0
- includes/capabilities.php +21 -0
- includes/class-contact.php +175 -0
- includes/class-inbound-message.php +188 -0
- includes/comment.php +58 -0
- includes/functions.php +24 -0
- includes/user.php +54 -0
- languages/flamingo-ja.mo +0 -0
- languages/flamingo-ja.po +333 -0
- languages/flamingo.pot +317 -0
- license.txt +339 -0
- readme.txt +37 -0
admin/admin-functions.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function flamingo_current_action() {
|
4 |
+
if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
|
5 |
+
return 'delete_all';
|
6 |
+
|
7 |
+
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
|
8 |
+
return $_REQUEST['action'];
|
9 |
+
|
10 |
+
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
|
11 |
+
return $_REQUEST['action2'];
|
12 |
+
|
13 |
+
return false;
|
14 |
+
}
|
15 |
+
|
16 |
+
function flamingo_get_all_ids_in_trash( $post_type ) {
|
17 |
+
global $wpdb;
|
18 |
+
|
19 |
+
$q = "SELECT ID FROM $wpdb->posts WHERE post_status = 'trash'"
|
20 |
+
. $wpdb->prepare( " AND post_type = %s", $post_type );
|
21 |
+
|
22 |
+
return $wpdb->get_col( $q );
|
23 |
+
}
|
24 |
+
|
25 |
+
?>
|
admin/admin.php
ADDED
@@ -0,0 +1,358 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once FLAMINGO_PLUGIN_DIR . '/admin/admin-functions.php';
|
4 |
+
|
5 |
+
add_action( 'admin_menu', 'flamingo_admin_menu', 8 );
|
6 |
+
|
7 |
+
function flamingo_admin_menu() {
|
8 |
+
add_object_page(
|
9 |
+
__( 'Flamingo Address Book', 'flamingo' ), __( 'Flamingo', 'flamingo' ),
|
10 |
+
'flamingo_edit_contacts', 'flamingo', 'flamingo_contact_admin_page',
|
11 |
+
flamingo_plugin_url( 'admin/images/menu-icon.png' ) );
|
12 |
+
|
13 |
+
$contact_admin = add_submenu_page( 'flamingo',
|
14 |
+
__( 'Flamingo Address Book', 'flamingo' ), __( 'Address Book', 'flamingo' ),
|
15 |
+
'flamingo_edit_contacts', 'flamingo', 'flamingo_contact_admin_page' );
|
16 |
+
|
17 |
+
add_action( 'load-' . $contact_admin, 'flamingo_load_contact_admin' );
|
18 |
+
|
19 |
+
$inbound_admin = add_submenu_page( 'flamingo',
|
20 |
+
__( 'Flamingo Inbound Messages', 'flamingo' ), __( 'Inbound Messages', 'flamingo' ),
|
21 |
+
'flamingo_edit_inbound_messages', 'flamingo_inbound', 'flamingo_inbound_admin_page' );
|
22 |
+
|
23 |
+
add_action( 'load-' . $inbound_admin, 'flamingo_load_inbound_admin' );
|
24 |
+
}
|
25 |
+
|
26 |
+
add_filter( 'set-screen-option', 'flamingo_set_screen_options', 10, 3 );
|
27 |
+
|
28 |
+
function flamingo_set_screen_options( $result, $option, $value ) {
|
29 |
+
$flamingo_screens = array(
|
30 |
+
'toplevel_page_flamingo_per_page',
|
31 |
+
'flamingo_page_flamingo_inbound_per_page' );
|
32 |
+
|
33 |
+
if ( in_array( $option, $flamingo_screens ) )
|
34 |
+
$result = $value;
|
35 |
+
|
36 |
+
return $result;
|
37 |
+
}
|
38 |
+
|
39 |
+
add_action( 'admin_enqueue_scripts', 'flamingo_admin_enqueue_scripts' );
|
40 |
+
|
41 |
+
function flamingo_admin_enqueue_scripts( $hook_suffix ) {
|
42 |
+
if ( false === strpos( $hook_suffix, 'flamingo' ) )
|
43 |
+
return;
|
44 |
+
|
45 |
+
wp_enqueue_script( 'thickbox' );
|
46 |
+
wp_enqueue_script( 'postbox' );
|
47 |
+
|
48 |
+
wp_enqueue_script( 'flamingo-admin',
|
49 |
+
flamingo_plugin_url( 'admin/script.js' ),
|
50 |
+
array( 'jquery' ), FLAMINGO_VERSION, true );
|
51 |
+
|
52 |
+
wp_enqueue_style( 'flamingo-admin',
|
53 |
+
flamingo_plugin_url( 'admin/style.css' ),
|
54 |
+
array(), FLAMINGO_VERSION, 'all' );
|
55 |
+
}
|
56 |
+
|
57 |
+
/* Updated Message */
|
58 |
+
|
59 |
+
add_action( 'flamingo_admin_updated_message', 'flamingo_admin_updated_message' );
|
60 |
+
|
61 |
+
function flamingo_admin_updated_message() {
|
62 |
+
if ( ! empty( $_REQUEST['message'] ) ) {
|
63 |
+
if ( 'contactupdated' == $_REQUEST['message'] )
|
64 |
+
$updated_message = esc_html( __( 'Contact updated.', 'flamingo' ) );
|
65 |
+
elseif ( 'inboundtrashed' == $_REQUEST['message'] )
|
66 |
+
$updated_message = esc_html( __( 'Messages trashed.', 'flamingo' ) );
|
67 |
+
elseif ( 'inbounduntrashed' == $_REQUEST['message'] )
|
68 |
+
$updated_message = esc_html( __( 'Messages restored.', 'flamingo' ) );
|
69 |
+
elseif ( 'inbounddeleted' == $_REQUEST['message'] )
|
70 |
+
$updated_message = esc_html( __( 'Messages deleted.', 'flamingo' ) );
|
71 |
+
else
|
72 |
+
return;
|
73 |
+
} else {
|
74 |
+
return;
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( empty( $updated_message ) )
|
78 |
+
return;
|
79 |
+
|
80 |
+
?>
|
81 |
+
<div id="message" class="updated"><p><?php echo $updated_message; ?></p></div>
|
82 |
+
<?php
|
83 |
+
}
|
84 |
+
|
85 |
+
/* Contact */
|
86 |
+
|
87 |
+
function flamingo_load_contact_admin() {
|
88 |
+
$action = flamingo_current_action();
|
89 |
+
|
90 |
+
$redirect_to = admin_url( 'admin.php?page=flamingo' );
|
91 |
+
|
92 |
+
if ( 'save' == $action && ! empty( $_REQUEST['post'] ) ) {
|
93 |
+
$post = new Flamingo_Contact( $_REQUEST['post'] );
|
94 |
+
|
95 |
+
if ( ! empty( $post ) ) {
|
96 |
+
if ( ! current_user_can( 'flamingo_edit_contact', $post->id ) )
|
97 |
+
wp_die( __( 'You are not allowed to edit this item.', 'flamingo' ) );
|
98 |
+
|
99 |
+
check_admin_referer( 'flamingo-update-contact_' . $post->id );
|
100 |
+
|
101 |
+
$post->props = (array) $_POST['contact'];
|
102 |
+
|
103 |
+
$post->name = trim( $_POST['contact']['name'] );
|
104 |
+
|
105 |
+
$post->tags = ! empty( $_POST['tax_input'][Flamingo_Contact::contact_tag_taxonomy] )
|
106 |
+
? explode( ',', $_POST['tax_input'][Flamingo_Contact::contact_tag_taxonomy] )
|
107 |
+
: array();
|
108 |
+
|
109 |
+
$post->save();
|
110 |
+
|
111 |
+
$redirect_to = add_query_arg( array(
|
112 |
+
'action' => 'edit',
|
113 |
+
'post' => $post->id,
|
114 |
+
'message' => 'contactupdated' ), $redirect_to );
|
115 |
+
}
|
116 |
+
|
117 |
+
wp_safe_redirect( $redirect_to );
|
118 |
+
exit();
|
119 |
+
}
|
120 |
+
|
121 |
+
$current_screen = get_current_screen();
|
122 |
+
|
123 |
+
if ( ! class_exists( 'Flamingo_Contacts_List_Table' ) )
|
124 |
+
require_once FLAMINGO_PLUGIN_DIR . '/admin/includes/class-contacts-list-table.php';
|
125 |
+
|
126 |
+
add_filter( 'manage_' . $current_screen->id . '_columns',
|
127 |
+
array( 'Flamingo_Contacts_List_Table', 'define_columns' ) );
|
128 |
+
|
129 |
+
add_screen_option( 'per_page', array(
|
130 |
+
'label' => __( 'Contacts', 'flamingo' ),
|
131 |
+
'default' => 20 ) );
|
132 |
+
}
|
133 |
+
|
134 |
+
function flamingo_contact_admin_page() {
|
135 |
+
if ( ! empty( $_REQUEST['action'] ) && ! empty( $_REQUEST['post'] ) ) {
|
136 |
+
$post_id = absint( $_REQUEST['post'] );
|
137 |
+
|
138 |
+
if ( Flamingo_Contact::post_type == get_post_type( $post_id ) ) {
|
139 |
+
if ( 'edit' == $_REQUEST['action'] ) {
|
140 |
+
flamingo_contact_edit_page();
|
141 |
+
return;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
$list_table = new Flamingo_Contacts_List_Table();
|
147 |
+
$list_table->prepare_items();
|
148 |
+
|
149 |
+
?>
|
150 |
+
<div class="wrap">
|
151 |
+
<?php screen_icon(); ?>
|
152 |
+
|
153 |
+
<h2><?php
|
154 |
+
echo esc_html( __( 'Flamingo Address Book', 'flamingo' ) );
|
155 |
+
|
156 |
+
if ( ! empty( $_REQUEST['s'] ) ) {
|
157 |
+
echo sprintf( '<span class="subtitle">'
|
158 |
+
. __( 'Search results for “%s”', 'flamingo' )
|
159 |
+
. '</span>', esc_html( $_REQUEST['s'] ) );
|
160 |
+
}
|
161 |
+
?></h2>
|
162 |
+
|
163 |
+
<?php do_action( 'flamingo_admin_updated_message' ); ?>
|
164 |
+
|
165 |
+
<form method="get" action="">
|
166 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
|
167 |
+
<?php $list_table->search_box( __( 'Search Contacts', 'flamingo' ), 'flamingo-contact' ); ?>
|
168 |
+
<?php $list_table->display(); ?>
|
169 |
+
</form>
|
170 |
+
|
171 |
+
</div>
|
172 |
+
<?php
|
173 |
+
}
|
174 |
+
|
175 |
+
function flamingo_contact_edit_page() {
|
176 |
+
$post = new Flamingo_Contact( $_REQUEST['post'] );
|
177 |
+
|
178 |
+
if ( empty( $post ) )
|
179 |
+
return;
|
180 |
+
|
181 |
+
require_once FLAMINGO_PLUGIN_DIR . '/admin/includes/meta-boxes.php';
|
182 |
+
|
183 |
+
include FLAMINGO_PLUGIN_DIR . '/admin/edit-contact-form.php';
|
184 |
+
}
|
185 |
+
|
186 |
+
/* Inbound Message */
|
187 |
+
|
188 |
+
function flamingo_load_inbound_admin() {
|
189 |
+
$action = flamingo_current_action();
|
190 |
+
|
191 |
+
$redirect_to = admin_url( 'admin.php?page=flamingo_inbound' );
|
192 |
+
|
193 |
+
if ( 'trash' == $action && ! empty( $_REQUEST['post'] ) ) {
|
194 |
+
if ( ! is_array( $_REQUEST['post'] ) )
|
195 |
+
check_admin_referer( 'flamingo-trash-inbound-message_' . $_REQUEST['post'] );
|
196 |
+
else
|
197 |
+
check_admin_referer( 'bulk-posts' );
|
198 |
+
|
199 |
+
$trashed = 0;
|
200 |
+
|
201 |
+
foreach ( (array) $_REQUEST['post'] as $post ) {
|
202 |
+
$post = new Flamingo_Inbound_Message( $post );
|
203 |
+
|
204 |
+
if ( empty( $post ) )
|
205 |
+
continue;
|
206 |
+
|
207 |
+
if ( ! current_user_can( 'flamingo_delete_inbound_message', $post->id ) )
|
208 |
+
wp_die( __( 'You are not allowed to move this item to the Trash.', 'flamingo' ) );
|
209 |
+
|
210 |
+
if ( ! $post->trash() )
|
211 |
+
wp_die( __( 'Error in moving to Trash.', 'flamingo' ) );
|
212 |
+
|
213 |
+
$trashed += 1;
|
214 |
+
}
|
215 |
+
|
216 |
+
if ( ! empty( $trashed ) )
|
217 |
+
$redirect_to = add_query_arg( array( 'message' => 'inboundtrashed' ), $redirect_to );
|
218 |
+
|
219 |
+
wp_safe_redirect( $redirect_to );
|
220 |
+
exit();
|
221 |
+
}
|
222 |
+
|
223 |
+
if ( 'untrash' == $action && ! empty( $_REQUEST['post'] ) ) {
|
224 |
+
if ( ! is_array( $_REQUEST['post'] ) )
|
225 |
+
check_admin_referer( 'flamingo-untrash-inbound-message_' . $_REQUEST['post'] );
|
226 |
+
else
|
227 |
+
check_admin_referer( 'bulk-posts' );
|
228 |
+
|
229 |
+
$untrashed = 0;
|
230 |
+
|
231 |
+
foreach ( (array) $_REQUEST['post'] as $post ) {
|
232 |
+
$post = new Flamingo_Inbound_Message( $post );
|
233 |
+
|
234 |
+
if ( empty( $post ) )
|
235 |
+
continue;
|
236 |
+
|
237 |
+
if ( ! current_user_can( 'flamingo_delete_inbound_message', $post->id ) )
|
238 |
+
wp_die( __( 'You are not allowed to restore this item from the Trash.', 'flamingo' ) );
|
239 |
+
|
240 |
+
if ( ! $post->untrash() )
|
241 |
+
wp_die( __( 'Error in restoring from Trash.', 'flamingo' ) );
|
242 |
+
|
243 |
+
$untrashed += 1;
|
244 |
+
}
|
245 |
+
|
246 |
+
if ( ! empty( $untrashed ) )
|
247 |
+
$redirect_to = add_query_arg( array( 'message' => 'inbounduntrashed' ), $redirect_to );
|
248 |
+
|
249 |
+
wp_safe_redirect( $redirect_to );
|
250 |
+
exit();
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( 'delete_all' == $action ) {
|
254 |
+
$_REQUEST['post'] = flamingo_get_all_ids_in_trash(
|
255 |
+
Flamingo_Inbound_Message::post_type );
|
256 |
+
|
257 |
+
$action = 'delete';
|
258 |
+
}
|
259 |
+
|
260 |
+
if ( 'delete' == $action && ! empty( $_REQUEST['post'] ) ) {
|
261 |
+
if ( ! is_array( $_REQUEST['post'] ) )
|
262 |
+
check_admin_referer( 'flamingo-delete-inbound-message_' . $_REQUEST['post'] );
|
263 |
+
else
|
264 |
+
check_admin_referer( 'bulk-posts' );
|
265 |
+
|
266 |
+
$deleted = 0;
|
267 |
+
|
268 |
+
foreach ( (array) $_REQUEST['post'] as $post ) {
|
269 |
+
$post = new Flamingo_Inbound_Message( $post );
|
270 |
+
|
271 |
+
if ( empty( $post ) )
|
272 |
+
continue;
|
273 |
+
|
274 |
+
if ( ! current_user_can( 'flamingo_delete_inbound_message', $post->id ) )
|
275 |
+
wp_die( __( 'You are not allowed to delete this item.', 'flamingo' ) );
|
276 |
+
|
277 |
+
if ( ! $post->delete() )
|
278 |
+
wp_die( __( 'Error in deleting.', 'flamingo' ) );
|
279 |
+
|
280 |
+
$deleted += 1;
|
281 |
+
}
|
282 |
+
|
283 |
+
if ( ! empty( $deleted ) )
|
284 |
+
$redirect_to = add_query_arg( array( 'message' => 'inbounddeleted' ), $redirect_to );
|
285 |
+
|
286 |
+
wp_safe_redirect( $redirect_to );
|
287 |
+
exit();
|
288 |
+
}
|
289 |
+
|
290 |
+
$current_screen = get_current_screen();
|
291 |
+
|
292 |
+
if ( ! class_exists( 'Flamingo_Inbound_Messages_List_Table' ) )
|
293 |
+
require_once FLAMINGO_PLUGIN_DIR . '/admin/includes/class-inbound-messages-list-table.php';
|
294 |
+
|
295 |
+
add_filter( 'manage_' . $current_screen->id . '_columns',
|
296 |
+
array( 'Flamingo_Inbound_Messages_List_Table', 'define_columns' ) );
|
297 |
+
|
298 |
+
add_screen_option( 'per_page', array(
|
299 |
+
'label' => __( 'Messages', 'flamingo' ),
|
300 |
+
'default' => 20 ) );
|
301 |
+
}
|
302 |
+
|
303 |
+
function flamingo_inbound_admin_page() {
|
304 |
+
if ( ! empty( $_REQUEST['action'] ) && ! empty( $_REQUEST['post'] ) ) {
|
305 |
+
$post_id = absint( $_REQUEST['post'] );
|
306 |
+
|
307 |
+
if ( Flamingo_Inbound_Message::post_type == get_post_type( $post_id ) ) {
|
308 |
+
if ( 'edit' == $_REQUEST['action'] ) {
|
309 |
+
flamingo_inbound_edit_page();
|
310 |
+
return;
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
$list_table = new Flamingo_Inbound_Messages_List_Table();
|
316 |
+
$list_table->prepare_items();
|
317 |
+
|
318 |
+
?>
|
319 |
+
<div class="wrap">
|
320 |
+
<?php screen_icon(); ?>
|
321 |
+
|
322 |
+
<h2><?php
|
323 |
+
echo esc_html( __( 'Inbound Messages', 'flamingo' ) );
|
324 |
+
|
325 |
+
if ( ! empty( $_REQUEST['s'] ) ) {
|
326 |
+
echo sprintf( '<span class="subtitle">'
|
327 |
+
. __( 'Search results for “%s”', 'flamingo' )
|
328 |
+
. '</span>', esc_html( $_REQUEST['s'] ) );
|
329 |
+
}
|
330 |
+
?></h2>
|
331 |
+
|
332 |
+
<?php do_action( 'flamingo_admin_updated_message' ); ?>
|
333 |
+
|
334 |
+
<?php $list_table->views(); ?>
|
335 |
+
|
336 |
+
<form method="get" action="">
|
337 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
|
338 |
+
<?php $list_table->search_box( __( 'Search Messages', 'flamingo' ), 'flamingo-inbound' ); ?>
|
339 |
+
<?php $list_table->display(); ?>
|
340 |
+
</form>
|
341 |
+
|
342 |
+
</div>
|
343 |
+
<?php
|
344 |
+
}
|
345 |
+
|
346 |
+
function flamingo_inbound_edit_page() {
|
347 |
+
$post = new Flamingo_Inbound_Message( $_REQUEST['post'] );
|
348 |
+
|
349 |
+
if ( empty( $post ) )
|
350 |
+
return;
|
351 |
+
|
352 |
+
require_once FLAMINGO_PLUGIN_DIR . '/admin/includes/meta-boxes.php';
|
353 |
+
|
354 |
+
include FLAMINGO_PLUGIN_DIR . '/admin/edit-inbound-form.php';
|
355 |
+
|
356 |
+
}
|
357 |
+
|
358 |
+
?>
|
admin/edit-contact-form.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// don't load directly
|
4 |
+
if ( ! defined( 'ABSPATH' ) )
|
5 |
+
die( '-1' );
|
6 |
+
|
7 |
+
if ( ! empty( $post->id ) ) {
|
8 |
+
$nonce_action = 'flamingo-update-contact_' . $post->id;
|
9 |
+
} else {
|
10 |
+
$nonce_action = 'flamingo-add-contact';
|
11 |
+
}
|
12 |
+
|
13 |
+
add_meta_box( 'contactsubmitdiv', __( 'Save', 'flamingo' ),
|
14 |
+
'flamingo_contact_submit_meta_box', 'flamingo-contact', 'side', 'core' );
|
15 |
+
|
16 |
+
add_meta_box( 'contacttagsdiv', __( 'Tags', 'flamingo' ),
|
17 |
+
'flamingo_contact_tags_meta_box', 'flamingo-contact', 'side', 'core' );
|
18 |
+
|
19 |
+
add_meta_box( 'contactnamediv', __( 'Name', 'flamingo' ),
|
20 |
+
'flamingo_contact_name_meta_box', 'flamingo-contact', 'normal', 'core' );
|
21 |
+
|
22 |
+
?>
|
23 |
+
<div class="wrap columns-2">
|
24 |
+
<?php screen_icon(); ?>
|
25 |
+
|
26 |
+
<h2><?php echo esc_html( __( 'Edit Contact', 'flamingo' ) ); ?></h2>
|
27 |
+
|
28 |
+
<?php do_action( 'flamingo_admin_updated_message', $post ); ?>
|
29 |
+
|
30 |
+
<form name="editcontact" id="editcontact" method="post" action="">
|
31 |
+
<?php
|
32 |
+
wp_nonce_field( $nonce_action );
|
33 |
+
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
34 |
+
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
35 |
+
?>
|
36 |
+
|
37 |
+
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
38 |
+
<div id="side-info-column" class="inner-sidebar">
|
39 |
+
<?php
|
40 |
+
do_meta_boxes( 'flamingo-contact', 'side', $post );
|
41 |
+
?>
|
42 |
+
</div><!-- #side-info-column -->
|
43 |
+
|
44 |
+
<div id="post-body">
|
45 |
+
<div id="post-body-content">
|
46 |
+
|
47 |
+
<div id="titlediv">
|
48 |
+
<div id="titlewrap">
|
49 |
+
<?php if ( ! empty( $post->id ) ) : ?>
|
50 |
+
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( $post->email ); ?>" id="title" disabled="disabled" />
|
51 |
+
<?php else : ?>
|
52 |
+
<label class="hide-if-no-js" style="visibility:hidden" id="title-prompt-text" for="title"><?php echo esc_html( __( 'Enter email here', 'flamingo' ) ); ?></label>
|
53 |
+
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( $post->email ); ?>" id="title" autocomplete="off" />
|
54 |
+
<?php endif; ?>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<?php
|
59 |
+
do_meta_boxes( 'flamingo-contact', 'normal', $post );
|
60 |
+
do_meta_boxes( 'flamingo-contact', 'advanced', $post );
|
61 |
+
?>
|
62 |
+
</div><!-- #post-body-content -->
|
63 |
+
</div><!-- #post-body -->
|
64 |
+
|
65 |
+
<?php if ( $post->id ) : ?>
|
66 |
+
<input type="hidden" name="action" value="save" />
|
67 |
+
<input type="hidden" name="post" value="<?php echo (int) $post->id; ?>" />
|
68 |
+
<?php else: ?>
|
69 |
+
<input type="hidden" name="action" value="add" />
|
70 |
+
<?php endif; ?>
|
71 |
+
|
72 |
+
</div><!-- #poststuff -->
|
73 |
+
</form>
|
74 |
+
|
75 |
+
</div><!-- .wrap -->
|
admin/edit-inbound-form.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// don't load directly
|
4 |
+
if ( ! defined( 'ABSPATH' ) )
|
5 |
+
die( '-1' );
|
6 |
+
|
7 |
+
if ( ! empty( $post->id ) ) {
|
8 |
+
$nonce_action = 'flamingo-update-inbound_' . $post->id;
|
9 |
+
} else {
|
10 |
+
$nonce_action = 'flamingo-add-inbound';
|
11 |
+
}
|
12 |
+
|
13 |
+
add_meta_box( 'inboundsubmitdiv', __( 'Save', 'flamingo' ),
|
14 |
+
'flamingo_inbound_submit_meta_box', 'flamingo-inbound', 'side', 'core' );
|
15 |
+
|
16 |
+
add_meta_box( 'inboundfieldsdiv', __( 'Fields', 'flamingo' ),
|
17 |
+
'flamingo_inbound_fields_meta_box', 'flamingo-inbound', 'normal', 'core' );
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="wrap columns-2">
|
21 |
+
<?php screen_icon(); ?>
|
22 |
+
|
23 |
+
<h2><?php echo esc_html( __( 'Inbound Message', 'flamingo' ) ); ?></h2>
|
24 |
+
|
25 |
+
<?php do_action( 'flamingo_admin_updated_message', $post ); ?>
|
26 |
+
|
27 |
+
<form name="editinbound" id="editinbound" method="post" action="">
|
28 |
+
<?php
|
29 |
+
wp_nonce_field( $nonce_action );
|
30 |
+
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
31 |
+
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
32 |
+
?>
|
33 |
+
|
34 |
+
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
35 |
+
<div id="side-info-column" class="inner-sidebar">
|
36 |
+
<?php
|
37 |
+
do_meta_boxes( 'flamingo-inbound', 'side', $post );
|
38 |
+
?>
|
39 |
+
</div><!-- #side-info-column -->
|
40 |
+
|
41 |
+
<div id="post-body">
|
42 |
+
<div id="post-body-content">
|
43 |
+
|
44 |
+
<table class="message-main-fields">
|
45 |
+
<tbody>
|
46 |
+
|
47 |
+
<tr class="message-date">
|
48 |
+
<th><?php echo esc_html( __( 'Date', 'flamingo' ) ); ?>:</th>
|
49 |
+
<td><?php echo esc_html( $post->date ); ?></td>
|
50 |
+
</tr>
|
51 |
+
|
52 |
+
<tr class="message-subject">
|
53 |
+
<th><?php echo esc_html( __( 'Subject', 'flamingo' ) ); ?>:</th>
|
54 |
+
<td><?php echo esc_html( $post->subject ); ?></td>
|
55 |
+
</tr>
|
56 |
+
|
57 |
+
<tr class="message-from">
|
58 |
+
<th><?php echo esc_html( __( 'From', 'flamingo' ) ); ?>:</th>
|
59 |
+
<td><?php if ( ! empty( $post->from_email ) ) { ?><a href="<?php echo admin_url( 'admin.php?page=flamingo&s=' . urlencode( $post->from_email ) ); ?>" title="<?php echo esc_attr( $post->from ); ?>"><?php echo esc_html( $post->from ); ?></a><?php } else { echo esc_html( $post->from ); } ?></td>
|
60 |
+
</tr>
|
61 |
+
|
62 |
+
</tbody>
|
63 |
+
</table>
|
64 |
+
|
65 |
+
<br class="clear" />
|
66 |
+
|
67 |
+
<?php
|
68 |
+
do_meta_boxes( 'flamingo-inbound', 'normal', $post );
|
69 |
+
do_meta_boxes( 'flamingo-inbound', 'advanced', $post );
|
70 |
+
?>
|
71 |
+
</div><!-- #post-body-content -->
|
72 |
+
</div><!-- #post-body -->
|
73 |
+
|
74 |
+
<?php if ( $post->id ) : ?>
|
75 |
+
<input type="hidden" name="action" value="save" />
|
76 |
+
<input type="hidden" name="post" value="<?php echo (int) $post->id; ?>" />
|
77 |
+
<?php else: ?>
|
78 |
+
<input type="hidden" name="action" value="add" />
|
79 |
+
<?php endif; ?>
|
80 |
+
|
81 |
+
</div><!-- #poststuff -->
|
82 |
+
</form>
|
83 |
+
|
84 |
+
</div><!-- .wrap -->
|
admin/images/menu-icon.png
ADDED
Binary file
|
admin/images/screen-icon.png
ADDED
Binary file
|
admin/includes/class-contacts-list-table.php
ADDED
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! class_exists( 'WP_List_Table' ) )
|
4 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
5 |
+
|
6 |
+
class Flamingo_Contacts_List_Table extends WP_List_Table {
|
7 |
+
|
8 |
+
public static function define_columns() {
|
9 |
+
$columns = array(
|
10 |
+
'cb' => '<input type="checkbox" />',
|
11 |
+
'email' => __( 'Email', 'flamingo' ),
|
12 |
+
'full_name' => __( 'Name', 'flamingo' ),
|
13 |
+
'tags' => __( 'Tags', 'flamingo' ),
|
14 |
+
'history' => __( 'History', 'flamingo' ),
|
15 |
+
'last_contacted' => __( 'Last Contact', 'flamingo' ) );
|
16 |
+
|
17 |
+
return $columns;
|
18 |
+
}
|
19 |
+
|
20 |
+
function __construct() {
|
21 |
+
parent::__construct( array(
|
22 |
+
'singular' => 'contact',
|
23 |
+
'plural' => 'contacts',
|
24 |
+
'ajax' => false ) );
|
25 |
+
}
|
26 |
+
|
27 |
+
function prepare_items() {
|
28 |
+
$current_screen = get_current_screen();
|
29 |
+
$per_page = $this->get_items_per_page( $current_screen->id . '_per_page' );
|
30 |
+
|
31 |
+
$this->_column_headers = $this->get_column_info();
|
32 |
+
|
33 |
+
$args = array(
|
34 |
+
'posts_per_page' => $per_page,
|
35 |
+
'offset' => ( $this->get_pagenum() - 1 ) * $per_page,
|
36 |
+
'orderby' => 'meta_value',
|
37 |
+
'order' => 'DESC',
|
38 |
+
'meta_key' => '_last_contacted' );
|
39 |
+
|
40 |
+
if ( ! empty( $_REQUEST['s'] ) )
|
41 |
+
$args['s'] = $_REQUEST['s'];
|
42 |
+
|
43 |
+
if ( ! empty( $_REQUEST['orderby'] ) ) {
|
44 |
+
if ( 'email' == $_REQUEST['orderby'] )
|
45 |
+
$args['meta_key'] = '_email';
|
46 |
+
elseif ( 'name' == $_REQUEST['orderby'] )
|
47 |
+
$args['meta_key'] = '_name';
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( ! empty( $_REQUEST['order'] ) && 'asc' == strtolower( $_REQUEST['order'] ) )
|
51 |
+
$args['order'] = 'ASC';
|
52 |
+
|
53 |
+
if ( ! empty( $_REQUEST['contact_tag_id'] ) )
|
54 |
+
$args['contact_tag_id'] = explode( ',', $_REQUEST['contact_tag_id'] );
|
55 |
+
|
56 |
+
$this->items = Flamingo_Contact::find( $args );
|
57 |
+
|
58 |
+
$total_items = Flamingo_Contact::$found_items;
|
59 |
+
$total_pages = ceil( $total_items / $per_page );
|
60 |
+
|
61 |
+
$this->set_pagination_args( array(
|
62 |
+
'total_items' => $total_items,
|
63 |
+
'total_pages' => $total_pages,
|
64 |
+
'per_page' => $per_page ) );
|
65 |
+
}
|
66 |
+
|
67 |
+
function get_columns() {
|
68 |
+
return get_column_headers( get_current_screen() );
|
69 |
+
}
|
70 |
+
|
71 |
+
function get_sortable_columns() {
|
72 |
+
$columns = array(
|
73 |
+
'email' => array( 'email', false ),
|
74 |
+
'full_name' => array( 'name', false ),
|
75 |
+
'last_contacted' => array( 'last_contacted', true ) );
|
76 |
+
|
77 |
+
return $columns;
|
78 |
+
}
|
79 |
+
|
80 |
+
function get_bulk_actions() {
|
81 |
+
$actions = array(
|
82 |
+
'send_mail' => __( 'Send Mail', 'flamingo' ) );
|
83 |
+
|
84 |
+
return $actions;
|
85 |
+
}
|
86 |
+
|
87 |
+
function extra_tablenav( $which ) {
|
88 |
+
$tag = 0;
|
89 |
+
|
90 |
+
if ( ! empty( $_REQUEST['contact_tag_id'] ) ) {
|
91 |
+
$tag_id = explode( ',', $_REQUEST['contact_tag_id'] );
|
92 |
+
|
93 |
+
$term = get_term( $tag_id[0], Flamingo_Contact::contact_tag_taxonomy );
|
94 |
+
|
95 |
+
if ( ! empty( $term ) && ! is_wp_error( $term ) )
|
96 |
+
$tag = $term->term_id;
|
97 |
+
}
|
98 |
+
|
99 |
+
?>
|
100 |
+
<div class="alignleft actions">
|
101 |
+
<?php
|
102 |
+
if ( 'top' == $which ) {
|
103 |
+
wp_dropdown_categories( array(
|
104 |
+
'taxonomy' => Flamingo_Contact::contact_tag_taxonomy,
|
105 |
+
'name' => 'contact_tag_id',
|
106 |
+
'show_option_all' => __( 'View all tags', 'flamingo' ),
|
107 |
+
'hide_empty' => 1,
|
108 |
+
'hide_if_empty' => 1,
|
109 |
+
'orderby' => 'name',
|
110 |
+
'selected' => $tag ) );
|
111 |
+
|
112 |
+
submit_button( __( 'Filter', 'flamingo' ),
|
113 |
+
'secondary', false, false, array( 'id' => 'post-query-submit' ) );
|
114 |
+
}
|
115 |
+
?>
|
116 |
+
</div>
|
117 |
+
<?php
|
118 |
+
}
|
119 |
+
|
120 |
+
function column_default( $item, $column_name ) {
|
121 |
+
return '';
|
122 |
+
}
|
123 |
+
|
124 |
+
function column_cb( $item ) {
|
125 |
+
return sprintf(
|
126 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
127 |
+
$this->_args['singular'],
|
128 |
+
$item->id );
|
129 |
+
}
|
130 |
+
|
131 |
+
function column_email( $item ) {
|
132 |
+
$url = admin_url( 'admin.php?page=flamingo&post=' . absint( $item->id ) );
|
133 |
+
$edit_link = add_query_arg( array( 'action' => 'edit' ), $url );
|
134 |
+
|
135 |
+
$actions = array(
|
136 |
+
'edit' => '<a href="' . $edit_link . '">' . __( 'Edit', 'flamingo' ) . '</a>' );
|
137 |
+
|
138 |
+
$a = sprintf( '<a class="row-title" href="%1$s" title="%2$s">%3$s</a>',
|
139 |
+
$edit_link,
|
140 |
+
esc_attr( sprintf( __( 'Edit “%s”', 'flamingo' ), $item->email ) ),
|
141 |
+
esc_html( $item->email ) );
|
142 |
+
|
143 |
+
return '<strong>' . $a . '</strong> ' . $this->row_actions( $actions );
|
144 |
+
}
|
145 |
+
|
146 |
+
function column_full_name( $item ) {
|
147 |
+
return $item->name;
|
148 |
+
}
|
149 |
+
|
150 |
+
function column_tags( $item ) {
|
151 |
+
if ( empty( $item->tags ) )
|
152 |
+
return __( 'No Tags', 'flamingo' );
|
153 |
+
|
154 |
+
$output = '';
|
155 |
+
|
156 |
+
foreach ( (array) $item->tags as $tag ) {
|
157 |
+
$term = get_term_by( 'name', $tag, Flamingo_Contact::contact_tag_taxonomy );
|
158 |
+
|
159 |
+
if ( empty( $term ) || is_wp_error( $term ) )
|
160 |
+
continue;
|
161 |
+
|
162 |
+
if ( $output )
|
163 |
+
$output .= ', ';
|
164 |
+
|
165 |
+
$link = admin_url( 'admin.php?page=flamingo&contact_tag_id=' . $term->term_id );
|
166 |
+
|
167 |
+
$output .= sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
|
168 |
+
$link, esc_attr( $term->name ), esc_html( $term->name ) );
|
169 |
+
}
|
170 |
+
|
171 |
+
return $output;
|
172 |
+
}
|
173 |
+
|
174 |
+
function column_history( $item ) {
|
175 |
+
$history = array();
|
176 |
+
|
177 |
+
// User
|
178 |
+
if ( $user = get_user_by( 'email', $item->email ) ) {
|
179 |
+
$link = sprintf( 'user-edit.php?user_id=%d', $user->ID );
|
180 |
+
$history[] = '<a href="' . admin_url( $link ) . '">'
|
181 |
+
. esc_html( __( 'User', 'flamingo' ) ) . '</a>';
|
182 |
+
}
|
183 |
+
|
184 |
+
// Comment
|
185 |
+
$comment_count = (int) get_comments( array(
|
186 |
+
'count' => true,
|
187 |
+
'author_email' => $item->email,
|
188 |
+
'status' => 'approve',
|
189 |
+
'type' => 'comment' ) );
|
190 |
+
|
191 |
+
if ( 0 < $comment_count ) {
|
192 |
+
$link = sprintf( 'edit-comments.php?s=%s', urlencode( $item->email ) );
|
193 |
+
$history[] = '<a href="' . admin_url( $link ) . '">'
|
194 |
+
. sprintf( __( 'Comment (%d)', 'flamingo' ), $comment_count ) . '</a>';
|
195 |
+
}
|
196 |
+
|
197 |
+
// Contact channels
|
198 |
+
$terms = get_terms( Flamingo_Inbound_Message::channel_taxonomy );
|
199 |
+
|
200 |
+
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
|
201 |
+
foreach ( (array) $terms as $term ) {
|
202 |
+
Flamingo_Inbound_Message::find( array(
|
203 |
+
'channel' => $term->slug,
|
204 |
+
's' => $item->email ) );
|
205 |
+
|
206 |
+
$count = (int) Flamingo_Inbound_Message::$found_items;
|
207 |
+
|
208 |
+
if ( ! $count )
|
209 |
+
continue;
|
210 |
+
|
211 |
+
$link = sprintf( 'admin.php?page=flamingo_inbound&channel=%1$s&s=%2$s',
|
212 |
+
urlencode( $term->slug ), urlencode( $item->email ) );
|
213 |
+
$history[] = '<a href="' . admin_url( $link ) . '">'
|
214 |
+
. sprintf( _x( '%s (%d)', 'contact history', 'flamingo' ), $term->name, $count )
|
215 |
+
. '</a>';
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
+
$output = '';
|
220 |
+
|
221 |
+
foreach ( $history as $item )
|
222 |
+
$output .= '<li>' . $item . '</li>';
|
223 |
+
|
224 |
+
$output = '<ul class="contact-history">' . $output . '</ul>';
|
225 |
+
|
226 |
+
return $output;
|
227 |
+
}
|
228 |
+
|
229 |
+
function column_last_contacted( $item ) {
|
230 |
+
if ( empty( $item->last_contacted ) )
|
231 |
+
return '';
|
232 |
+
|
233 |
+
$t_time = mysql2date( __( 'Y/m/d g:i:s A', 'flamingo' ), $item->last_contacted, true );
|
234 |
+
$m_time = $item->last_contacted;
|
235 |
+
$time = mysql2date( 'G', $item->last_contacted ) - get_option( 'gmt_offset' ) * 3600;
|
236 |
+
|
237 |
+
$time_diff = time() - $time;
|
238 |
+
|
239 |
+
if ( $time_diff > 0 && $time_diff < 24*60*60 )
|
240 |
+
$h_time = sprintf( __( '%s ago', 'flamingo' ), human_time_diff( $time ) );
|
241 |
+
else
|
242 |
+
$h_time = mysql2date( __( 'Y/m/d', 'flamingo' ), $m_time );
|
243 |
+
|
244 |
+
return '<abbr title="' . $t_time . '">' . $h_time . '</abbr>';
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
?>
|
admin/includes/class-inbound-messages-list-table.php
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! class_exists( 'WP_List_Table' ) )
|
4 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
5 |
+
|
6 |
+
class Flamingo_Inbound_Messages_List_Table extends WP_List_Table {
|
7 |
+
|
8 |
+
public static function define_columns() {
|
9 |
+
$columns = array(
|
10 |
+
'cb' => '<input type="checkbox" />',
|
11 |
+
'subject' => __( 'Subject', 'flamingo' ),
|
12 |
+
'from' => __( 'From', 'flamingo' ),
|
13 |
+
'channel' => __( 'Channel', 'flamingo' ),
|
14 |
+
'date' => __( 'Date', 'flamingo' ) );
|
15 |
+
|
16 |
+
return $columns;
|
17 |
+
}
|
18 |
+
|
19 |
+
function __construct() {
|
20 |
+
parent::__construct( array(
|
21 |
+
'singular' => 'post',
|
22 |
+
'plural' => 'posts',
|
23 |
+
'ajax' => false ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
function prepare_items() {
|
27 |
+
$current_screen = get_current_screen();
|
28 |
+
$per_page = $this->get_items_per_page( $current_screen->id . '_per_page' );
|
29 |
+
|
30 |
+
$this->_column_headers = $this->get_column_info();
|
31 |
+
|
32 |
+
$args = array(
|
33 |
+
'posts_per_page' => $per_page,
|
34 |
+
'offset' => ( $this->get_pagenum() - 1 ) * $per_page,
|
35 |
+
'orderby' => 'date',
|
36 |
+
'order' => 'DESC' );
|
37 |
+
|
38 |
+
if ( ! empty( $_REQUEST['s'] ) )
|
39 |
+
$args['s'] = $_REQUEST['s'];
|
40 |
+
|
41 |
+
if ( ! empty( $_REQUEST['orderby'] ) ) {
|
42 |
+
if ( 'subject' == $_REQUEST['orderby'] )
|
43 |
+
$args['meta_key'] = '_subject';
|
44 |
+
elseif ( 'from' == $_REQUEST['orderby'] )
|
45 |
+
$args['meta_key'] = '_from';
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( ! empty( $_REQUEST['order'] ) && 'asc' == strtolower( $_REQUEST['order'] ) )
|
49 |
+
$args['order'] = 'ASC';
|
50 |
+
|
51 |
+
if ( ! empty( $_REQUEST['m'] ) )
|
52 |
+
$args['m'] = $_REQUEST['m'];
|
53 |
+
|
54 |
+
if ( ! empty( $_REQUEST['channel_id'] ) )
|
55 |
+
$args['channel_id'] = $_REQUEST['channel_id'];
|
56 |
+
|
57 |
+
if ( ! empty( $_REQUEST['channel'] ) )
|
58 |
+
$args['channel'] = $_REQUEST['channel'];
|
59 |
+
|
60 |
+
if ( ! empty( $_REQUEST['post_status'] ) && 'trash' == $_REQUEST['post_status'] )
|
61 |
+
$args['post_status'] = 'trash';
|
62 |
+
|
63 |
+
$this->items = Flamingo_Inbound_Message::find( $args );
|
64 |
+
|
65 |
+
$total_items = Flamingo_Inbound_Message::$found_items;
|
66 |
+
$total_pages = ceil( $total_items / $per_page );
|
67 |
+
|
68 |
+
$this->set_pagination_args( array(
|
69 |
+
'total_items' => $total_items,
|
70 |
+
'total_pages' => $total_pages,
|
71 |
+
'per_page' => $per_page ) );
|
72 |
+
|
73 |
+
$this->is_trash = isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] == 'trash';
|
74 |
+
}
|
75 |
+
|
76 |
+
function get_views() {
|
77 |
+
$status_links = array();
|
78 |
+
$post_status = empty( $_REQUEST['post_status'] ) ? '' : $_REQUEST['post_status'];
|
79 |
+
|
80 |
+
// Inbox
|
81 |
+
Flamingo_Inbound_Message::find( array( 'post_status' => 'any' ) );
|
82 |
+
$posts_in_inbox = Flamingo_Inbound_Message::$found_items;
|
83 |
+
|
84 |
+
$inbox = sprintf(
|
85 |
+
_nx( 'Inbox <span class="count">(%s)</span>', 'Inbox <span class="count">(%s)</span>',
|
86 |
+
$posts_in_inbox, 'posts', 'flamingo' ),
|
87 |
+
number_format_i18n( $posts_in_inbox ) );
|
88 |
+
|
89 |
+
$status_links['inbox'] = sprintf( '<a href="%1$s"%2$s>%3$s</a>',
|
90 |
+
admin_url( 'admin.php?page=flamingo_inbound' ),
|
91 |
+
'trash' != $post_status ? ' class="current"' : '',
|
92 |
+
$inbox );
|
93 |
+
|
94 |
+
// Trash
|
95 |
+
Flamingo_Inbound_Message::find( array( 'post_status' => 'trash' ) );
|
96 |
+
$posts_in_trash = Flamingo_Inbound_Message::$found_items;
|
97 |
+
|
98 |
+
if ( empty( $posts_in_trash ) )
|
99 |
+
return $status_links;
|
100 |
+
|
101 |
+
$trash = sprintf(
|
102 |
+
_nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>',
|
103 |
+
$posts_in_trash, 'posts', 'flamingo' ),
|
104 |
+
number_format_i18n( $posts_in_trash ) );
|
105 |
+
|
106 |
+
$status_links['trash'] = sprintf( '<a href="%1$s"%2$s>%3$s</a>',
|
107 |
+
admin_url( 'admin.php?page=flamingo_inbound&post_status=trash' ),
|
108 |
+
'trash' == $post_status ? ' class="current"' : '',
|
109 |
+
$trash );
|
110 |
+
|
111 |
+
return $status_links;
|
112 |
+
}
|
113 |
+
|
114 |
+
function get_columns() {
|
115 |
+
return get_column_headers( get_current_screen() );
|
116 |
+
}
|
117 |
+
|
118 |
+
function get_sortable_columns() {
|
119 |
+
$columns = array(
|
120 |
+
'subject' => array( 'subject', false ),
|
121 |
+
'from' => array( 'from', false ),
|
122 |
+
'date' => array( 'date', true ) );
|
123 |
+
|
124 |
+
return $columns;
|
125 |
+
}
|
126 |
+
|
127 |
+
function get_bulk_actions() {
|
128 |
+
$actions = array();
|
129 |
+
|
130 |
+
if ( $this->is_trash )
|
131 |
+
$actions['untrash'] = __( 'Restore', 'flamingo' );
|
132 |
+
|
133 |
+
if ( $this->is_trash || ! EMPTY_TRASH_DAYS )
|
134 |
+
$actions['delete'] = __( 'Delete Permanently', 'flamingo' );
|
135 |
+
else
|
136 |
+
$actions['trash'] = __( 'Move to Trash', 'flamingo' );
|
137 |
+
|
138 |
+
return $actions;
|
139 |
+
}
|
140 |
+
|
141 |
+
function extra_tablenav( $which ) {
|
142 |
+
$channel = 0;
|
143 |
+
|
144 |
+
if ( ! empty( $_REQUEST['channel_id'] ) ) {
|
145 |
+
$term = get_term( $_REQUEST['channel_id'], Flamingo_Inbound_Message::channel_taxonomy );
|
146 |
+
|
147 |
+
if ( ! empty( $term ) && ! is_wp_error( $term ) )
|
148 |
+
$channel = $term->term_id;
|
149 |
+
|
150 |
+
} elseif ( ! empty( $_REQUEST['channel'] ) ) {
|
151 |
+
$term = get_term_by( 'slug', $_REQUEST['channel'],
|
152 |
+
Flamingo_Inbound_Message::channel_taxonomy );
|
153 |
+
|
154 |
+
if ( ! empty( $term ) && ! is_wp_error( $term ) )
|
155 |
+
$channel = $term->term_id;
|
156 |
+
}
|
157 |
+
|
158 |
+
?>
|
159 |
+
<div class="alignleft actions">
|
160 |
+
<?php
|
161 |
+
if ( 'top' == $which ) {
|
162 |
+
$this->months_dropdown( Flamingo_Inbound_Message::post_type );
|
163 |
+
|
164 |
+
wp_dropdown_categories( array(
|
165 |
+
'taxonomy' => Flamingo_Inbound_Message::channel_taxonomy,
|
166 |
+
'name' => 'channel_id',
|
167 |
+
'show_option_all' => __( 'View all channels', 'flamingo' ),
|
168 |
+
'hide_empty' => 0,
|
169 |
+
'hide_if_empty' => 1,
|
170 |
+
'orderby' => 'name',
|
171 |
+
'selected' => $channel ) );
|
172 |
+
|
173 |
+
submit_button( __( 'Filter', 'flamingo' ),
|
174 |
+
'secondary', false, false, array( 'id' => 'post-query-submit' ) );
|
175 |
+
}
|
176 |
+
|
177 |
+
if ( $this->is_trash && current_user_can( 'flamingo_delete_inbound_messages' ) ) {
|
178 |
+
submit_button( __( 'Empty Trash', 'flamingo' ),
|
179 |
+
'button-secondary apply', 'delete_all', false );
|
180 |
+
}
|
181 |
+
?>
|
182 |
+
</div>
|
183 |
+
<?php
|
184 |
+
}
|
185 |
+
|
186 |
+
function column_default( $item, $column_name ) {
|
187 |
+
return '';
|
188 |
+
}
|
189 |
+
|
190 |
+
function column_cb( $item ) {
|
191 |
+
return sprintf(
|
192 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
193 |
+
$this->_args['singular'],
|
194 |
+
$item->id );
|
195 |
+
}
|
196 |
+
|
197 |
+
function column_subject( $item ) {
|
198 |
+
if ( $this->is_trash )
|
199 |
+
return '<strong>' . esc_html( $item->subject ) . '</strong>';
|
200 |
+
|
201 |
+
$url = admin_url( 'admin.php?page=flamingo_inbound&post=' . absint( $item->id ) );
|
202 |
+
$edit_link = add_query_arg( array( 'action' => 'edit' ), $url );
|
203 |
+
|
204 |
+
$actions = array(
|
205 |
+
'edit' => '<a href="' . $edit_link . '">' . __( 'Edit', 'flamingo' ) . '</a>' );
|
206 |
+
|
207 |
+
$a = sprintf( '<a class="row-title" href="%1$s" title="%2$s">%3$s</a>',
|
208 |
+
$edit_link,
|
209 |
+
esc_attr( sprintf( __( 'Edit “%s”', 'flamingo' ), $item->subject ) ),
|
210 |
+
esc_html( $item->subject ) );
|
211 |
+
|
212 |
+
return '<strong>' . $a . '</strong> ' . $this->row_actions( $actions );
|
213 |
+
}
|
214 |
+
|
215 |
+
function column_from( $item ) {
|
216 |
+
return $item->from;
|
217 |
+
}
|
218 |
+
|
219 |
+
function column_channel( $item ) {
|
220 |
+
if ( empty( $item->channel ) )
|
221 |
+
return '';
|
222 |
+
|
223 |
+
$term = get_term_by( 'slug', $item->channel, Flamingo_Inbound_Message::channel_taxonomy );
|
224 |
+
|
225 |
+
if ( empty( $term ) || is_wp_error( $term ) )
|
226 |
+
return $item->channel;
|
227 |
+
|
228 |
+
$link = admin_url( 'admin.php?page=flamingo_inbound&channel=' . $term->slug );
|
229 |
+
|
230 |
+
$output = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
|
231 |
+
$link, esc_attr( $term->name ), esc_html( $term->name ) );
|
232 |
+
|
233 |
+
return $output;
|
234 |
+
}
|
235 |
+
|
236 |
+
function column_date( $item ) {
|
237 |
+
$post = get_post( $item->id );
|
238 |
+
|
239 |
+
if ( ! $post )
|
240 |
+
return '';
|
241 |
+
|
242 |
+
$t_time = get_the_time( __( 'Y/m/d g:i:s A', 'flamingo' ), $item->id );
|
243 |
+
$m_time = $post->post_date;
|
244 |
+
$time = get_post_time( 'G', true, $item->id );
|
245 |
+
|
246 |
+
$time_diff = time() - $time;
|
247 |
+
|
248 |
+
if ( $time_diff > 0 && $time_diff < 24*60*60 )
|
249 |
+
$h_time = sprintf( __( '%s ago', 'flamingo' ), human_time_diff( $time ) );
|
250 |
+
else
|
251 |
+
$h_time = mysql2date( __( 'Y/m/d', 'flamingo' ), $m_time );
|
252 |
+
|
253 |
+
return '<abbr title="' . $t_time . '">' . $h_time . '</abbr>';
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
?>
|
admin/includes/meta-boxes.php
ADDED
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function flamingo_contact_submit_meta_box( $post ) {
|
4 |
+
?>
|
5 |
+
<div class="submitbox" id="submitlink">
|
6 |
+
<div id="major-publishing-actions">
|
7 |
+
|
8 |
+
<div id="publishing-action">
|
9 |
+
<?php if ( ! empty( $post->id ) ) : ?>
|
10 |
+
<input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php echo esc_attr( __( 'Update Contact', 'flamingo' ) ); ?>" />
|
11 |
+
<?php else : ?>
|
12 |
+
<input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php echo esc_attr( __( 'Add Contact', 'flamingo' ) ); ?>" />
|
13 |
+
<?php endif; ?>
|
14 |
+
</div>
|
15 |
+
|
16 |
+
<div class="clear"></div>
|
17 |
+
</div><!-- #major-publishing-actions -->
|
18 |
+
|
19 |
+
<div class="clear"></div>
|
20 |
+
</div>
|
21 |
+
<?php
|
22 |
+
}
|
23 |
+
|
24 |
+
function flamingo_contact_tags_meta_box( $post ) {
|
25 |
+
$taxonomy = get_taxonomy( Flamingo_Contact::contact_tag_taxonomy );
|
26 |
+
|
27 |
+
if ( ! $taxonomy )
|
28 |
+
return;
|
29 |
+
|
30 |
+
$tags = wp_get_post_terms( $post->id, $taxonomy->name );
|
31 |
+
$tag_names = $tag_ids = array();
|
32 |
+
|
33 |
+
if ( ! empty( $tags ) && ! is_wp_error( $tags ) ) {
|
34 |
+
foreach( $tags as $tag ) {
|
35 |
+
$tag_names[] = $tag->name;
|
36 |
+
$tag_ids[] = $tag->term_id;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
$tag_names = implode( ', ', $tag_names );
|
41 |
+
|
42 |
+
$most_used_tags = get_terms( Flamingo_Contact::contact_tag_taxonomy, array(
|
43 |
+
'orderby' => 'count',
|
44 |
+
'order' => 'DESC',
|
45 |
+
'number' => 10,
|
46 |
+
'exclude' => $tag_ids,
|
47 |
+
'fields' => 'names' ) );
|
48 |
+
|
49 |
+
if ( is_wp_error( $most_used_tags ) )
|
50 |
+
$most_used_tags = array();
|
51 |
+
|
52 |
+
?>
|
53 |
+
<div class="tagsdiv" id="<?php echo esc_attr( $taxonomy->name ); ?>">
|
54 |
+
<textarea name="<?php echo "tax_input[$taxonomy->name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $taxonomy->name; ?>"><?php echo esc_textarea( $tag_names ); ?></textarea>
|
55 |
+
|
56 |
+
<p class="howto"><?php echo esc_html( __( 'Separate tags with commas', 'flamingo' ) ); ?></p>
|
57 |
+
|
58 |
+
<?php if ( $most_used_tags ) : ?>
|
59 |
+
<p class="howto"><?php echo esc_html( __( 'Choose from the most used tags', 'flamingo' ) ); ?>
|
60 |
+
<br />
|
61 |
+
|
62 |
+
<?php foreach ( $most_used_tags as $tag ) {
|
63 |
+
echo '<a href="#" class="append-this-to-contact-tags">' . esc_html( $tag ) . '</a> ';
|
64 |
+
} ?>
|
65 |
+
</p>
|
66 |
+
<script type='text/javascript'>
|
67 |
+
/* <![CDATA[ */
|
68 |
+
(function($) {
|
69 |
+
$(function() {
|
70 |
+
$('a.append-this-to-contact-tags').click(function() {
|
71 |
+
var tagsinput = $('#tax-input-<?php echo esc_js( $taxonomy->name ); ?>');
|
72 |
+
tagsinput.val($.trim(tagsinput.val()));
|
73 |
+
if (tagsinput.val()) tagsinput.val(tagsinput.val() + ', ');
|
74 |
+
tagsinput.val(tagsinput.val() + $(this).text());
|
75 |
+
return false;
|
76 |
+
});
|
77 |
+
});
|
78 |
+
})(jQuery);
|
79 |
+
/* ]]> */
|
80 |
+
</script>
|
81 |
+
<?php endif; ?>
|
82 |
+
</div>
|
83 |
+
<?php
|
84 |
+
}
|
85 |
+
|
86 |
+
function flamingo_inbound_submit_meta_box( $post ) {
|
87 |
+
?>
|
88 |
+
<div class="submitbox" id="submitlink">
|
89 |
+
<div id="major-publishing-actions">
|
90 |
+
|
91 |
+
<div id="delete-action">
|
92 |
+
<?php
|
93 |
+
if ( current_user_can( 'flamingo_delete_inbound_message', $post->id ) ) {
|
94 |
+
if ( ! EMPTY_TRASH_DAYS )
|
95 |
+
$delete_text = __( 'Delete Permanently', 'flamingo' );
|
96 |
+
else
|
97 |
+
$delete_text = __( 'Move to Trash', 'flamingo' );
|
98 |
+
|
99 |
+
$delete_link = admin_url(
|
100 |
+
sprintf( 'admin.php?page=flamingo_inbound&post=%s&action=trash', $post->id ) );
|
101 |
+
$delete_link = wp_nonce_url( $delete_link, 'flamingo-trash-inbound-message_' . $post->id );
|
102 |
+
|
103 |
+
?><a class="submitdelete deletion" href="<?php echo $delete_link; ?>"><?php echo esc_html( $delete_text ); ?></a><?php } ?>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<div id="publishing-action">
|
107 |
+
<?php if ( ! empty( $post->id ) ) : ?>
|
108 |
+
<input disabled="disabled" name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php echo esc_attr( __( 'Update Message', 'flamingo' ) ); ?>" />
|
109 |
+
<?php else : ?>
|
110 |
+
<input disabled="disabled" name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php echo esc_attr( __( 'Add Message', 'flamingo' ) ); ?>" />
|
111 |
+
<?php endif; ?>
|
112 |
+
</div>
|
113 |
+
|
114 |
+
<div class="clear"></div>
|
115 |
+
</div><!-- #major-publishing-actions -->
|
116 |
+
|
117 |
+
<div class="clear"></div>
|
118 |
+
</div>
|
119 |
+
<?php
|
120 |
+
}
|
121 |
+
|
122 |
+
function flamingo_contact_name_meta_box( $post ) {
|
123 |
+
?>
|
124 |
+
<table class="form-table">
|
125 |
+
<tbody>
|
126 |
+
|
127 |
+
<tr class="contact-prop">
|
128 |
+
<th><label for="contact_name"><?php echo esc_attr( __( 'Full name', 'flamingo' ) ); ?></th>
|
129 |
+
<td><input type="text" name="contact[name]" id="contact_name" value="<?php echo esc_attr( $post->get_prop( 'name' ) ); ?>" class="widefat" /></td>
|
130 |
+
</tr>
|
131 |
+
|
132 |
+
<tr class="contact-prop">
|
133 |
+
<th><label for="contact_first_name"><?php echo esc_attr( __( 'First name', 'flamingo' ) ); ?></th>
|
134 |
+
<td><input type="text" name="contact[first_name]" id="contact_first_name" value="<?php echo esc_attr( $post->get_prop( 'first_name' ) ); ?>" class="widefat" /></td>
|
135 |
+
</tr>
|
136 |
+
|
137 |
+
<tr class="contact-prop">
|
138 |
+
<th><label for="contact_last_name"><?php echo esc_attr( __( 'Last name', 'flamingo' ) ); ?></th>
|
139 |
+
<td><input type="text" name="contact[last_name]" id="contact_last_name" value="<?php echo esc_attr( $post->get_prop( 'last_name' ) ); ?>" class="widefat" /></td>
|
140 |
+
</tr>
|
141 |
+
|
142 |
+
</tbody>
|
143 |
+
</table>
|
144 |
+
<?php
|
145 |
+
}
|
146 |
+
|
147 |
+
function flamingo_inbound_fields_meta_box( $post ) {
|
148 |
+
?>
|
149 |
+
<table class="widefat message-fields" cellspacing="0">
|
150 |
+
<tbody>
|
151 |
+
|
152 |
+
<?php foreach ( (array) $post->fields as $key => $value ) : $alt = 0; ?>
|
153 |
+
<tr<?php $alt = 1 - $alt; echo $alt ? ' class="alt"' : ''; ?>>
|
154 |
+
<td class="field-title"><?php echo esc_html( $key ); ?></td>
|
155 |
+
<td class="field-value"><?php echo wpautop( esc_html( $value ) ); ?></td>
|
156 |
+
</tr>
|
157 |
+
<?php endforeach; ?>
|
158 |
+
|
159 |
+
</tbody>
|
160 |
+
</table>
|
161 |
+
<?php
|
162 |
+
}
|
163 |
+
|
164 |
+
?>
|
admin/script.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($) {
|
2 |
+
|
3 |
+
$(function() {
|
4 |
+
postboxes.add_postbox_toggles('flamingoEditContact');
|
5 |
+
});
|
6 |
+
|
7 |
+
})(jQuery);
|
admin/style.css
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#icon-flamingo {
|
2 |
+
background: transparent url(./images/screen-icon.png) no-repeat 2px 1px;
|
3 |
+
}
|
4 |
+
|
5 |
+
ul.contact-history {
|
6 |
+
margin: 0;
|
7 |
+
}
|
8 |
+
|
9 |
+
#poststuff #inboundsubmitdiv .inside, #poststuff #contactsubmitdiv .inside {
|
10 |
+
margin: 0;
|
11 |
+
padding: 0;
|
12 |
+
}
|
13 |
+
|
14 |
+
#poststuff table.form-table tr.contact-prop th {
|
15 |
+
width: 25%;
|
16 |
+
}
|
17 |
+
|
18 |
+
table.message-main-fields th, table.message-main-fields td {
|
19 |
+
font-size: 15px;
|
20 |
+
text-align: left;
|
21 |
+
padding: 8px 4px;
|
22 |
+
}
|
23 |
+
|
24 |
+
table.message-main-fields th {
|
25 |
+
width: 20%;
|
26 |
+
color: #555;
|
27 |
+
}
|
28 |
+
|
29 |
+
table.message-fields td {
|
30 |
+
padding: 4px 14px 2px 7px;
|
31 |
+
}
|
32 |
+
|
33 |
+
table.message-fields td.field-title {
|
34 |
+
font-weight: bold;
|
35 |
+
width: 24%;
|
36 |
+
}
|
flamingo.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Flamingo
|
4 |
+
Plugin URI: http://flamingo-eggs.com/
|
5 |
+
Description: Flamingo manages your contact list on WordPress.
|
6 |
+
Author: Takayuki Miyoshi
|
7 |
+
Text Domain: flamingo
|
8 |
+
Domain Path: /languages/
|
9 |
+
Version: 1.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
define( 'FLAMINGO_VERSION', '1.0' );
|
13 |
+
|
14 |
+
define( 'FLAMINGO_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
15 |
+
|
16 |
+
define( 'FLAMINGO_PLUGIN_NAME', trim( dirname( FLAMINGO_PLUGIN_BASENAME ), '/' ) );
|
17 |
+
|
18 |
+
define( 'FLAMINGO_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
|
19 |
+
|
20 |
+
define( 'FLAMINGO_PLUGIN_URL', untrailingslashit( plugins_url( '', __FILE__ ) ) );
|
21 |
+
|
22 |
+
require_once FLAMINGO_PLUGIN_DIR . '/includes/functions.php';
|
23 |
+
require_once FLAMINGO_PLUGIN_DIR . '/includes/capabilities.php';
|
24 |
+
require_once FLAMINGO_PLUGIN_DIR . '/includes/class-contact.php';
|
25 |
+
require_once FLAMINGO_PLUGIN_DIR . '/includes/class-inbound-message.php';
|
26 |
+
require_once FLAMINGO_PLUGIN_DIR . '/includes/user.php';
|
27 |
+
require_once FLAMINGO_PLUGIN_DIR . '/includes/comment.php';
|
28 |
+
|
29 |
+
if ( is_admin() )
|
30 |
+
require_once FLAMINGO_PLUGIN_DIR . '/admin/admin.php';
|
31 |
+
|
32 |
+
/* Init */
|
33 |
+
|
34 |
+
add_action( 'init', 'flamingo_init' );
|
35 |
+
|
36 |
+
function flamingo_init() {
|
37 |
+
|
38 |
+
/* L10N */
|
39 |
+
load_plugin_textdomain( 'flamingo', false, 'flamingo/languages' );
|
40 |
+
|
41 |
+
/* Custom Post Types */
|
42 |
+
Flamingo_Contact::register_post_type();
|
43 |
+
Flamingo_Inbound_Message::register_post_type();
|
44 |
+
|
45 |
+
do_action( 'flamingo_init' );
|
46 |
+
}
|
47 |
+
|
48 |
+
?>
|
includes/capabilities.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
add_filter( 'map_meta_cap', 'flamingo_map_meta_cap', 10, 4 );
|
4 |
+
|
5 |
+
function flamingo_map_meta_cap( $caps, $cap, $user_id, $args ) {
|
6 |
+
$meta_caps = array(
|
7 |
+
'flamingo_edit_contacts' => 'edit_users',
|
8 |
+
'flamingo_edit_contact' => 'edit_users',
|
9 |
+
'flamingo_edit_inbound_messages' => 'edit_users',
|
10 |
+
'flamingo_delete_inbound_message' => 'edit_users',
|
11 |
+
'flamingo_delete_inbound_messages' => 'edit_users' );
|
12 |
+
|
13 |
+
$caps = array_diff( $caps, array_keys( $meta_caps ) );
|
14 |
+
|
15 |
+
if ( array_key_exists( $cap, $meta_caps ) )
|
16 |
+
$caps[] = $meta_caps[$cap];
|
17 |
+
|
18 |
+
return $caps;
|
19 |
+
}
|
20 |
+
|
21 |
+
?>
|
includes/class-contact.php
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Flamingo_Contact {
|
4 |
+
|
5 |
+
const post_type = 'flamingo_contact';
|
6 |
+
const contact_tag_taxonomy = 'flamingo_contact_tag';
|
7 |
+
|
8 |
+
public static $found_items = 0;
|
9 |
+
|
10 |
+
public $id;
|
11 |
+
public $email;
|
12 |
+
public $name;
|
13 |
+
public $props = array();
|
14 |
+
public $tags = array();
|
15 |
+
public $last_contacted;
|
16 |
+
|
17 |
+
public static function register_post_type() {
|
18 |
+
register_post_type( self::post_type, array(
|
19 |
+
'labels' => array(
|
20 |
+
'name' => __( 'Flamingo Contacts', 'flamingo' ),
|
21 |
+
'singular_name' => __( 'Flamingo Contact', 'flamingo' ) ) ) );
|
22 |
+
|
23 |
+
register_taxonomy( self::contact_tag_taxonomy, self::post_type, array(
|
24 |
+
'labels' => array(
|
25 |
+
'name' => __( 'Flamingo Contact Tags', 'flamingo' ),
|
26 |
+
'singular_name' => __( 'Flamingo Contact Tag', 'flamingo' ) ),
|
27 |
+
'public' => false ) );
|
28 |
+
}
|
29 |
+
|
30 |
+
public static function find( $args = '' ) {
|
31 |
+
$defaults = array(
|
32 |
+
'posts_per_page' => 10,
|
33 |
+
'offset' => 0,
|
34 |
+
'orderby' => 'ID',
|
35 |
+
'order' => 'ASC',
|
36 |
+
'meta_key' => '',
|
37 |
+
'meta_value' => '',
|
38 |
+
'post_status' => 'any',
|
39 |
+
'tax_query' => array(),
|
40 |
+
'contact_tag_id' => '' );
|
41 |
+
|
42 |
+
$args = wp_parse_args( $args, $defaults );
|
43 |
+
|
44 |
+
$args['post_type'] = self::post_type;
|
45 |
+
|
46 |
+
if ( ! empty( $args['contact_tag_id'] ) ) {
|
47 |
+
$args['tax_query'][] = array(
|
48 |
+
'taxonomy' => self::contact_tag_taxonomy,
|
49 |
+
'terms' => $args['contact_tag_id'],
|
50 |
+
'field' => 'term_id' );
|
51 |
+
}
|
52 |
+
|
53 |
+
$q = new WP_Query();
|
54 |
+
$posts = $q->query( $args );
|
55 |
+
|
56 |
+
self::$found_items = $q->found_posts;
|
57 |
+
|
58 |
+
$objs = array();
|
59 |
+
|
60 |
+
foreach ( (array) $posts as $post )
|
61 |
+
$objs[] = new self( $post );
|
62 |
+
|
63 |
+
return $objs;
|
64 |
+
}
|
65 |
+
|
66 |
+
public static function search_by_email( $email ) {
|
67 |
+
$objs = self::find( array(
|
68 |
+
'posts_per_page' => 1,
|
69 |
+
'orderby' => 'ID',
|
70 |
+
'meta_key' => '_email',
|
71 |
+
'meta_value' => $email ) );
|
72 |
+
|
73 |
+
if ( empty( $objs ) )
|
74 |
+
return null;
|
75 |
+
|
76 |
+
return $objs[0];
|
77 |
+
}
|
78 |
+
|
79 |
+
public static function add( $args = '' ) {
|
80 |
+
$defaults = array(
|
81 |
+
'email' => '',
|
82 |
+
'name' => '',
|
83 |
+
'props' => array() );
|
84 |
+
|
85 |
+
$args = wp_parse_args( $args, $defaults );
|
86 |
+
|
87 |
+
if ( empty( $args['email'] ) || ! is_email( $args['email'] ) )
|
88 |
+
return;
|
89 |
+
|
90 |
+
$obj = self::search_by_email( $args['email'] );
|
91 |
+
|
92 |
+
if ( ! $obj ) {
|
93 |
+
$obj = new self();
|
94 |
+
|
95 |
+
$obj->email = $args['email'];
|
96 |
+
$obj->name = $args['name'];
|
97 |
+
$obj->props = (array) $args['props'];
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( ! empty( $args['last_contacted'] ) )
|
101 |
+
$obj->last_contacted = $args['last_contacted'];
|
102 |
+
else
|
103 |
+
$obj->last_contacted = current_time( 'mysql' );
|
104 |
+
|
105 |
+
$obj->save();
|
106 |
+
|
107 |
+
return $obj;
|
108 |
+
}
|
109 |
+
|
110 |
+
public function __construct( $post = null ) {
|
111 |
+
$post = get_post( $post );
|
112 |
+
|
113 |
+
if ( $post ) {
|
114 |
+
$this->id = $post->ID;
|
115 |
+
$this->email = get_post_meta( $post->ID, '_email', true );
|
116 |
+
$this->name = get_post_meta( $post->ID, '_name', true );
|
117 |
+
$this->props = get_post_meta( $post->ID, '_props', true );
|
118 |
+
$this->last_contacted = get_post_meta( $post->ID, '_last_contacted', true );
|
119 |
+
|
120 |
+
$terms = wp_get_object_terms( $this->id, self::contact_tag_taxonomy );
|
121 |
+
|
122 |
+
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
|
123 |
+
foreach ( $terms as $term )
|
124 |
+
$this->tags[] = $term->name;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
public function save() {
|
130 |
+
$post_title = $this->email;
|
131 |
+
$post_name = strtr( $this->email, '@', '-' );
|
132 |
+
|
133 |
+
$fields = flamingo_array_flatten( $this->props );
|
134 |
+
$fields = array_merge( $fields, array( $this->email, $this->name ) );
|
135 |
+
$fields = array_filter( array_map( 'trim', $fields ) );
|
136 |
+
$fields = array_unique( $fields );
|
137 |
+
|
138 |
+
$post_content = implode( "\n", $fields );
|
139 |
+
|
140 |
+
$postarr = array(
|
141 |
+
'ID' => absint( $this->id ),
|
142 |
+
'post_type' => self::post_type,
|
143 |
+
'post_status' => 'publish',
|
144 |
+
'post_title' => $post_title,
|
145 |
+
'post_name' => $post_name,
|
146 |
+
'post_content' => $post_content );
|
147 |
+
|
148 |
+
$post_id = wp_insert_post( $postarr );
|
149 |
+
|
150 |
+
if ( $post_id ) {
|
151 |
+
$this->id = $post_id;
|
152 |
+
update_post_meta( $post_id, '_email', $this->email );
|
153 |
+
update_post_meta( $post_id, '_name', $this->name );
|
154 |
+
update_post_meta( $post_id, '_props', $this->props );
|
155 |
+
update_post_meta( $post_id, '_last_contacted', $this->last_contacted );
|
156 |
+
|
157 |
+
wp_set_object_terms( $this->id, $this->tags, self::contact_tag_taxonomy );
|
158 |
+
}
|
159 |
+
|
160 |
+
return $post_id;
|
161 |
+
}
|
162 |
+
|
163 |
+
public function get_prop( $name ) {
|
164 |
+
if ( 'name' == $name )
|
165 |
+
return $this->name;
|
166 |
+
|
167 |
+
if ( isset( $this->props[$name] ) )
|
168 |
+
return $this->props[$name];
|
169 |
+
|
170 |
+
return '';
|
171 |
+
}
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
?>
|
includes/class-inbound-message.php
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Flamingo_Inbound_Message {
|
4 |
+
|
5 |
+
const post_type = 'flamingo_inbound';
|
6 |
+
const channel_taxonomy = 'flamingo_inbound_channel';
|
7 |
+
|
8 |
+
public static $found_items = 0;
|
9 |
+
|
10 |
+
public $id;
|
11 |
+
public $channel;
|
12 |
+
public $date;
|
13 |
+
public $subject;
|
14 |
+
public $from;
|
15 |
+
public $from_name;
|
16 |
+
public $from_email;
|
17 |
+
public $fields;
|
18 |
+
|
19 |
+
public static function register_post_type() {
|
20 |
+
register_post_type( self::post_type, array(
|
21 |
+
'labels' => array(
|
22 |
+
'name' => __( 'Flamingo Inbound Messages', 'flamingo' ),
|
23 |
+
'singular_name' => __( 'Flamingo Inbound Message', 'flamingo' ) ) ) );
|
24 |
+
|
25 |
+
register_taxonomy( self::channel_taxonomy, self::post_type, array(
|
26 |
+
'labels' => array(
|
27 |
+
'name' => __( 'Flamingo Inbound Message Channels', 'flamingo' ),
|
28 |
+
'singular_name' => __( 'Flamingo Inbound Message Channel', 'flamingo' ) ),
|
29 |
+
'public' => false ) );
|
30 |
+
}
|
31 |
+
|
32 |
+
public static function find( $args = '' ) {
|
33 |
+
$defaults = array(
|
34 |
+
'posts_per_page' => 10,
|
35 |
+
'offset' => 0,
|
36 |
+
'orderby' => 'ID',
|
37 |
+
'order' => 'ASC',
|
38 |
+
'meta_key' => '',
|
39 |
+
'meta_value' => '',
|
40 |
+
'post_status' => 'any',
|
41 |
+
'tax_query' => array(),
|
42 |
+
'channel' => '',
|
43 |
+
'channel_id' => '' );
|
44 |
+
|
45 |
+
$args = wp_parse_args( $args, $defaults );
|
46 |
+
|
47 |
+
$args['post_type'] = self::post_type;
|
48 |
+
|
49 |
+
if ( ! empty( $args['channel_id'] ) ) {
|
50 |
+
$args['tax_query'][] = array(
|
51 |
+
'taxonomy' => self::channel_taxonomy,
|
52 |
+
'terms' => $args['channel_id'],
|
53 |
+
'field' => 'term_id' );
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( ! empty( $args['channel'] ) ) {
|
57 |
+
$args['tax_query'][] = array(
|
58 |
+
'taxonomy' => self::channel_taxonomy,
|
59 |
+
'terms' => $args['channel'],
|
60 |
+
'field' => 'slug' );
|
61 |
+
}
|
62 |
+
|
63 |
+
$q = new WP_Query();
|
64 |
+
$posts = $q->query( $args );
|
65 |
+
|
66 |
+
self::$found_items = $q->found_posts;
|
67 |
+
|
68 |
+
$objs = array();
|
69 |
+
|
70 |
+
foreach ( (array) $posts as $post )
|
71 |
+
$objs[] = new self( $post );
|
72 |
+
|
73 |
+
return $objs;
|
74 |
+
}
|
75 |
+
|
76 |
+
public static function add( $args = '' ) {
|
77 |
+
$defaults = array(
|
78 |
+
'channel' => '',
|
79 |
+
'subject' => '',
|
80 |
+
'from' => '',
|
81 |
+
'from_name' => '',
|
82 |
+
'from_email' => '',
|
83 |
+
'fields' => array() );
|
84 |
+
|
85 |
+
$args = wp_parse_args( $args, $defaults );
|
86 |
+
|
87 |
+
$obj = new self();
|
88 |
+
|
89 |
+
$obj->channel = $args['channel'];
|
90 |
+
$obj->subject = $args['subject'];
|
91 |
+
$obj->from = $args['from'];
|
92 |
+
$obj->from_name = $args['from_name'];
|
93 |
+
$obj->from_email = $args['from_email'];
|
94 |
+
$obj->fields = $args['fields'];
|
95 |
+
|
96 |
+
$obj->save();
|
97 |
+
|
98 |
+
return $obj;
|
99 |
+
}
|
100 |
+
|
101 |
+
public function __construct( $post = null ) {
|
102 |
+
$post = get_post( $post );
|
103 |
+
|
104 |
+
if ( $post ) {
|
105 |
+
$this->id = $post->ID;
|
106 |
+
|
107 |
+
$this->date = get_the_time( __( 'Y/m/d g:i:s A', 'flamingo' ), $this->id );
|
108 |
+
$this->subject = get_post_meta( $post->ID, '_subject', true );
|
109 |
+
$this->from = get_post_meta( $post->ID, '_from', true );
|
110 |
+
$this->from_name = get_post_meta( $post->ID, '_from_name', true );
|
111 |
+
$this->from_email = get_post_meta( $post->ID, '_from_email', true );
|
112 |
+
$this->fields = get_post_meta( $post->ID, '_fields', true );
|
113 |
+
|
114 |
+
$terms = wp_get_object_terms( $this->id, self::channel_taxonomy );
|
115 |
+
|
116 |
+
if ( ! empty( $terms ) && ! is_wp_error( $terms ) )
|
117 |
+
$this->channel = $terms[0]->slug;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
public function save() {
|
122 |
+
if ( ! empty( $this->subject ) )
|
123 |
+
$post_title = $this->subject;
|
124 |
+
else
|
125 |
+
$post_title = __( '(No Title)', 'flamingo' );
|
126 |
+
|
127 |
+
$fields = flamingo_array_flatten( $this->fields );
|
128 |
+
$fields = array_filter( array_map( 'trim', $fields ) );
|
129 |
+
|
130 |
+
$post_content = implode( "\n", $fields );
|
131 |
+
|
132 |
+
$postarr = array(
|
133 |
+
'ID' => absint( $this->id ),
|
134 |
+
'post_type' => self::post_type,
|
135 |
+
'post_status' => 'publish',
|
136 |
+
'post_title' => $post_title,
|
137 |
+
'post_content' => $post_content );
|
138 |
+
|
139 |
+
$post_id = wp_insert_post( $postarr );
|
140 |
+
|
141 |
+
if ( $post_id ) {
|
142 |
+
$this->id = $post_id;
|
143 |
+
update_post_meta( $post_id, '_subject', $this->subject );
|
144 |
+
update_post_meta( $post_id, '_from', $this->from );
|
145 |
+
update_post_meta( $post_id, '_from_name', $this->from_name );
|
146 |
+
update_post_meta( $post_id, '_from_email', $this->from_email );
|
147 |
+
update_post_meta( $post_id, '_fields', $this->fields );
|
148 |
+
|
149 |
+
if ( term_exists( $this->channel, self::channel_taxonomy ) )
|
150 |
+
wp_set_object_terms( $this->id, $this->channel, self::channel_taxonomy );
|
151 |
+
}
|
152 |
+
|
153 |
+
return $post_id;
|
154 |
+
}
|
155 |
+
|
156 |
+
public function trash() {
|
157 |
+
if ( empty( $this->id ) )
|
158 |
+
return;
|
159 |
+
|
160 |
+
if ( ! EMPTY_TRASH_DAYS )
|
161 |
+
return $this->delete();
|
162 |
+
|
163 |
+
$post = wp_trash_post( $this->id );
|
164 |
+
|
165 |
+
return (bool) $post;
|
166 |
+
}
|
167 |
+
|
168 |
+
public function untrash() {
|
169 |
+
if ( empty( $this->id ) )
|
170 |
+
return;
|
171 |
+
|
172 |
+
$post = wp_untrash_post( $this->id );
|
173 |
+
|
174 |
+
return (bool) $post;
|
175 |
+
}
|
176 |
+
|
177 |
+
public function delete() {
|
178 |
+
if ( empty( $this->id ) )
|
179 |
+
return;
|
180 |
+
|
181 |
+
if ( $post = wp_delete_post( $this->id, true ) )
|
182 |
+
$this->id = 0;
|
183 |
+
|
184 |
+
return (bool) $post;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
?>
|
includes/comment.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
** Module for WordPress comment.
|
4 |
+
**/
|
5 |
+
|
6 |
+
add_action( 'wp_insert_comment', 'flamingo_insert_comment' );
|
7 |
+
|
8 |
+
function flamingo_insert_comment( $comment_id ) {
|
9 |
+
$comment = get_comment( $comment_id );
|
10 |
+
|
11 |
+
if ( 1 != (int) $comment->comment_approved )
|
12 |
+
return;
|
13 |
+
|
14 |
+
Flamingo_Contact::add( array(
|
15 |
+
'email' => $comment->comment_author_email,
|
16 |
+
'name' => $comment->comment_author,
|
17 |
+
'channel' => 'comment' ) );
|
18 |
+
}
|
19 |
+
|
20 |
+
add_action( 'transition_comment_status', 'flamingo_transition_comment_status', 10, 3 );
|
21 |
+
|
22 |
+
function flamingo_transition_comment_status( $new_status, $old_status, $comment ) {
|
23 |
+
if ( 'approved' != $new_status )
|
24 |
+
return;
|
25 |
+
|
26 |
+
$email = $comment->comment_author_email;
|
27 |
+
$name = $comment->comment_author;
|
28 |
+
|
29 |
+
Flamingo_Contact::add( array(
|
30 |
+
'email' => $email,
|
31 |
+
'name' => $name,
|
32 |
+
'channel' => 'comment' ) );
|
33 |
+
}
|
34 |
+
|
35 |
+
/* Collect contact info from existing comments when activating plugin */
|
36 |
+
add_action( 'activate_' . FLAMINGO_PLUGIN_BASENAME, 'flamingo_collect_contacts_from_comments' );
|
37 |
+
|
38 |
+
function flamingo_collect_contacts_from_comments() {
|
39 |
+
$comments = get_comments( array(
|
40 |
+
'status' => 'approve',
|
41 |
+
'type' => 'comment',
|
42 |
+
'number' => 20 ) );
|
43 |
+
|
44 |
+
foreach ( $comments as $comment ) {
|
45 |
+
$email = $comment->comment_author_email;
|
46 |
+
$name = $comment->comment_author;
|
47 |
+
|
48 |
+
if ( empty( $email ) )
|
49 |
+
continue;
|
50 |
+
|
51 |
+
Flamingo_Contact::add( array(
|
52 |
+
'email' => $email,
|
53 |
+
'name' => $name,
|
54 |
+
'channel' => 'comment' ) );
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
?>
|
includes/functions.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function flamingo_plugin_url( $path = '' ) {
|
4 |
+
$url = untrailingslashit( FLAMINGO_PLUGIN_URL );
|
5 |
+
|
6 |
+
if ( ! empty( $path ) && is_string( $path ) && false === strpos( $path, '..' ) )
|
7 |
+
$url .= '/' . ltrim( $path, '/' );
|
8 |
+
|
9 |
+
return $url;
|
10 |
+
}
|
11 |
+
|
12 |
+
function flamingo_array_flatten( $input ) {
|
13 |
+
if ( ! is_array( $input ) )
|
14 |
+
return array( $input );
|
15 |
+
|
16 |
+
$output = array();
|
17 |
+
|
18 |
+
foreach ( $input as $value )
|
19 |
+
$output = array_merge( $output, flamingo_array_flatten( $value ) );
|
20 |
+
|
21 |
+
return $output;
|
22 |
+
}
|
23 |
+
|
24 |
+
?>
|
includes/user.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
** Module for WordPress user.
|
4 |
+
**/
|
5 |
+
|
6 |
+
add_action( 'profile_update', 'flamingo_user_profile_update' );
|
7 |
+
add_action( 'user_register', 'flamingo_user_profile_update' );
|
8 |
+
|
9 |
+
function flamingo_user_profile_update( $user_id ) {
|
10 |
+
$user = new WP_User( $user_id );
|
11 |
+
|
12 |
+
$email = $user->user_email;
|
13 |
+
$name = $user->display_name;
|
14 |
+
|
15 |
+
$props = array(
|
16 |
+
'first_name' => $user->first_name,
|
17 |
+
'last_name' => $user->last_name );
|
18 |
+
|
19 |
+
if ( ! empty( $email ) ) {
|
20 |
+
Flamingo_Contact::add( array(
|
21 |
+
'email' => $email,
|
22 |
+
'name' => $name,
|
23 |
+
'props' => $props,
|
24 |
+
'channel' => 'user' ) );
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
/* Collect contact info from existing users when activating plugin */
|
29 |
+
add_action( 'activate_' . FLAMINGO_PLUGIN_BASENAME, 'flamingo_collect_contacts_from_users' );
|
30 |
+
|
31 |
+
function flamingo_collect_contacts_from_users() {
|
32 |
+
$users = get_users( array(
|
33 |
+
'number' => 20 ) );
|
34 |
+
|
35 |
+
foreach ( $users as $user ) {
|
36 |
+
$email = $user->user_email;
|
37 |
+
$name = $user->display_name;
|
38 |
+
|
39 |
+
if ( empty( $email ) )
|
40 |
+
continue;
|
41 |
+
|
42 |
+
$props = array(
|
43 |
+
'first_name' => empty( $user->first_name ) ? '' : $user->first_name,
|
44 |
+
'last_name' => empty( $user->last_name ) ? '' : $user->last_name );
|
45 |
+
|
46 |
+
Flamingo_Contact::add( array(
|
47 |
+
'email' => $email,
|
48 |
+
'name' => $name,
|
49 |
+
'props' => $props,
|
50 |
+
'channel' => 'user' ) );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
?>
|
languages/flamingo-ja.mo
ADDED
Binary file
|
languages/flamingo-ja.po
ADDED
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Flamingo\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-06-06 00:47+0900\n"
|
6 |
+
"PO-Revision-Date: 2012-06-06 00:54+0900\n"
|
7 |
+
"Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
|
8 |
+
"Language-Team: Takayuki Miyoshi <takayukister@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c\n"
|
14 |
+
"X-Poedit-Basepath: ../..\n"
|
15 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
+
"X-Poedit-Language: Japanese\n"
|
17 |
+
"X-Poedit-Country: JAPAN\n"
|
18 |
+
"X-Poedit-SearchPath-0: flamingo\n"
|
19 |
+
|
20 |
+
#: flamingo/flamingo.php:5
|
21 |
+
msgid "Flamingo manages your contact list on WordPress."
|
22 |
+
msgstr "Flamingo は WordPress 上であなたのアドレス帳を管理します。"
|
23 |
+
|
24 |
+
#: flamingo/admin/admin.php:9
|
25 |
+
#: flamingo/admin/admin.php:14
|
26 |
+
#: flamingo/admin/admin.php:154
|
27 |
+
msgid "Flamingo Address Book"
|
28 |
+
msgstr "Flamingo アドレス帳"
|
29 |
+
|
30 |
+
#: flamingo/admin/admin.php:9
|
31 |
+
msgid "Flamingo"
|
32 |
+
msgstr "Flamingo"
|
33 |
+
|
34 |
+
#: flamingo/admin/admin.php:14
|
35 |
+
msgid "Address Book"
|
36 |
+
msgstr "アドレス帳"
|
37 |
+
|
38 |
+
#: flamingo/admin/admin.php:20
|
39 |
+
#: flamingo/includes/class-inbound-message.php:22
|
40 |
+
msgid "Flamingo Inbound Messages"
|
41 |
+
msgstr "Flamingo 受信メッセージ"
|
42 |
+
|
43 |
+
#: flamingo/admin/admin.php:20
|
44 |
+
#: flamingo/admin/admin.php:323
|
45 |
+
msgid "Inbound Messages"
|
46 |
+
msgstr "受信メッセージ"
|
47 |
+
|
48 |
+
#: flamingo/admin/admin.php:64
|
49 |
+
msgid "Contact updated."
|
50 |
+
msgstr "連絡先を更新しました。"
|
51 |
+
|
52 |
+
#: flamingo/admin/admin.php:66
|
53 |
+
msgid "Messages trashed."
|
54 |
+
msgstr "メッセージをゴミ箱に移動しました。"
|
55 |
+
|
56 |
+
#: flamingo/admin/admin.php:68
|
57 |
+
msgid "Messages restored."
|
58 |
+
msgstr "メッセージをゴミ箱から復元しました。"
|
59 |
+
|
60 |
+
#: flamingo/admin/admin.php:70
|
61 |
+
msgid "Messages deleted."
|
62 |
+
msgstr "メッセージを削除しました。"
|
63 |
+
|
64 |
+
#: flamingo/admin/admin.php:97
|
65 |
+
msgid "You are not allowed to edit this item."
|
66 |
+
msgstr "この項目の編集は許可されていません。"
|
67 |
+
|
68 |
+
#: flamingo/admin/admin.php:130
|
69 |
+
msgid "Contacts"
|
70 |
+
msgstr "連絡先"
|
71 |
+
|
72 |
+
#: flamingo/admin/admin.php:158
|
73 |
+
#: flamingo/admin/admin.php:327
|
74 |
+
#, php-format
|
75 |
+
msgid "Search results for “%s”"
|
76 |
+
msgstr "“%s” の検索結果"
|
77 |
+
|
78 |
+
#: flamingo/admin/admin.php:167
|
79 |
+
msgid "Search Contacts"
|
80 |
+
msgstr "連絡先を検索"
|
81 |
+
|
82 |
+
#: flamingo/admin/admin.php:208
|
83 |
+
msgid "You are not allowed to move this item to the Trash."
|
84 |
+
msgstr "この項目をゴミ箱へ移動する権限がありません。 "
|
85 |
+
|
86 |
+
#: flamingo/admin/admin.php:211
|
87 |
+
msgid "Error in moving to Trash."
|
88 |
+
msgstr "ゴミ箱への移動中にエラーが発生しました。"
|
89 |
+
|
90 |
+
#: flamingo/admin/admin.php:238
|
91 |
+
msgid "You are not allowed to restore this item from the Trash."
|
92 |
+
msgstr "この項目をゴミ箱から元の状態に戻す権限がありません。 "
|
93 |
+
|
94 |
+
#: flamingo/admin/admin.php:241
|
95 |
+
msgid "Error in restoring from Trash."
|
96 |
+
msgstr "ゴミ箱からの復元中にエラーが発生しました。"
|
97 |
+
|
98 |
+
#: flamingo/admin/admin.php:275
|
99 |
+
msgid "You are not allowed to delete this item."
|
100 |
+
msgstr "この項目を削除する権限がありません。"
|
101 |
+
|
102 |
+
#: flamingo/admin/admin.php:278
|
103 |
+
msgid "Error in deleting."
|
104 |
+
msgstr "削除中にエラーが発生しました。"
|
105 |
+
|
106 |
+
#: flamingo/admin/admin.php:299
|
107 |
+
msgid "Messages"
|
108 |
+
msgstr "メッセージ"
|
109 |
+
|
110 |
+
#: flamingo/admin/admin.php:338
|
111 |
+
msgid "Search Messages"
|
112 |
+
msgstr "メッセージを検索"
|
113 |
+
|
114 |
+
#: flamingo/admin/edit-contact-form.php:13
|
115 |
+
#: flamingo/admin/edit-inbound-form.php:13
|
116 |
+
msgid "Save"
|
117 |
+
msgstr "保存"
|
118 |
+
|
119 |
+
#: flamingo/admin/edit-contact-form.php:16
|
120 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:13
|
121 |
+
msgid "Tags"
|
122 |
+
msgstr "タグ"
|
123 |
+
|
124 |
+
#: flamingo/admin/edit-contact-form.php:19
|
125 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:12
|
126 |
+
msgid "Name"
|
127 |
+
msgstr "名前"
|
128 |
+
|
129 |
+
#: flamingo/admin/edit-contact-form.php:26
|
130 |
+
msgid "Edit Contact"
|
131 |
+
msgstr "連絡先を編集"
|
132 |
+
|
133 |
+
#: flamingo/admin/edit-contact-form.php:52
|
134 |
+
msgid "Enter email here"
|
135 |
+
msgstr "メールアドレスを入力してください"
|
136 |
+
|
137 |
+
#: flamingo/admin/edit-inbound-form.php:16
|
138 |
+
msgid "Fields"
|
139 |
+
msgstr "項目"
|
140 |
+
|
141 |
+
#: flamingo/admin/edit-inbound-form.php:23
|
142 |
+
msgid "Inbound Message"
|
143 |
+
msgstr "受信メッセージ"
|
144 |
+
|
145 |
+
#: flamingo/admin/edit-inbound-form.php:48
|
146 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:14
|
147 |
+
msgid "Date"
|
148 |
+
msgstr "日付"
|
149 |
+
|
150 |
+
#: flamingo/admin/edit-inbound-form.php:53
|
151 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:11
|
152 |
+
msgid "Subject"
|
153 |
+
msgstr "件名"
|
154 |
+
|
155 |
+
#: flamingo/admin/edit-inbound-form.php:58
|
156 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:12
|
157 |
+
msgid "From"
|
158 |
+
msgstr "送信者"
|
159 |
+
|
160 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:11
|
161 |
+
msgid "Email"
|
162 |
+
msgstr "メールアドレス"
|
163 |
+
|
164 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:14
|
165 |
+
msgid "History"
|
166 |
+
msgstr "履歴"
|
167 |
+
|
168 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:15
|
169 |
+
msgid "Last Contact"
|
170 |
+
msgstr "最終接触"
|
171 |
+
|
172 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:82
|
173 |
+
msgid "Send Mail"
|
174 |
+
msgstr "メールを送信"
|
175 |
+
|
176 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:106
|
177 |
+
msgid "View all tags"
|
178 |
+
msgstr "すべてのタグを表示する"
|
179 |
+
|
180 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:112
|
181 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:173
|
182 |
+
msgid "Filter"
|
183 |
+
msgstr "フィルター"
|
184 |
+
|
185 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:136
|
186 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:205
|
187 |
+
msgid "Edit"
|
188 |
+
msgstr "編集"
|
189 |
+
|
190 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:140
|
191 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:209
|
192 |
+
#, php-format
|
193 |
+
msgid "Edit “%s”"
|
194 |
+
msgstr "“%s” を編集する"
|
195 |
+
|
196 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:152
|
197 |
+
msgid "No Tags"
|
198 |
+
msgstr "タグなし"
|
199 |
+
|
200 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:181
|
201 |
+
msgid "User"
|
202 |
+
msgstr "ユーザー"
|
203 |
+
|
204 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:194
|
205 |
+
#, php-format
|
206 |
+
msgid "Comment (%d)"
|
207 |
+
msgstr "コメント (%d)"
|
208 |
+
|
209 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:233
|
210 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:242
|
211 |
+
#: flamingo/includes/class-inbound-message.php:107
|
212 |
+
msgid "Y/m/d g:i:s A"
|
213 |
+
msgstr "Y年n月j日 g:i:s a"
|
214 |
+
|
215 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:240
|
216 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:249
|
217 |
+
#, php-format
|
218 |
+
msgid "%s ago"
|
219 |
+
msgstr "%s前"
|
220 |
+
|
221 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:242
|
222 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:251
|
223 |
+
msgid "Y/m/d"
|
224 |
+
msgstr "Y年n月j日"
|
225 |
+
|
226 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:13
|
227 |
+
msgid "Channel"
|
228 |
+
msgstr "経路"
|
229 |
+
|
230 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:131
|
231 |
+
msgid "Restore"
|
232 |
+
msgstr "復元"
|
233 |
+
|
234 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:134
|
235 |
+
#: flamingo/admin/includes/meta-boxes.php:95
|
236 |
+
msgid "Delete Permanently"
|
237 |
+
msgstr "完全に削除する"
|
238 |
+
|
239 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:136
|
240 |
+
#: flamingo/admin/includes/meta-boxes.php:97
|
241 |
+
msgid "Move to Trash"
|
242 |
+
msgstr "ゴミ箱へ移動"
|
243 |
+
|
244 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:167
|
245 |
+
msgid "View all channels"
|
246 |
+
msgstr "すべての経路を表示する"
|
247 |
+
|
248 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:178
|
249 |
+
msgid "Empty Trash"
|
250 |
+
msgstr "ゴミ箱を空にする"
|
251 |
+
|
252 |
+
#: flamingo/admin/includes/meta-boxes.php:10
|
253 |
+
msgid "Update Contact"
|
254 |
+
msgstr "連絡先を更新"
|
255 |
+
|
256 |
+
#: flamingo/admin/includes/meta-boxes.php:12
|
257 |
+
msgid "Add Contact"
|
258 |
+
msgstr "連絡先を追加"
|
259 |
+
|
260 |
+
#: flamingo/admin/includes/meta-boxes.php:56
|
261 |
+
msgid "Separate tags with commas"
|
262 |
+
msgstr "タグが複数ある場合はコンマで区切ってください"
|
263 |
+
|
264 |
+
#: flamingo/admin/includes/meta-boxes.php:59
|
265 |
+
msgid "Choose from the most used tags"
|
266 |
+
msgstr "最もよく使われているタグから選択"
|
267 |
+
|
268 |
+
#: flamingo/admin/includes/meta-boxes.php:108
|
269 |
+
msgid "Update Message"
|
270 |
+
msgstr "メッセージを更新"
|
271 |
+
|
272 |
+
#: flamingo/admin/includes/meta-boxes.php:110
|
273 |
+
msgid "Add Message"
|
274 |
+
msgstr "メッセージを追加"
|
275 |
+
|
276 |
+
#: flamingo/admin/includes/meta-boxes.php:128
|
277 |
+
msgid "Full name"
|
278 |
+
msgstr "フルネーム"
|
279 |
+
|
280 |
+
#: flamingo/admin/includes/meta-boxes.php:133
|
281 |
+
msgid "First name"
|
282 |
+
msgstr "名"
|
283 |
+
|
284 |
+
#: flamingo/admin/includes/meta-boxes.php:138
|
285 |
+
msgid "Last name"
|
286 |
+
msgstr "姓"
|
287 |
+
|
288 |
+
#: flamingo/includes/class-contact.php:20
|
289 |
+
msgid "Flamingo Contacts"
|
290 |
+
msgstr "Flamingo の連絡先"
|
291 |
+
|
292 |
+
#: flamingo/includes/class-contact.php:21
|
293 |
+
msgid "Flamingo Contact"
|
294 |
+
msgstr "Flamingo の連絡先"
|
295 |
+
|
296 |
+
#: flamingo/includes/class-contact.php:25
|
297 |
+
msgid "Flamingo Contact Tags"
|
298 |
+
msgstr "Flamingo の連絡先タグ"
|
299 |
+
|
300 |
+
#: flamingo/includes/class-contact.php:26
|
301 |
+
msgid "Flamingo Contact Tag"
|
302 |
+
msgstr "Flamingo の連絡先タグ"
|
303 |
+
|
304 |
+
#: flamingo/includes/class-inbound-message.php:23
|
305 |
+
msgid "Flamingo Inbound Message"
|
306 |
+
msgstr "Flamingo の受信メッセージ"
|
307 |
+
|
308 |
+
#: flamingo/includes/class-inbound-message.php:27
|
309 |
+
msgid "Flamingo Inbound Message Channels"
|
310 |
+
msgstr "Flamingo 受信メッセージ経路"
|
311 |
+
|
312 |
+
#: flamingo/includes/class-inbound-message.php:28
|
313 |
+
msgid "Flamingo Inbound Message Channel"
|
314 |
+
msgstr "Flamingo 受信メッセージ経路"
|
315 |
+
|
316 |
+
#: flamingo/includes/class-inbound-message.php:125
|
317 |
+
msgid "(No Title)"
|
318 |
+
msgstr "(タイトルなし)"
|
319 |
+
|
320 |
+
#~ msgid "% Comments"
|
321 |
+
#~ msgstr "%件のコメント"
|
322 |
+
|
323 |
+
#~ msgid "Contact Form 7"
|
324 |
+
#~ msgstr "Contact Form 7"
|
325 |
+
|
326 |
+
#~ msgid "1 Message via Contact Form 7"
|
327 |
+
#~ msgstr "1件の Contact Form 7 経由のメッセージ"
|
328 |
+
|
329 |
+
#~ msgid "% Messages via Contact Form 7"
|
330 |
+
#~ msgstr "%件の Contact Form 7 経由のメッセージ"
|
331 |
+
|
332 |
+
#~ msgid "% Users"
|
333 |
+
#~ msgstr "%人のユーザー"
|
languages/flamingo.pot
ADDED
@@ -0,0 +1,317 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Flamingo\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-06-06 00:47+0900\n"
|
6 |
+
"PO-Revision-Date: 2012-06-06 00:48+0900\n"
|
7 |
+
"Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c\n"
|
14 |
+
"X-Poedit-Basepath: ../..\n"
|
15 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
+
"X-Poedit-SearchPath-0: flamingo\n"
|
17 |
+
|
18 |
+
#: flamingo/flamingo.php:5
|
19 |
+
msgid "Flamingo manages your contact list on WordPress."
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: flamingo/admin/admin.php:9
|
23 |
+
#: flamingo/admin/admin.php:14
|
24 |
+
#: flamingo/admin/admin.php:154
|
25 |
+
msgid "Flamingo Address Book"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: flamingo/admin/admin.php:9
|
29 |
+
msgid "Flamingo"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: flamingo/admin/admin.php:14
|
33 |
+
msgid "Address Book"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: flamingo/admin/admin.php:20
|
37 |
+
#: flamingo/includes/class-inbound-message.php:22
|
38 |
+
msgid "Flamingo Inbound Messages"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: flamingo/admin/admin.php:20
|
42 |
+
#: flamingo/admin/admin.php:323
|
43 |
+
msgid "Inbound Messages"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: flamingo/admin/admin.php:64
|
47 |
+
msgid "Contact updated."
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: flamingo/admin/admin.php:66
|
51 |
+
msgid "Messages trashed."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: flamingo/admin/admin.php:68
|
55 |
+
msgid "Messages restored."
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: flamingo/admin/admin.php:70
|
59 |
+
msgid "Messages deleted."
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: flamingo/admin/admin.php:97
|
63 |
+
msgid "You are not allowed to edit this item."
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: flamingo/admin/admin.php:130
|
67 |
+
msgid "Contacts"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: flamingo/admin/admin.php:158
|
71 |
+
#: flamingo/admin/admin.php:327
|
72 |
+
#, php-format
|
73 |
+
msgid "Search results for “%s”"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: flamingo/admin/admin.php:167
|
77 |
+
msgid "Search Contacts"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: flamingo/admin/admin.php:208
|
81 |
+
msgid "You are not allowed to move this item to the Trash."
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: flamingo/admin/admin.php:211
|
85 |
+
msgid "Error in moving to Trash."
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: flamingo/admin/admin.php:238
|
89 |
+
msgid "You are not allowed to restore this item from the Trash."
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: flamingo/admin/admin.php:241
|
93 |
+
msgid "Error in restoring from Trash."
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: flamingo/admin/admin.php:275
|
97 |
+
msgid "You are not allowed to delete this item."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: flamingo/admin/admin.php:278
|
101 |
+
msgid "Error in deleting."
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: flamingo/admin/admin.php:299
|
105 |
+
msgid "Messages"
|
106 |
+
msgstr ""
|
107 |
+
|
108 |
+
#: flamingo/admin/admin.php:338
|
109 |
+
msgid "Search Messages"
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
#: flamingo/admin/edit-contact-form.php:13
|
113 |
+
#: flamingo/admin/edit-inbound-form.php:13
|
114 |
+
msgid "Save"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: flamingo/admin/edit-contact-form.php:16
|
118 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:13
|
119 |
+
msgid "Tags"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: flamingo/admin/edit-contact-form.php:19
|
123 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:12
|
124 |
+
msgid "Name"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: flamingo/admin/edit-contact-form.php:26
|
128 |
+
msgid "Edit Contact"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: flamingo/admin/edit-contact-form.php:52
|
132 |
+
msgid "Enter email here"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: flamingo/admin/edit-inbound-form.php:16
|
136 |
+
msgid "Fields"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: flamingo/admin/edit-inbound-form.php:23
|
140 |
+
msgid "Inbound Message"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: flamingo/admin/edit-inbound-form.php:48
|
144 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:14
|
145 |
+
msgid "Date"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: flamingo/admin/edit-inbound-form.php:53
|
149 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:11
|
150 |
+
msgid "Subject"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: flamingo/admin/edit-inbound-form.php:58
|
154 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:12
|
155 |
+
msgid "From"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:11
|
159 |
+
msgid "Email"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:14
|
163 |
+
msgid "History"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:15
|
167 |
+
msgid "Last Contact"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:82
|
171 |
+
msgid "Send Mail"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:106
|
175 |
+
msgid "View all tags"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:112
|
179 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:173
|
180 |
+
msgid "Filter"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:136
|
184 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:205
|
185 |
+
msgid "Edit"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:140
|
189 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:209
|
190 |
+
#, php-format
|
191 |
+
msgid "Edit “%s”"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:152
|
195 |
+
msgid "No Tags"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:181
|
199 |
+
msgid "User"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:194
|
203 |
+
#, php-format
|
204 |
+
msgid "Comment (%d)"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:233
|
208 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:242
|
209 |
+
#: flamingo/includes/class-inbound-message.php:107
|
210 |
+
msgid "Y/m/d g:i:s A"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:240
|
214 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:249
|
215 |
+
#, php-format
|
216 |
+
msgid "%s ago"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: flamingo/admin/includes/class-contacts-list-table.php:242
|
220 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:251
|
221 |
+
msgid "Y/m/d"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:13
|
225 |
+
msgid "Channel"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:131
|
229 |
+
msgid "Restore"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:134
|
233 |
+
#: flamingo/admin/includes/meta-boxes.php:95
|
234 |
+
msgid "Delete Permanently"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:136
|
238 |
+
#: flamingo/admin/includes/meta-boxes.php:97
|
239 |
+
msgid "Move to Trash"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:167
|
243 |
+
msgid "View all channels"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: flamingo/admin/includes/class-inbound-messages-list-table.php:178
|
247 |
+
msgid "Empty Trash"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: flamingo/admin/includes/meta-boxes.php:10
|
251 |
+
msgid "Update Contact"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: flamingo/admin/includes/meta-boxes.php:12
|
255 |
+
msgid "Add Contact"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: flamingo/admin/includes/meta-boxes.php:56
|
259 |
+
msgid "Separate tags with commas"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: flamingo/admin/includes/meta-boxes.php:59
|
263 |
+
msgid "Choose from the most used tags"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: flamingo/admin/includes/meta-boxes.php:108
|
267 |
+
msgid "Update Message"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: flamingo/admin/includes/meta-boxes.php:110
|
271 |
+
msgid "Add Message"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: flamingo/admin/includes/meta-boxes.php:128
|
275 |
+
msgid "Full name"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: flamingo/admin/includes/meta-boxes.php:133
|
279 |
+
msgid "First name"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: flamingo/admin/includes/meta-boxes.php:138
|
283 |
+
msgid "Last name"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: flamingo/includes/class-contact.php:20
|
287 |
+
msgid "Flamingo Contacts"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: flamingo/includes/class-contact.php:21
|
291 |
+
msgid "Flamingo Contact"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: flamingo/includes/class-contact.php:25
|
295 |
+
msgid "Flamingo Contact Tags"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: flamingo/includes/class-contact.php:26
|
299 |
+
msgid "Flamingo Contact Tag"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: flamingo/includes/class-inbound-message.php:23
|
303 |
+
msgid "Flamingo Inbound Message"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: flamingo/includes/class-inbound-message.php:27
|
307 |
+
msgid "Flamingo Inbound Message Channels"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: flamingo/includes/class-inbound-message.php:28
|
311 |
+
msgid "Flamingo Inbound Message Channel"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: flamingo/includes/class-inbound-message.php:125
|
315 |
+
msgid "(No Title)"
|
316 |
+
msgstr ""
|
317 |
+
|
license.txt
ADDED
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
3 |
+
|
4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
Preamble
|
10 |
+
|
11 |
+
The licenses for most software are designed to take away your
|
12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
13 |
+
License is intended to guarantee your freedom to share and change free
|
14 |
+
software--to make sure the software is free for all its users. This
|
15 |
+
General Public License applies to most of the Free Software
|
16 |
+
Foundation's software and to any other program whose authors commit to
|
17 |
+
using it. (Some other Free Software Foundation software is covered by
|
18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
+
your programs, too.
|
20 |
+
|
21 |
+
When we speak of free software, we are referring to freedom, not
|
22 |
+
price. Our General Public Licenses are designed to make sure that you
|
23 |
+
have the freedom to distribute copies of free software (and charge for
|
24 |
+
this service if you wish), that you receive source code or can get it
|
25 |
+
if you want it, that you can change the software or use pieces of it
|
26 |
+
in new free programs; and that you know you can do these things.
|
27 |
+
|
28 |
+
To protect your rights, we need to make restrictions that forbid
|
29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
+
These restrictions translate to certain responsibilities for you if you
|
31 |
+
distribute copies of the software, or if you modify it.
|
32 |
+
|
33 |
+
For example, if you distribute copies of such a program, whether
|
34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
35 |
+
you have. You must make sure that they, too, receive or can get the
|
36 |
+
source code. And you must show them these terms so they know their
|
37 |
+
rights.
|
38 |
+
|
39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
40 |
+
(2) offer you this license which gives you legal permission to copy,
|
41 |
+
distribute and/or modify the software.
|
42 |
+
|
43 |
+
Also, for each author's protection and ours, we want to make certain
|
44 |
+
that everyone understands that there is no warranty for this free
|
45 |
+
software. If the software is modified by someone else and passed on, we
|
46 |
+
want its recipients to know that what they have is not the original, so
|
47 |
+
that any problems introduced by others will not reflect on the original
|
48 |
+
authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software
|
51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
52 |
+
program will individually obtain patent licenses, in effect making the
|
53 |
+
program proprietary. To prevent this, we have made it clear that any
|
54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
+
|
62 |
+
0. This License applies to any program or other work which contains
|
63 |
+
a notice placed by the copyright holder saying it may be distributed
|
64 |
+
under the terms of this General Public License. The "Program", below,
|
65 |
+
refers to any such program or work, and a "work based on the Program"
|
66 |
+
means either the Program or any derivative work under copyright law:
|
67 |
+
that is to say, a work containing the Program or a portion of it,
|
68 |
+
either verbatim or with modifications and/or translated into another
|
69 |
+
language. (Hereinafter, translation is included without limitation in
|
70 |
+
the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not
|
73 |
+
covered by this License; they are outside its scope. The act of
|
74 |
+
running the Program is not restricted, and the output from the Program
|
75 |
+
is covered only if its contents constitute a work based on the
|
76 |
+
Program (independent of having been made by running the Program).
|
77 |
+
Whether that is true depends on what the Program does.
|
78 |
+
|
79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
80 |
+
source code as you receive it, in any medium, provided that you
|
81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
+
notices that refer to this License and to the absence of any warranty;
|
84 |
+
and give any other recipients of the Program a copy of this License
|
85 |
+
along with the Program.
|
86 |
+
|
87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
89 |
+
|
90 |
+
2. You may modify your copy or copies of the Program or any portion
|
91 |
+
of it, thus forming a work based on the Program, and copy and
|
92 |
+
distribute such modifications or work under the terms of Section 1
|
93 |
+
above, provided that you also meet all of these conditions:
|
94 |
+
|
95 |
+
a) You must cause the modified files to carry prominent notices
|
96 |
+
stating that you changed the files and the date of any change.
|
97 |
+
|
98 |
+
b) You must cause any work that you distribute or publish, that in
|
99 |
+
whole or in part contains or is derived from the Program or any
|
100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
101 |
+
parties under the terms of this License.
|
102 |
+
|
103 |
+
c) If the modified program normally reads commands interactively
|
104 |
+
when run, you must cause it, when started running for such
|
105 |
+
interactive use in the most ordinary way, to print or display an
|
106 |
+
announcement including an appropriate copyright notice and a
|
107 |
+
notice that there is no warranty (or else, saying that you provide
|
108 |
+
a warranty) and that users may redistribute the program under
|
109 |
+
these conditions, and telling the user how to view a copy of this
|
110 |
+
License. (Exception: if the Program itself is interactive but
|
111 |
+
does not normally print such an announcement, your work based on
|
112 |
+
the Program is not required to print an announcement.)
|
113 |
+
|
114 |
+
These requirements apply to the modified work as a whole. If
|
115 |
+
identifiable sections of that work are not derived from the Program,
|
116 |
+
and can be reasonably considered independent and separate works in
|
117 |
+
themselves, then this License, and its terms, do not apply to those
|
118 |
+
sections when you distribute them as separate works. But when you
|
119 |
+
distribute the same sections as part of a whole which is a work based
|
120 |
+
on the Program, the distribution of the whole must be on the terms of
|
121 |
+
this License, whose permissions for other licensees extend to the
|
122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
+
|
124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
125 |
+
your rights to work written entirely by you; rather, the intent is to
|
126 |
+
exercise the right to control the distribution of derivative or
|
127 |
+
collective works based on the Program.
|
128 |
+
|
129 |
+
In addition, mere aggregation of another work not based on the Program
|
130 |
+
with the Program (or with a work based on the Program) on a volume of
|
131 |
+
a storage or distribution medium does not bring the other work under
|
132 |
+
the scope of this License.
|
133 |
+
|
134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
135 |
+
under Section 2) in object code or executable form under the terms of
|
136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
+
|
138 |
+
a) Accompany it with the complete corresponding machine-readable
|
139 |
+
source code, which must be distributed under the terms of Sections
|
140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
+
|
142 |
+
b) Accompany it with a written offer, valid for at least three
|
143 |
+
years, to give any third party, for a charge no more than your
|
144 |
+
cost of physically performing source distribution, a complete
|
145 |
+
machine-readable copy of the corresponding source code, to be
|
146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
+
customarily used for software interchange; or,
|
148 |
+
|
149 |
+
c) Accompany it with the information you received as to the offer
|
150 |
+
to distribute corresponding source code. (This alternative is
|
151 |
+
allowed only for noncommercial distribution and only if you
|
152 |
+
received the program in object code or executable form with such
|
153 |
+
an offer, in accord with Subsection b above.)
|
154 |
+
|
155 |
+
The source code for a work means the preferred form of the work for
|
156 |
+
making modifications to it. For an executable work, complete source
|
157 |
+
code means all the source code for all modules it contains, plus any
|
158 |
+
associated interface definition files, plus the scripts used to
|
159 |
+
control compilation and installation of the executable. However, as a
|
160 |
+
special exception, the source code distributed need not include
|
161 |
+
anything that is normally distributed (in either source or binary
|
162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
163 |
+
operating system on which the executable runs, unless that component
|
164 |
+
itself accompanies the executable.
|
165 |
+
|
166 |
+
If distribution of executable or object code is made by offering
|
167 |
+
access to copy from a designated place, then offering equivalent
|
168 |
+
access to copy the source code from the same place counts as
|
169 |
+
distribution of the source code, even though third parties are not
|
170 |
+
compelled to copy the source along with the object code.
|
171 |
+
|
172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
+
except as expressly provided under this License. Any attempt
|
174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
+
void, and will automatically terminate your rights under this License.
|
176 |
+
However, parties who have received copies, or rights, from you under
|
177 |
+
this License will not have their licenses terminated so long as such
|
178 |
+
parties remain in full compliance.
|
179 |
+
|
180 |
+
5. You are not required to accept this License, since you have not
|
181 |
+
signed it. However, nothing else grants you permission to modify or
|
182 |
+
distribute the Program or its derivative works. These actions are
|
183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
184 |
+
modifying or distributing the Program (or any work based on the
|
185 |
+
Program), you indicate your acceptance of this License to do so, and
|
186 |
+
all its terms and conditions for copying, distributing or modifying
|
187 |
+
the Program or works based on it.
|
188 |
+
|
189 |
+
6. Each time you redistribute the Program (or any work based on the
|
190 |
+
Program), the recipient automatically receives a license from the
|
191 |
+
original licensor to copy, distribute or modify the Program subject to
|
192 |
+
these terms and conditions. You may not impose any further
|
193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
+
You are not responsible for enforcing compliance by third parties to
|
195 |
+
this License.
|
196 |
+
|
197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
+
infringement or for any other reason (not limited to patent issues),
|
199 |
+
conditions are imposed on you (whether by court order, agreement or
|
200 |
+
otherwise) that contradict the conditions of this License, they do not
|
201 |
+
excuse you from the conditions of this License. If you cannot
|
202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
203 |
+
License and any other pertinent obligations, then as a consequence you
|
204 |
+
may not distribute the Program at all. For example, if a patent
|
205 |
+
license would not permit royalty-free redistribution of the Program by
|
206 |
+
all those who receive copies directly or indirectly through you, then
|
207 |
+
the only way you could satisfy both it and this License would be to
|
208 |
+
refrain entirely from distribution of the Program.
|
209 |
+
|
210 |
+
If any portion of this section is held invalid or unenforceable under
|
211 |
+
any particular circumstance, the balance of the section is intended to
|
212 |
+
apply and the section as a whole is intended to apply in other
|
213 |
+
circumstances.
|
214 |
+
|
215 |
+
It is not the purpose of this section to induce you to infringe any
|
216 |
+
patents or other property right claims or to contest validity of any
|
217 |
+
such claims; this section has the sole purpose of protecting the
|
218 |
+
integrity of the free software distribution system, which is
|
219 |
+
implemented by public license practices. Many people have made
|
220 |
+
generous contributions to the wide range of software distributed
|
221 |
+
through that system in reliance on consistent application of that
|
222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
223 |
+
to distribute software through any other system and a licensee cannot
|
224 |
+
impose that choice.
|
225 |
+
|
226 |
+
This section is intended to make thoroughly clear what is believed to
|
227 |
+
be a consequence of the rest of this License.
|
228 |
+
|
229 |
+
8. If the distribution and/or use of the Program is restricted in
|
230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
231 |
+
original copyright holder who places the Program under this License
|
232 |
+
may add an explicit geographical distribution limitation excluding
|
233 |
+
those countries, so that distribution is permitted only in or among
|
234 |
+
countries not thus excluded. In such case, this License incorporates
|
235 |
+
the limitation as if written in the body of this License.
|
236 |
+
|
237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
+
of the General Public License from time to time. Such new versions will
|
239 |
+
be similar in spirit to the present version, but may differ in detail to
|
240 |
+
address new problems or concerns.
|
241 |
+
|
242 |
+
Each version is given a distinguishing version number. If the Program
|
243 |
+
specifies a version number of this License which applies to it and "any
|
244 |
+
later version", you have the option of following the terms and conditions
|
245 |
+
either of that version or of any later version published by the Free
|
246 |
+
Software Foundation. If the Program does not specify a version number of
|
247 |
+
this License, you may choose any version ever published by the Free Software
|
248 |
+
Foundation.
|
249 |
+
|
250 |
+
10. If you wish to incorporate parts of the Program into other free
|
251 |
+
programs whose distribution conditions are different, write to the author
|
252 |
+
to ask for permission. For software which is copyrighted by the Free
|
253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
255 |
+
of preserving the free status of all derivatives of our free software and
|
256 |
+
of promoting the sharing and reuse of software generally.
|
257 |
+
|
258 |
+
NO WARRANTY
|
259 |
+
|
260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
+
REPAIR OR CORRECTION.
|
269 |
+
|
270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
<one line to give the program's name and a brief idea of what it does.>
|
294 |
+
Copyright (C) <year> <name of author>
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
<signature of Ty Coon>, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
+
Public License instead of this License.
|
readme.txt
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Flamingo ===
|
2 |
+
Contributors: takayukister, megumithemes
|
3 |
+
Tags: bird, contact, mail, crm
|
4 |
+
Requires at least: 3.3
|
5 |
+
Tested up to: 3.3.2
|
6 |
+
Stable tag: 1.0
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
Flamingo manages your contact list on WordPress.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Flamingo is a WordPress plugin created to be a total CRM package. With this version, you can manage your contact list and messages submitted via contact form plugins. It has not yet matured, but we are enhancing it rapidly.
|
15 |
+
|
16 |
+
= Translators =
|
17 |
+
|
18 |
+
* Japanese (ja) - [Takayuki Miyoshi](http://ideasilo.wordpress.com)
|
19 |
+
|
20 |
+
If you have created your own language pack, or have an update of an existing one, you can send [gettext PO and MO files](http://codex.wordpress.org/Translating_WordPress) to [me](http://ideasilo.wordpress.com/about/) so that I can bundle it into Flamingo. You can download the latest [POT file](http://plugins.svn.wordpress.org/flamingo/trunk/languages/flamingo.pot).
|
21 |
+
|
22 |
+
= Icon Design =
|
23 |
+
|
24 |
+
* [Takao Honda](http://www.takaohonda.jp/)
|
25 |
+
|
26 |
+
== Installation ==
|
27 |
+
|
28 |
+
1. Upload the entire `flamingo` folder to the `/wp-content/plugins/` directory.
|
29 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
30 |
+
|
31 |
+
== Frequently Asked Questions ==
|
32 |
+
|
33 |
+
== Screenshots ==
|
34 |
+
|
35 |
+
== Changelog ==
|
36 |
+
|
37 |
+
== Upgrade Notice ==
|