PluginProbe ʕ •ᴥ•ʔ
Code Manager / 1.0.31
Code Manager v1.0.31
1.0.48 1.0.47 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.3 1.0.30 1.0.31 1.0.32 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.38 1.0.39 1.0.4 1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
code-manager / freemius / templates / admin-notice.php
code-manager / freemius / templates Last commit date
account 2 years ago connect 2 years ago debug 2 years ago forms 2 years ago js 2 years ago partials 2 years ago plugin-info 2 years ago account.php 2 years ago add-ons.php 2 years ago add-trial-to-pricing.php 2 years ago admin-notice.php 2 years ago ajax-loader.php 2 years ago api-connectivity-message-js.php 2 years ago auto-installation.php 2 years ago checkout.php 2 years ago clone-resolution-js.php 2 years ago connect.php 2 years ago contact.php 2 years ago debug.php 2 years ago email.php 2 years ago gdpr-optin-js.php 2 years ago index.php 2 years ago plugin-icon.php 2 years ago powered-by.php 2 years ago pricing.php 2 years ago secure-https-header.php 2 years ago sticky-admin-notice-js.php 2 years ago tabs-capture-js.php 2 years ago tabs.php 2 years ago
admin-notice.php
113 lines
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.0.3
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 /**
14 * @var array $VARS
15 */
16
17 $dismiss_text = fs_text_x_inline( 'Dismiss', 'as close a window', 'dismiss' );
18
19 $slug = '';
20 $type = '';
21
22 if ( ! empty( $VARS['manager_id'] ) ) {
23 /**
24 * @var array $VARS
25 */
26 $slug = $VARS['manager_id'];
27
28 $type = WP_FS__MODULE_TYPE_PLUGIN;
29
30 if ( false !== strpos( $slug, ':' ) ) {
31 $parts = explode( ':', $slug );
32
33 $slug = $parts[0];
34
35 $parts_count = count( $parts );
36
37 if ( 1 < $parts_count && WP_FS__MODULE_TYPE_THEME == $parts[1] ) {
38 $type = $parts[1];
39 }
40 }
41 }
42
43 $attributes = array();
44 if ( ! empty( $VARS['id'] ) ) {
45 $attributes['data-id'] = $VARS['id'];
46 }
47 if ( ! empty( $VARS['manager_id'] ) ) {
48 $attributes['data-manager-id'] = $VARS['manager_id'];
49 }
50 if ( ! empty( $slug ) ) {
51 $attributes['data-slug'] = $slug;
52 }
53 if ( ! empty( $type ) ) {
54 $attributes['data-type'] = $type;
55 }
56
57 $classes = array( 'fs-notice' );
58 switch ( $VARS['type'] ) {
59 case 'error':
60 $classes[] = 'error';
61 $classes[] = 'form-invalid';
62 break;
63 case 'promotion':
64 $classes[] = 'updated';
65 $classes[] = 'promotion';
66 break;
67 case 'warn':
68 $classes[] = 'notice';
69 $classes[] = 'notice-warning';
70 break;
71 case 'update':
72 case 'success':
73 default:
74 $classes[] = 'updated';
75 $classes[] = 'success';
76 break;
77 }
78 if ( ! empty( $VARS['sticky'] ) ) {
79 $classes[] = 'fs-sticky';
80 }
81 if ( ! empty( $VARS['plugin'] ) ) {
82 $classes[] = 'fs-has-title';
83 }
84 if ( ! empty( $slug ) ) {
85 $classes[] = "fs-slug-{$slug}";
86 }
87 if ( ! empty( $type ) ) {
88 $classes[] = "fs-type-{$type}";
89 }
90 ?>
91 <div class="<?php echo fs_html_get_classname( $classes ); ?>" <?php echo fs_html_get_attributes( $attributes ); ?>>
92 <?php if ( ! empty( $VARS['plugin'] ) ) : ?>
93 <label class="fs-plugin-title">
94 <?php echo esc_html( $VARS['plugin'] ); ?>
95 </label>
96 <?php endif ?>
97
98 <?php if ( ! empty( $VARS['sticky'] ) && ( ! isset( $VARS['dismissible'] ) || false !== $VARS['dismissible'] ) ) : ?>
99 <div class="fs-close">
100 <i class="dashicons dashicons-no" title="<?php echo esc_attr( $dismiss_text ) ?>"></i>
101 <span><?php echo esc_html( $dismiss_text ); ?></span>
102 </div>
103 <?php endif ?>
104
105 <div class="fs-notice-body">
106 <?php if ( ! empty( $VARS['title'] ) ) : ?>
107 <strong><?php echo fs_html_get_sanitized_html( $VARS['title'] ); ?></strong>
108 <?php endif ?>
109
110 <?php echo fs_html_get_sanitized_html( $VARS['message'] ); ?>
111 </div>
112 </div>
113