| @@ -4,19 +4,14 @@ | ||
| 4 | 4 | |
| 5 | 5 | defined( 'ABSPATH' ) || exit; |
| 6 | 6 | |
| 7 | 7 | use FloatingButton\Dashboard\DBManager; |
| 8 | +use FloatingButton\Dashboard\FolderManager; | |
| 8 | 9 | use FloatingButton\Optimization\Obfuscator; |
| 9 | 10 | use FloatingButton\WOW_Plugin; |
| 10 | 11 | |
| 11 | 12 | class EnqueueScript { |
| 12 | 13 | |
| 13 | - /** | |
| 14 | - * @var mixed | |
| 15 | - */ | |
| 16 | - private $id; | |
| 17 | - private $param; | |
| 18 | - | |
| 19 | 14 | public function __construct( $result ) { |
| 20 | 15 | $this->id = $result->id; |
| 21 | 16 | $this->param = maybe_unserialize( $result->param ); |
| 22 | 17 | } |
| @@ -85,10 +80,10 @@ | ||
| 85 | 80 | if ( is_singular() ) { |
| 86 | 81 | $arg['pageId'] = get_the_ID(); |
| 87 | 82 | } |
| 88 | 83 | |
| 89 | - return 'var FloatingButton_' . absint( $this->id ) . ' = ' . wp_json_encode( $arg ); | |
| 84 | + return 'var FloatingButton_' . absint( $this->id ) . ' = ' . json_encode( $arg, JSON_THROW_ON_ERROR ); | |
| 90 | 85 | |
| 91 | 86 | } |
| 92 | 87 | |
| 93 | 88 | |
| 94 | 89 | } |