Skip to content

Commit fd73f90

Browse files
author
GITUSER
committed
Merge branch 'release/1.9.9.6.4'
2 parents 80e32a9 + 894c4b0 commit fd73f90

File tree

6 files changed

+71
-12
lines changed

6 files changed

+71
-12
lines changed

core/automation/assets/js/admin.rule-setup.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,4 +667,21 @@ jQuery(document).ready(function() {
667667
window.location.reload(true);
668668
});
669669

670+
/* Reload logs iframe */
671+
jQuery('body').on( 'change' , '#display-log-type' , function() {
672+
var selected = jQuery(this).find(':selected').val();
673+
jQuery.extend({
674+
getQueryParameters : function(str) {
675+
return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0];
676+
}
677+
});
678+
var params = jQuery.getQueryParameters(window.location.search);
679+
params["log_type"] = selected;
680+
var new_url = window.location.pathname + '?'+jQuery.param(params)
681+
682+
jQuery(this).find(':selected').html('please wait. refreshing.');
683+
jQuery(this).prop('disabled' , 'disabled');
684+
window.location.replace(new_url);
685+
});
686+
670687
});

core/automation/classes/class.logs.php

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,30 @@ public function add( $title = '', $message = '', $rule_id, $job_id , $type) {
3838
*/
3939
function insert_log( $log_data = array() ) {
4040

41-
/* Get Log From Rule ID */
41+
/* Get ALL Log From Rule ID */
4242
$logs_array = Inbound_Logging_Automation::get_logs( $log_data['rule_id'] );
43-
43+
44+
/* Get Type Logs from Rule ID */
45+
$log_type_array = Inbound_Logging_Automation::get_logs( $log_data['rule_id'] , $log_data['log_type'] );
46+
4447
/* Push log to front of array */
4548
$logs_array[] = $log_data;
46-
47-
/* Trim logs array to X entries */
49+
$log_type_array[] = $log_data;
50+
51+
/* Trim main logs array to X entries */
4852
if ( count($logs_array) > self::$log_limit ) {
4953
$trim = count($logs_array) - self::$log_limit;
5054
$logs_array = array_slice($logs_array, $trim);
5155
}
52-
56+
57+
if ( count($log_type_array) > self::$log_limit ) {
58+
$trim = count($log_type_array) - self::$log_limit;
59+
$log_type_array = array_slice($log_type_array, $trim);
60+
}
61+
5362
/* Update logs meta */
5463
update_post_meta( $log_data['rule_id'] , '_automation_logs' , json_encode($logs_array) );
64+
update_post_meta( $log_data['rule_id'] , '_automation_logs_' . $log_data['log_type'] , json_encode($log_type_array) );
5565

5666
}
5767

@@ -61,10 +71,19 @@ function insert_log( $log_data = array() ) {
6171
*
6272
* @returns ARRAY of logs related to post_id
6373
*/
64-
public function get_logs( $rule_id = 0 ) {
74+
public function get_logs( $rule_id = 0 , $log_type='all' ) {
6575

6676
/* Get Log From Rule ID */
67-
$logs_encoded = get_post_meta( $rule_id , '_automation_logs' , true );
77+
switch($log_type) {
78+
case 'all':
79+
$log_type_suffix = "";
80+
break;
81+
default:
82+
$log_type_suffix = "_".$log_type;
83+
break;
84+
}
85+
86+
$logs_encoded = get_post_meta( $rule_id , '_automation_logs'.$log_type_suffix , true );
6887

6988
if ( !$logs_encoded ) {
7089
$logs_array = array();

core/automation/classes/class.metaboxes.automation.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,17 @@ public static function print_logs() {
309309
global $inbound_automation_logs, $post;
310310

311311
$post = get_post($_GET['rule_id']);
312-
$logs = array_reverse($inbound_automation_logs->get_logs($post->ID), true);
312+
$log_type = (isset($_GET['log_type'])) ? $_GET['log_type'] : 'all';
313313

314+
$logs = array_reverse($inbound_automation_logs->get_logs($post->ID , $log_type ), true);
315+
316+
$log_types = array(
317+
__('all','inbound-pro'),
318+
'action_event',
319+
'processing_event',
320+
'trigger_event',
321+
'delay_event'
322+
)
314323
?>
315324
<style>
316325
html.wp-toolbar {
@@ -396,6 +405,16 @@ public static function print_logs() {
396405
</style>
397406
<div class='nav-container logs-container' id='logs-container'>
398407
<div class='clear-logs-container'>
408+
<span class='select' data-rule-id='<?php echo $post->ID; ?>'>
409+
<select id="display-log-type">
410+
<?php
411+
foreach ( $log_types as $key) {
412+
echo '<option value="'.$key.'" '.($key == $log_type ? 'selected="selected"' : '' ) .'">'.$key.'</option>';
413+
}
414+
?>
415+
</select>
416+
417+
</span>
399418
<span class='button button-secondary' id='clear-logs' data-rule-id='<?php echo $post->ID; ?>'>
400419
<?php _e( 'Clear logs' , 'inbound-pro' ); ?>
401420
</span>

core/cta/classes/class.load-extensions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function add_default_page_settings($wp_cta_data) {
277277
/* this is a special key that targets CTA metaboxes */
278278
$parent_key = 'wp-cta-controller';
279279

280-
$wp_cta_data[$parent_key]['settings'] = array(array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Placement on Page', 'cta'), 'description' => __('Where would you like to insert the CTA on this page?', 'cta'), 'id' => 'cta_content_placement', 'type' => 'dropdown', 'default' => 'off', 'options' => array('below' => __('Below Content', 'cta'), 'middle' => __('Middle of Content', 'cta'), 'above' => __('Above Content', 'cta'), 'widget_1' => __('Use Dynamic Sidebar Widget', 'cta'), 'popup' => __('Popup', 'cta')), 'context' => 'normal', 'class' => 'cta-per-page-option'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Sidebar Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('This option will place the selected CTA templates into the dynamic sidebar widget on this page. Make sure you have added the dynamic Call to Action widget to the sidebar of this page for this option to work.</p><p>To add the dynamic sidebar widget to this page, go into appearance > widgets and add the widget to the sidebar of your choice', 'cta') . "</p></div>", 'id' => 'sidebar_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'widget_1'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Below Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('Your Call to Action will be inserted into the bottom of the page/post.', 'cta') . "</p></div>", 'id' => 'below_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'below'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Above Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('Your Call to Action will be inserted into the top of the page/post.', 'cta') . "</p></div>", 'id' => 'above_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'above'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Middle Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('Your Call to Action will be inserted into the middle of the page/post\'s content.', 'cta') . "</p></div>", 'id' => 'above_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'middle'),);
280+
$wp_cta_data[$parent_key]['settings'] = array(array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Placement on Page', 'cta'), 'description' => __('Where would you like to insert the CTA on this page?', 'cta'), 'id' => 'cta_content_placement', 'type' => 'dropdown', 'default' => 'off', 'options' => array('below' => __('Below Content', 'cta'), 'middle' => __('Middle of Content', 'cta'), 'above' => __('Above Content', 'cta'), 'widget_1' => __('Widget: Call to Action Placement Holder', 'cta'), 'popup' => __('Popup', 'cta')), 'context' => 'normal', 'class' => 'cta-per-page-option'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Sidebar Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('This option will place the selected CTA templates into the dynamic sidebar widget on this page. Make sure you have added the dynamic Call to Action widget to the sidebar of this page for this option to work.</p><p>To add the dynamic sidebar widget to this page, go into appearance > widgets and add the widget to the sidebar of your choice', 'cta') . "</p></div>", 'id' => 'sidebar_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'widget_1'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Below Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('Your Call to Action will be inserted into the bottom of the page/post.', 'cta') . "</p></div>", 'id' => 'below_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'below'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Above Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('Your Call to Action will be inserted into the top of the page/post.', 'cta') . "</p></div>", 'id' => 'above_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'above'), array('data_type' => 'setting', 'region' => 'cta-placement-controls', 'label' => __('Middle Message', 'cta'), 'description' => "<div style='margin-top:10px; margin-left:10px;'><p>" . __('Your Call to Action will be inserted into the middle of the page/post\'s content.', 'cta') . "</p></div>", 'id' => 'above_message', 'type' => 'html-block', 'default' => '', 'context' => 'normal', 'class' => '', 'reveal_on' => 'middle'),);
281281

282282

283283
//IMPORT ALL EXTERNAL DATA

core/landing-pages/classes/class.acf-integration.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ public static function load_value( $value, $post_id, $field ) {
233233

234234

235235
if ( isset( $variations[ $vid ][ 'acf' ] ) ) {
236+
236237
$new_value = self::search_field_array( $variations[ $vid ][ 'acf' ] , $field );
237238

238239
/* sometimes value is an array count when new_value believes it should be an array in this case get new count */
@@ -248,7 +249,6 @@ public static function load_value( $value, $post_id, $field ) {
248249
/* acf lite isn't processing return values correctly - ignore repeater subfields */
249250
if ( !is_admin() && defined('ACF_FREE') ) {
250251
$value = self::acf_free_value_formatting( $value , $field );
251-
252252
}
253253

254254
if ( !is_admin() && is_string($value) && !defined('INBOUND_DEBUG_GF_AJAX') ) {
@@ -331,6 +331,10 @@ public static function search_field_array( $array , $field ) {
331331

332332
$needle = $field['key'];
333333

334+
if ($field['type'] == 'flexible_content') {
335+
return false;
336+
}
337+
334338
foreach ($array as $key => $value ){
335339

336340

inbound-pro.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin URI: http://www.inboundnow.com/
55
Description: Professional Inbound Marketing Suite for WordPress
66
Author: InboundWP LLC
7-
Version: 1.9.9.6.3
7+
Version: 1.9.9.6.4
88
Author URI: http://www.inboundnow.com/
99
Text Domain: inbound-pro
1010
*/
@@ -95,7 +95,7 @@ public function __construct() {
9595
*/
9696
private static function define_constants() {
9797

98-
define('INBOUND_PRO_CURRENT_VERSION', '1.9.9.6.3' );
98+
define('INBOUND_PRO_CURRENT_VERSION', '1.9.9.6.4' );
9999
define('INBOUND_PRO_STABLE_VERSION', '1.9.9.6.2' );
100100
define('INBOUND_PRO_TRANSLATIONS_VERSION', '1.30.22' );
101101
define('INBOUND_PRO_URLPATH', plugin_dir_url( __FILE__ ));

0 commit comments

Comments
 (0)