PluginProbe
WP Coder – Insert & Manage Code Snippets / 2.4.1
WP Coder – Insert & Manage Code Snippets v2.4.1
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
← All changes | public/shortcode.php +8 -16 2.5.62.4.1 View file →
@@ -13,28 +13,20 @@
13 13 if ( ! defined( 'ABSPATH' ) ) {
14 14 exit;
15 15 }
16 16
17 -extract( shortcode_atts( array( 'id' => "", 'title' => '', ), $atts ) );
18 -
19 -if ( ! empty( $atts['id'] ) ) {
20 - $id = absint( $atts['id'] );
21 -}
22 -
17 +extract( shortcode_atts( array( 'id' => "" ), $atts ) );
23 18 global $wpdb;
24 -$table = $wpdb->prefix . 'wow_' . $this->plugin_pref;
25 -if ( ! empty( $id ) ) {
26 - $sSQL = $wpdb->prepare( "select * from $table WHERE id = %d", $id );
27 -} elseif ( ! empty( $atts['title'] ) ) {
28 - $sSQL = $wpdb->prepare( "select * from $table WHERE title = %s", $atts['title'] );
29 -} else {
30 - return false;
31 -}
19 +$table = $wpdb->prefix . 'wow_' . $this->plugin_pref;
20 +$sSQL = $wpdb->prepare( "select * from $table WHERE id = %d", $id );
32 21 $result = $wpdb->get_results( $sSQL );
33 22 if ( count( $result ) > 0 ) {
34 23 foreach ( $result as $key => $val ) {
35 - $param = unserialize( $val->param );
36 - $content = do_shortcode( $param['content_html'] );
24 + $param = unserialize( $val->param );
25 + ob_start();
26 + include( 'partials/public.php' );
27 + $content = ob_get_contents();
28 + ob_end_clean();
37 29 $path_style = $this->basedir . 'style-' . $val->id . '.css';
38 30 $path_script = $this->basedir . 'script-' . $val->id . '.js';
39 31 $file_style = $this->plugin_dir . 'admin/partials/generator/style.php';
40 32 $file_script = $this->plugin_dir . 'admin/partials/generator/script.php';