PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.2
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.2
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / admin / views / sp-framework / fields / shortcode / shortcode.php

shortcode.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.2, at admin/views/sp-framework/fields/shortcode/shortcode.php

82 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The framework shortcode fields file.
4 *
5 * @package Smart_Post_Show
6 * @subpackage Smart_Post_Show/admin
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 die;
11 } // Cannot access directly.
12
13 if ( ! class_exists( 'SP_PC_Field_shortcode' ) ) {
14 /**
15 * SP_PC_Field_shortcode
16 */
17 class SP_PC_Field_shortcode extends SP_PC_Fields {
18 /**
19 * Field constructor.
20 *
21 * @param array $field The field type.
22 * @param string $value The values of the field.
23 * @param string $unique The unique ID for the field.
24 * @param string $where To where show the output CSS.
25 * @param string $parent The parent args.
26 */
27 public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
28 parent::__construct( $field, $value, $unique, $where, $parent );
29 }
30 /**
31 * Render method.
32 *
33 * @return void
34 */
35 public function render() {
36 // Get the Post ID.
37 $post_id = get_the_ID();
38 if ( ! empty( $this->field['shortcode'] ) && 'manage_view' === $this->field['shortcode'] ) {
39 echo ( ! empty( $post_id ) ) ? '<div class="pcp-scode-wrap-side"><p>To display your show or view, add the following shortcode into your post, custom post types, page, widget or block editor. If adding the show to your theme files, additionally include the surrounding PHP code, <a href="https://docs.shapedplugin.com/docs/post-carousel/create-your-first-post-show/add-new-post-show/#faq" target="_blank">see how</a>.</p><span class="pcp-shortcode-selectable">[smart_post_show id="' . esc_attr( $post_id ) . '"]</span></div><div class="pcp-after-copy-text"><i class="fa fa-check-circle"></i> Shortcode Copied to Clipboard! </div>' : '';
40 } elseif ( ! empty( $this->field['shortcode'] ) && 'pro_notice' === $this->field['shortcode'] ) {
41 if ( ! empty( $post_id ) ) {
42 echo '<div class="sp_wpcp_shortcode-area pcp-notice-wrapper">';
43 echo '<div class="pcp-notice-heading">' . sprintf(
44 /* translators: 1: start span tag, 2: close tag. */
45 esc_html__( 'Additional Features in %1$sPRO%2$s', 'post-carousel' ),
46 '<span>',
47 '</span>'
48 ) . '</div>';
49
50 echo '<p class="pcp-notice-desc">' . sprintf(
51 /* translators: 1: start bold tag, 2: close tag. */
52 esc_html__( 'Here are some additional features available in Pro!', 'post-carousel' ),
53 '<b>',
54 '</b>'
55 ) . '</p>';
56
57 echo '<ul>';
58 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( '30+ Beautiful Layouts', 'post-carousel' ) . '</li>';
59 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( 'Advanced Query Builder', 'post-carousel' ) . '</li>';
60 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( 'Custom Post Type & Media', 'post-carousel' ) . '</li>';
61 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( 'Ajax Live Filtering & Search', 'post-carousel' ) . '</li>';
62 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( 'Control Detail Page Fields', 'post-carousel' ) . '</li>';
63 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( 'Ajax Load More & Infinite Scroll', 'post-carousel' ) . '</li>';
64 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( 'Redesign Blog & Archive Pages', 'post-carousel' ) . '</li>';
65 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( 'Show Ads Between Posts', 'post-carousel' ) . '</li>';
66 echo '<li><i class="sps-icon-check-icon"></i> ' . esc_html__( '200+ Customizations & More', 'post-carousel' ) . '</li>';
67 echo '</ul>';
68
69 echo '<div class="pcp-notice-button">';
70 echo '<a class="pcp-open-live-demo" href="https://wpsmartpost.com/pricing/?ref=1" target="_blank">';
71 echo esc_html__( 'Upgrade to Pro Now', 'post-carousel' ) . ' <i class="sps-icon-shuttle_2285485-1"></i>';
72 echo '</a>';
73 echo '</div>';
74 echo '</div>';
75 }
76 } else {
77 echo ( ! empty( $post_id ) ) ? '<div class="pcp-scode-wrap-side"><p>Smart Post Show has seamless integration with Gutenberg, Classic Editor, <strong>Elementor,</strong> Divi, Bricks, Beaver, Oxygen, WPBakery Builder, etc.</p></div>' : '';
78 }
79 }
80 }
81 }
82