Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…for-wordpress into foxrain-master

Conflicts:
	pm4wp.php
  • Loading branch information
rilwis committed Nov 6, 2012
1 parent 6ca4714 commit 55bfa0e
Show file tree
Hide file tree
Showing 5 changed files with 593 additions and 157 deletions.
1 change: 1 addition & 0 deletions css/style.css
Expand Up @@ -3,4 +3,5 @@
}
.form-table select {
height: auto;
width: 99%;
}
28 changes: 16 additions & 12 deletions inc/send-page.php
Expand Up @@ -162,35 +162,39 @@ function rwpm_send()
{
$id = $_GET['id'];
$msg = $wpdb->get_row( 'SELECT * FROM ' . $wpdb->prefix . 'pm WHERE `id` = "' . $id . '" LIMIT 1' );

$content = '<p>&nbsp;</p>';
$content .= '<p>---</p>';
$content .= '<p><em>' . __( 'In: ', 'pm4wp' ) . $msg->date . "\t" . $msg->sender . __( ' Wrote:', 'pm4wp' ) . '</em></p>';
$content .= wpautop( $msg->content );
$content = stripslashes( $content );
}
// Get all users of blog
$users = $wpdb->get_results( "SELECT display_name FROM $wpdb->users ORDER BY display_name ASC" );

// if auto suggest feature is turned on
if ( $option['type'] == 'autosuggest' )
{ // if auto suggest feature is turned on
{
?>
<input id="recipient" type="text" name="recipient" class="large-text" />
<?php

}
else
{ // classic way: select recipient from dropdown list
else // classic way: select recipient from dropdown list
{
// Get all users of blog
$args = array(
'order' => 'ASC',
'orderby' => 'display_name' );
$values = get_users( $args );
$values = apply_filters( 'rwpm_recipients', $values );
?>
<select name="recipient[]" multiple="multiple" size="5">
<select name="recipient[]" multiple="multiple" size="5">
<?php
foreach ( $users as $user )
foreach ( $values as $value )
{
$selected = ( $user->display_name == $recipient ) ? ' selected="selected"' : '';
echo "<option value='$user->display_name'$selected>$user->display_name</option>";
$selected = ( $value->display_name == $recipient ) ? ' selected="selected"' : '';
echo "<option value='$value->display_name'$selected>$value->display_name</option>";
}
?>
</select>
</select>
<?php
}
?>
Expand Down
Binary file added lang/pm4wp-pl_PL.mo
Binary file not shown.

0 comments on commit 55bfa0e

Please sign in to comment.