MP_BaseLeadSettings::calculate_information_callback( object $post )
Callback for calculate fields.
Contents
Parameters Parameters
- $post
-
(object) (Required) post data
Source Source
File: mortgage-platform/Inc/Base/MP_BaseLeadSettings.php
public function calculate_information_callback( $post ) {
$newarr = array_reverse( get_post_meta( $post->ID, MortgagePlatform::$prefix . 'lead_searches' ) );
echo '<table class="lead_table" cellpadding="0" cellspacing="0">';
foreach ( $newarr as $calckey => $calc ) {
foreach ( $calc as $key => $value ) {
if ( 'calculate_date' === $key ) {
echo '<tr class="lead_table_row lead_table_heading" data-searches="' . esc_attr( $calckey ) . '" border="1"><td class="lead_table_label">' . esc_html__( 'Calculate Date', 'mortgage_platform' ) . '</td><td class="lead_table_value">' . esc_attr( $value ) . '</td></tr>';
} else {
//echo '<tr class="lead_table_row" data-searches="' . esc_attr( $calckey ) . '" border="1"><td class="lead_table_label">' . esc_attr( $calculate[$key] ) . '</td><td class="lead_table_value">' . esc_attr( $value ) . '</td></tr>';
echo '<tr class="lead_table_row" data-searches="' . esc_attr( $calckey ) . '" border="1"><td class="lead_table_label">' . esc_attr( $key ) . '</td><td class="lead_table_value">' . esc_attr( $value ) . '</td></tr>';
}
}
}
echo '</table>';
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |