PluginProbe
Float menu – awesome floating side menu / 3.3.1
Float menu – awesome floating side menu v3.3.1
7.2.5 trunk 2.1 2.2 3.0.1 3.1 3.2.2 3.3.1 3.5 3.5.1 3.5.2 3.5.3. 3.5.4 4.0 4.1 4.1.1 4.2 4.3 4.3.1 4.3.2 5.0 5.0.1 5.0.2 5.0.3 5.1 All 57 releases
float-menu / public / shortcode.php

shortcode.php in Float menu – awesome floating side menu 3.3.1, at public/shortcode.php

60 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Shortcode
4 *
5 * @package Wow_Plugin
6 * @copyright Copyright (c) 2018, Dmytro Lobov
7 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8 * @since 1.0
9 */
10
11 namespace float_menu_free;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 extract( shortcode_atts( array( 'id' => "" ), $atts ) );
18 global $wpdb;
19 $table = $wpdb->prefix . 'wow_' . $this->plugin['prefix'];
20 $sSQL = $wpdb->prepare( "select * from $table WHERE id = %d", $id );
21 $result = $wpdb->get_results( $sSQL );
22
23 if ( count( $result ) > 0 ) {
24
25 foreach ( $result as $key => $val ) {
26
27 $param = unserialize( $val->param );
28
29 ob_start();
30 include( 'partials/public.php' );
31 ob_end_clean();
32
33
34 $slug = $this->plugin['slug'];
35 $version = $this->plugin['version'];
36
37 if ( empty( $param['disable_fontawesome'] ) ) {
38 $url_icons = $this->plugin['url'] . 'assets/vendors/fontawesome/css/fontawesome-all.min.css';
39 wp_enqueue_style( $slug . '-fontawesome', $url_icons, null, '5.11.2' );
40 }
41
42 $url_style = $this->plugin['url'] . 'assets/css/style.min.css';
43 wp_enqueue_style( $slug, $url_style, null, $version );
44
45 $inline_style = self::style( $param, $id );
46 wp_add_inline_style( $slug, $inline_style );
47
48 $url_velocity = $this->plugin['url'] . 'assets/js/velocity.min.js';
49 wp_enqueue_script( 'velocity', $url_velocity, array( 'jquery' ), $version );
50
51 $url_script = $this->plugin['url'] . 'assets/js/floatMenu.min.js';
52 wp_enqueue_script( $slug, $url_script, array( 'jquery' ), $version );
53
54 $inline_script = self::script( $param, $id );
55 wp_add_inline_script( $slug, $inline_script );
56
57 }
58 }
59
60 return;