# booktics/1.0.0/core/shortcode/service-shortcode.php

Booktics – Appointment Booking Calendar for Service Businesses, version 1.0.0. 40 lines.

- Page: https://pluginprobe.com/plugins/booktics/1.0.0/code/core/shortcode/service-shortcode.php
- Raw: https://pluginprobe.com/plugins/booktics/1.0.0/raw/core/shortcode/service-shortcode.php
- Modified: 2025-07-03T16:48:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/booktics/1.0.0/code/core/shortcode/service-shortcode.php#L10-L20`.

```php
<?php

namespace Booktics\Shortcode;

/**
 * Service View shortcode class
 */
class Service_Shortcode {
    /**
     * Constructor for service view shortcode
     *
     * @return  void
     */
    public function __construct() {
        add_shortcode(
            'booktics-service-view', array(
				$this,
				'render_service_view',
            )
        );
    }

    /**
     * Render service view
     *
     * @param array $attributes
     *
     * @return  string
     */
    public function render_service_view( $attributes ) {
        $id = isset( $attributes['id'] ) ? $attributes['id'] : '';

        return "<div class='booktics-shortcode-wrapper'>
                        <div class='booktics-single-service-wrapper'
                             data-id='" . esc_attr( $id ) . "'>
                        </div>
                    </div>";
    }
}

```
