PluginProbe ʕ •ᴥ•ʔ
SiteOrigin CSS / 1.3.2
SiteOrigin CSS v1.3.2
1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.10 1.5.11 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0
so-css / tpl / page.php
so-css / tpl Last commit date
inspector-templates.php 11 years ago js-templates.php 5 years ago page.php 5 years ago
page.php
139 lines
1 <?php
2 /**
3 * @var $page_title string The title of the page. Includes the post title if a post was selected.
4 * @var $custom_css string The custom CSS string to be edited.
5 * @var $current_revision int If the CSS to be edited is a revision, this will contain the timestamp of the revision.
6 * @var $custom_css_revisions array Saved revisions for the current theme.
7 * @var $editor_description string Description to provide context for the CSS being edited.
8 * @var $socss_post_id int ID of the post for which we're editing CSS.
9 * @var $save_button_label string Label of the save button depending on whether a post or revision has been selected.
10 * @var $form_save_url string URL to use when saving the CSS.
11 */
12
13 $snippets = SiteOrigin_CSS::single()->get_snippets();
14 $user = wp_get_current_user();
15 if ( ! empty( $current_revision ) ) {
16 $revision_date = date( 'j F Y @ H:i:s', $current_revision + get_option( 'gmt_offset' ) * 60 * 60 );
17 }
18 ?>
19
20 <div class="wrap" id="siteorigin-custom-css">
21 <h2>
22 <img src="<?php echo plugin_dir_url(__FILE__) . '../css/images/icon.png' ?>" class="icon" />
23 <?php echo esc_html( $page_title ) ?>
24 </h2>
25
26
27 <?php if( isset($_POST['siteorigin_custom_css']) ) : ?>
28 <div class="notice notice-success"><p><?php _e('Site design updated.', 'so-css') ?></p></div>
29 <?php endif; ?>
30
31 <?php if ( ! empty( $current_revision ) ) : ?>
32 <div class="notice notice-warning">
33 <p><?php printf( __( 'Editing revision dated %s. Click %sRevert to this revision%s to keep using it.', 'so-css'), $revision_date, '<em>', '</em>' ) ?></p>
34 </div>
35 <?php endif; ?>
36
37 <div id="poststuff">
38 <div id="so-custom-css-info">
39 <p class="so-custom-css-submit">
40 <input type="submit" name="siteorigin_custom_css_save" class="button-primary" value="<?php esc_attr_e( $save_button_label ); ?>" />
41 </p>
42
43 <?php if( $this->display_teaser() ) : ?>
44 <div class="postbox">
45 <h3 class="hndle"><span><?php _e('Get The Full Experience', 'so-css') ?></span></h3>
46 <div class="inside">
47 <?php printf( __( '%sSiteOrigin Premium%s adds a <strong>Google Web Font</strong> selector to SiteOrigin CSS so you can easily change any font.', 'so-css' ) , '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/web-font-selector" target="_blank">', '</a>' ); ?>
48 </div>
49 </div>
50 <?php endif; ?>
51
52 <?php if( !get_user_meta( $user->ID, 'socss_hide_gs' ) ) : ?>
53 <div class="postbox" id="so-custom-css-getting-started">
54 <h3 class="hndle">
55 <span><?php _e('Getting Started Video', 'so-css') ?></span>
56 <a href="<?php echo wp_nonce_url( admin_url('admin-ajax.php?action=socss_hide_getting_started'), 'hide' ) ?>" class="hide"><?php _e('Dismiss', 'so-css') ?></a>
57 </h3>
58 <div class="inside">
59 <a href="https://siteorigin.com/css/getting-started/" target="_blank"><img src="<?php echo plugin_dir_url(__FILE__).'../css/images/video.jpg' ?>" /></a>
60 </div>
61 </div>
62 <?php endif; ?>
63
64 <div class="postbox" id="so-custom-css-revisions">
65 <h3 class="hndle"><span><?php _e('CSS Revisions', 'so-css') ?></span></h3>
66 <div class="inside">
67 <ol class="custom-revisions-list" data-confirm="<?php esc_attr_e('Are you sure you want to load this revision?', 'so-css') ?>">
68 <?php
69 $this->custom_css_revisions_list( $theme, $socss_post_id, $current_revision );
70 ?>
71 </ol>
72 </div>
73 </div>
74
75 </div>
76
77 <form action="<?php echo esc_url( $form_save_url ) ?>" method="POST" id="so-custom-css-form">
78
79 <div class="custom-css-toolbar">
80 <div class="toolbar-function-buttons">
81 <div class="toolbar-functions-dropdown">
82 <span class="dashicons dashicons-menu"></span>
83 </div>
84
85 <ul class="toolbar-buttons">
86 </ul>
87 </div>
88
89 <div class="toolbar-action-buttons">
90
91 <a href="#visual" class="editor-visual socss-button">
92 <span class="fa fa-eye"></span>
93 </a>
94
95 <a href="#expand" class="editor-expand socss-button">
96 <span class="fa fa-expand"></span>
97 <span class="fa fa-compress"></span>
98 </a>
99 </div>
100 </div>
101
102 <div class="custom-css-container">
103 <textarea name="siteorigin_custom_css" id="custom-css-textarea" class="css-editor" rows="<?php echo max( 10, substr_count( $custom_css, "\n" ) + 1 ) ?>"><?php echo esc_textarea( $custom_css ) ?></textarea>
104 <?php wp_nonce_field( 'custom_css', '_sononce' ) ?>
105 </div>
106 <p class="description"><?php esc_html_e( $editor_description ) ?></p>
107
108 <div class="custom-css-preview">
109
110 </div>
111
112 <div class="decoration"></div>
113
114 </form>
115
116 <div id="so-custom-css-properties">
117
118 <div class="toolbar">
119 <select>
120 </select>
121 <div class="close socss-button">
122 <span class="fa fa-check"></span>
123 </div>
124 </div>
125
126 <ul class="section-tabs">
127 </ul>
128
129 <div class="sections">
130 </div>
131
132 </div>
133
134 </div>
135
136 <div class="clear"></div>
137
138 </div>
139