Skip to content

Commit

Permalink
Merge branch 'release/1.6.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
asaquzzaman committed Mar 22, 2018
2 parents de3717a + 96bf4d5 commit 52c865d
Show file tree
Hide file tree
Showing 36 changed files with 14,751 additions and 17,559 deletions.
9 changes: 8 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
= 1.6.11 - February 26, 2018 =
= 1.6.12 - March 22, 2018 =

* [fixed] Showing HTML markup in task descriptions when we enter plain text.
* [fixed] To-do list, Discussion, milestone, page translation not working.
* [fixed] Projects page translation not working.
* [update] Improved plugin strings.

= 1.6.11 - February 26, 2018 =

* [fix] Notify users while commenting in a task.
* [fix] Trix-editor intregration with the WP ERP.
Expand Down
21 changes: 11 additions & 10 deletions class/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function settings_page() {

function is_valid_promotion() {
$today = strtotime( date( 'Y-m-d', strtotime( current_time( 'mysql' ) ) ) );
$future = strtotime( '2017-11-28' );
$future = strtotime( '2018-03-26' );

if ( $future >= $today ) {
return true;
Expand All @@ -216,29 +216,30 @@ public function promotional_offer() {
}

// check if it has already been dismissed
$offer_key = 'cpm_package_offer';
$offer_key = 'cpm_package_birthday_offer';
$hide_notice = get_option( $offer_key . '_tracking_notice', 'no' );

if ( 'hide' == $hide_notice ) {
return;
}
$offer = __( '<h2>Flash Sale! 40% Off! Biggest Sale For WP Project Manager!</h2>', "cpm" );
$offer .= __( '<p>We are running our biggest flash sale! A whopping 40% off for first 100 orders!</p>', 'cpm' );
$offer = __( '<h2>It’s Our Birthday <span>&#x1F382;</span> But You Get The Present <span>&#x1F381;</span></h2>', "cpm" );
$offer .= __( '<p>Avail Exclusive <strong>25%</strong> Discount with coupon code: <strong>we25</strong></p>', 'cpm' );

$offer_msg = sprintf( '%s', $offer );

?>
<div class="notice is-dismissible" id="cpm-promotional-offer-notice">

<img src="<?php echo CPM_URL . '/assets/images/pm-icon.png'; ?>" alt="">
<img class="cpm-logo" src="<?php echo CPM_URL . '/assets/images/pm-icon.png'; ?>" alt="">
<div class="cpm-offer-msg-wrap"><?php echo $offer_msg; ?></div>
<span class="dashicons dashicons-megaphone"></span>
<a href="https://wedevs.com/in/cm-via-wpm" class="button button-primary promo-btn" target="_blank"><?php _e( 'Get the Offer', 'cpm' ); ?></a>
<a href="https://wedevs.com/in/get-25-off" class="button button-primary promo-btn" target="_blank"><?php _e( 'Get the Offer', 'cpm' ); ?></a>
</div>

<style>
.cpm-offer-msg-wrap {
margin-top: 18px;
margin-left: 20px;
}
#cpm-promotional-offer-notice {
background-color: #7257a9;
Expand Down Expand Up @@ -276,14 +277,14 @@ public function promotional_offer() {
text-shadow: 0.1px 0.1px 0px rgba(250, 250, 250, 0.24);
}

#cpm-promotional-offer-notice img{
#cpm-promotional-offer-notice .cpm-logo {
position: absolute;
width: 80px;
top: 5px;
width: 88px;
left: 0px;
background: #50348ac7;
}

#cpm-promotional-offer-notice h2 span {
#cpm-promotional-offer-notice h2 .dashicons-megaphone {
position: relative;
top: -1px;
}
Expand Down
2 changes: 1 addition & 1 deletion class/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function __construct() {
*/
public function dismiss_promotional_offer() {
if ( ! empty( $_POST['cpm_promotion_dismissed'] ) ) {
$offer_key = 'cpm_package_offer';
$offer_key = 'cpm_package_birthday_offer';
update_option( $offer_key . '_tracking_notice', 'hide' );
}
}
Expand Down
2 changes: 1 addition & 1 deletion class/task.php
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ function set_task_meta( &$task ) {
$task->start_date = get_post_meta( $task->ID, '_start', true );
$task->task_privacy = get_post_meta( $task->ID, '_task_privacy', true );
$task->comments = $this->get_task_comments( $task->ID );
$task->post_content = cpm_get_content( $task->post_content );
//$task->post_content = cpm_get_content( $task->post_content );
$task->edit_mode = false;

$task = apply_filters( 'cpm_set_task_meta', $task );
Expand Down
4 changes: 2 additions & 2 deletions cpm.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: WordPress Project Management plugin. Manage your projects and tasks, get things done.
* Author: Tareq Hasan
* Author URI: https://tareq.co
* Version: 1.6.11
* Version: 1.6.12
* License: GPL2
*/
/**
Expand Down Expand Up @@ -49,7 +49,7 @@ class WeDevs_CPM {
*
* @var string
*/
public $version = '1.6.11';
public $version = '1.6.12';

/**
* Plugin Database version
Expand Down
22 changes: 11 additions & 11 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,37 +480,37 @@ function cpm_data_attr( $values ) {
function cpm_project_summary_info( $info, $project_id ) {
$summary = array();
$summary['message'] = array(
'label' => _n( 'Discussion', 'Discussions', $info->discussion, 'cpm' ),
'label' => _nx( 'Discussion', 'Discussions', $info->discussion, 'Discussion', 'cpm' ),
'count' => $info->discussion,
'url' => cpm_url_message_index( $project_id )
);

$summary['todo'] = array(
'label' => _n( 'Task List', 'Task Lists', $info->todolist, 'cpm' ),
'label' => _nx( 'Task List', 'Task Lists', $info->todolist, 'Task List', 'cpm' ),
'count' => $info->todolist,
'url' => cpm_url_tasklist_index( $project_id )
);

$summary['todos'] = array(
'label' => _n( 'Task', 'Tasks', $info->todos, 'cpm' ),
'label' => _nx( 'Task', 'Tasks', $info->todos, 'Task', 'cpm' ),
'count' => $info->todos,
'url' => cpm_url_tasklist_index( $project_id )
);

$summary['comments'] = array(
'label' => _n( 'Comment', 'Comments', $info->comments, 'cpm' ),
'label' => _nx( 'Comment', 'Comments', $info->comments, 'Comment', 'cpm' ),
'count' => $info->comments,
'url' => ''
);

$summary['files'] = array(
'label' => _n( 'File', 'Files', $info->files, 'cpm' ),
'label' => _nx( 'File', 'Files', $info->files, 'File', 'cpm' ),
'count' => $info->files,
'url' => cpm_url_file_index( $project_id )
);

$summary['milestone'] = array(
'label' => _n( 'Milestone', 'Milestones', $info->milestone, 'cpm' ),
'label' => _nx( 'Milestone', 'Milestones', $info->milestone, 'Milestone', 'cpm' ),
'count' => $info->milestone,
'url' => cpm_url_milestone_index( $project_id )
);
Expand Down Expand Up @@ -740,23 +740,23 @@ function get_ipaddress() {

function cpm_settings_label() {
$labels = array(
'Message' => array(
__('Message', 'cpm') => array(
'create_message' => __( 'Create', 'cpm' ),
'msg_view_private' => __( 'View Private', 'cpm' ),
),
'Todo List' => array(
__('Todo List', 'cpm') => array(
'create_todolist' => __( 'Create', 'cpm' ),
'tdolist_view_private' => __( 'View Private', 'cpm' ),
),
'Todo' => array(
__('Todo', 'cpm') => array(
'create_todo' => __( 'Create', 'cpm' ),
'todo_view_private' => __( 'View Private', 'cpm' ),
),
'Milestone' => array(
__('Milestone', 'cpm') => array(
'create_milestone' => __( 'Create', 'cpm' ),
'milestone_view_private' => __( 'View Private', 'cpm' ),
),
'Files' => array(
__('Files', 'cpm') => array(
'upload_file_doc' => __( 'Upload or create doc', 'cpm' ),
'file_view_private' => __( 'View Private files or docs', 'cpm' ),
),
Expand Down
2 changes: 1 addition & 1 deletion includes/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ function cpm_task_list_html( $list, $project_id, $singlePage = false ) {
<div class="cpm-col-3 cpm-todo-comment">
<a href="<?php echo cpm_url_single_tasklist( $project_id, $list->ID ); ?>">
<?php if ( ( int ) $list->comment_count > 0 ) { ?>
<?php printf( _n( '1 Comment', '%d Comments', $list->comment_count, 'cpm' ), $list->comment_count ); ?>
<?php printf( _n( '%d Comment', '%d Comments', $list->comment_count, 'cpm' ), $list->comment_count ); ?>
<?php
} else {
printf( 'No Comments', 'cpm' );
Expand Down
Binary file modified languages/cpm-cs_CZ.mo
Binary file not shown.
Loading

0 comments on commit 52c865d

Please sign in to comment.