| Server IP : 5.129.245.98 / Your IP : 216.73.217.19 Web Server : Apache/2.4.66 (Debian) System : Linux 1b8c17c336b9 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/rehub-framework/gutenberg/blocks/ |
Upload File : |
<?php
namespace Rehub\Gutenberg\Blocks;
defined( 'ABSPATH' ) OR exit;
class Itinerary extends Basic {
protected $name = 'itinerary';
protected $attributes = array(
'items' => array(
'type' => 'object',
'default' => array(
array(
'icon' => 'rhicon rhi-circle-solid',
'color' => '#409cd1',
'content' => 'Box Content',
),
array(
'icon' => 'rhicon rhi-circle-solid',
'color' => '#409cd1',
'content' => 'Box Content',
),
array(
'icon' => 'rhicon rhi-circle-solid',
'color' => '#409cd1',
'content' => 'Box Content',
),
),
),
);
protected function render( $settings = array(), $content = '' ) {
$html = '';
$items = $settings['items'];
wp_enqueue_style('rhitinerary');
if ( empty( $items ) ) {
echo '';
return null;
}
$html .= '<div class="wpsm-itinerary">';
foreach ( $items as $item ) {
$icon = $item['icon'];
$color = $item['color'];
$content = $item['content'];
$html .= '<div class="wpsm-itinerary-item">';
$html .= ' <div class="wpsm-itinerary-icon">';
$html .= ' <span style="background-color: ' . esc_attr( $color ) . '">';
$html .= ' <i class="' . esc_attr( $icon ) . '"></i>';
$html .= ' </span>';
$html .= ' </div>';
$html .= ' <div class="wpsm-itinerary-content">' . do_shortcode( $content ) . '</div>';
$html .= '</div>';
}
$html .= '</div>';
echo $html;
}
}