PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
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
← All changes | admin/class-smart-post-show-admin.php +7 -16 2.3.62.2.10 View file →
@@ -44,11 +44,10 @@
44 44 $this->version = $version;
45 45
46 46 // Autoload system.
47 47 spl_autoload_register( array( $this, 'autoload' ) );
48 - SPS_Metaboxes::preview_metabox( 'sp_pcp_display' );
48 +
49 49 SPS_Metaboxes::layout_metabox( 'sp_pcp_layouts' );
50 -
51 50 SPS_Metaboxes::option_metabox( 'sp_pcp_view_options' );
52 51 SPS_Metaboxes::shortcode_metabox( 'sp_pcp_display_shortcode' );
53 52 SPS_Settings::settings( 'sp_post_carousel_settings' );
54 53 // Plugin action link Button.
@@ -53,9 +52,8 @@
53 52 SPS_Settings::settings( 'sp_post_carousel_settings' );
54 53 // Plugin action link Button.
55 54 add_filter( 'plugin_action_links', array( $this, 'add_plugin_action_links' ), 10, 2 );
56 55 }
57 -
58 56 /**
59 57 * Add plugin action menu
60 58 *
61 59 * @param array $links The action link.
@@ -72,9 +70,8 @@
72 70 return array_merge( $new_links, $links );
73 71 }
74 72 return $links;
75 73 }
76 -
77 74 /**
78 75 * Add plugin row meta link
79 76 *
80 77 * @param [array] $plugin_meta Add plugin row meta link.
@@ -118,10 +115,8 @@
118 115 $current_screen = get_current_screen();
119 116 $the_current_post_type = $current_screen->post_type;
120 117 if ( 'sp_post_carousel' === $the_current_post_type ) {
121 118 wp_enqueue_style( 'pcp-font-awesome', SP_PC_URL . 'public/assets/css/font-awesome.min.css', array(), SP_PC_VERSION, 'all' );
122 - wp_enqueue_style( 'pcp_swiper', SP_PC_URL . 'public/assets/css/swiper-bundle' . $this->suffix . '.css', array(), SP_PC_VERSION, 'all' );
123 - wp_enqueue_style( 'pcp-style', SP_PC_URL . 'public/assets/css/style' . $this->suffix . '.css', array(), SP_PC_VERSION, 'all' );
124 119 }
125 120 wp_enqueue_style( 'sp-' . SP_PC_PLUGIN_NAME, SP_PC_URL . 'admin/assets/css/post-carousel-admin' . $this->suffix . '.css', array(), SP_PC_VERSION, 'all' );
126 121 }
127 122
@@ -146,10 +141,8 @@
146 141 $current_screen = get_current_screen();
147 142 $the_current_post_type = $current_screen->post_type;
148 143 if ( 'sp_post_carousel' === $the_current_post_type ) {
149 144 wp_enqueue_script( SP_PC_PLUGIN_NAME, SP_PC_URL . 'admin/assets/js/post-carousel-admin' . $this->suffix . '.js', array( 'jquery' ), SP_PC_VERSION, true );
150 - wp_enqueue_script( 'pcp_swiper', SP_PC_URL . 'public/assets/js/swiper-bundle' . $this->suffix . '.js', array( 'jquery' ), SP_PC_VERSION, true );
151 - wp_enqueue_script( 'pcp_script', SP_PC_URL . 'public/assets/js/scripts' . $this->suffix . '.js', array( 'jquery' ), SP_PC_VERSION, true );
152 145 }
153 146
154 147 }
155 148
@@ -180,11 +173,10 @@
180 173 $pcp_layouts = get_post_meta( $post_id, 'sp_pcp_layouts', true );
181 174 $carousels_types = isset( $pcp_layouts['pcp_layout_preset'] ) ? $pcp_layouts['pcp_layout_preset'] : '';
182 175 switch ( $column ) {
183 176 case 'shortcode':
184 - ?>
185 - <input class="sp_pcp_input" style="width: 230px;padding: 4px 8px;cursor: pointer;" type="text" onClick="this.select();" readonly="readonly" value="[smart_post_show id=&quot;<?php echo esc_attr( $post_id ); ?>&quot;]"/> <div class="pcp-after-copy-text"><i class="fa fa-check-circle"></i> <?php esc_html_e( 'Shortcode Copied to Clipboard!', 'smart-post-show' ); ?></div>
186 - <?php
177 + $column_field = '<input class="sp_pcp_input" style="width: 230px;padding: 4px 8px;cursor: pointer;" type="text" onClick="this.select();" readonly="readonly" value="[smart_post_show id=&quot;' . $post_id . '&quot;]"/> <div class="pcp-after-copy-text"><i class="fa fa-check-circle"></i> Shortcode Copied to Clipboard! </div>';
178 + echo $column_field;
187 179 break;
188 180 case 'pcp_layout':
189 181 $layout = ucwords( str_replace( '_layout', ' ', $carousels_types ) );
190 182 esc_html_e( $layout, 'smart-post-show' );
@@ -205,14 +197,13 @@
205 197
206 198 /**
207 199 * Redirect after active
208 200 *
209 - * @param string $plugin The plugin help page.
201 + * @param $plugin
210 202 */
211 - public function redirect_help_page( $plugin ) {
203 + function redirect_help_page( $plugin ) {
212 204 if ( SMART_POST_SHOW_BASENAME === $plugin ) {
213 - wp_safe_redirect( admin_url( 'edit.php?post_type=sp_post_carousel&page=pcp_help' ) );
214 - exit();
205 + exit( wp_redirect( admin_url( 'edit.php?post_type=sp_post_carousel&page=pcp_help' ) ) );
215 206 }
216 207 }
217 208 /**
218 209 * If it is the plugins page.
@@ -220,9 +211,9 @@
220 211 * @since 2.2.0
221 212 * @access private
222 213 */
223 214 private function is_plugins_screen() {
224 - return in_array( get_current_screen()->id, array( 'plugins', 'plugins-network' ), true );
215 + return in_array( get_current_screen()->id, array( 'plugins', 'plugins-network' ) );
225 216 }
226 217 }
227 218
228 219 /**