Version Description
- Fix: New editor style file no longer needs Weaver Xtreme Plus
- New: Display message if need to save options to generate editor-style-wvrx.css file.
- New: Support for Weaver Xtreme Plus archive per page alt theme
- Tweak: Handle leading in tabs shortcode
- Tweak: improved styling for tab shortcode for improved visibility when loading
Download this release
Release Info
Developer | wpweaver |
Plugin | Weaver Xtreme Theme Support |
Version | 3.1.8 |
Comparing to | |
See all releases |
Code changes from version 3.1.7 to 3.1.8
- admin/admin-lib-ts-2.php +23 -0
- admin/admin-lib-ts.php +4 -1
- admin/admin-mainopts.php +16 -11
- includes/wvrx-ts-admin-page-posts.php +41 -13
- includes/wvrx-ts-runtime-lib.php +8 -8
- includes/wvrx-ts-shortcodes.php +19 -2
- readme.txt +8 -1
- weaverx-ts.php +2 -2
admin/admin-lib-ts-2.php
CHANGED
@@ -138,6 +138,29 @@ function weaverx_form_select_id( $value, $show_row = true ) {
|
|
138 |
<?php }
|
139 |
}
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
function weaverx_form_select_layout($value) {
|
142 |
$list = array(array('val' => 'default', 'desc' => __('Use Default', 'weaver-xtreme' /*adm*/) ),
|
143 |
array('val' => 'right', 'desc' => __('Sidebars on Right', 'weaver-xtreme' /*adm*/) ),
|
138 |
<?php }
|
139 |
}
|
140 |
|
141 |
+
function weaverx_form_select_alt_theme($value) {
|
142 |
+
$list = array(array('val' => 'default', 'desc' => __('Use Default', 'weaver-xtreme' /*adm*/) ),
|
143 |
+
array('val' => 'right', 'desc' => __('Sidebars on Right', 'weaver-xtreme' /*adm*/) ),
|
144 |
+
array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)', 'weaver-xtreme' /*adm*/) ),
|
145 |
+
array('val' => 'left', 'desc' => __('Sidebars on Left', 'weaver-xtreme' /*adm*/) ),
|
146 |
+
array('val' => 'left-top', 'desc' => __(' Sidebars on Left (stack top)', 'weaver-xtreme' /*adm*/) ),
|
147 |
+
array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left', 'weaver-xtreme' /*adm*/) ),
|
148 |
+
array('val' => 'split-top', 'desc' => __('Split (stack top)', 'weaver-xtreme' /*adm*/) ),
|
149 |
+
array('val' => 'one-column', 'desc' => __('No sidebars, content only', 'weaver-xtreme' /*adm*/) )
|
150 |
+
);
|
151 |
+
|
152 |
+
$themes = wvrx_ts_get_alt_themes();
|
153 |
+
$list = array();
|
154 |
+
$list[] = array( 'val' => '', 'desc' => '');
|
155 |
+
foreach ( $themes as $subtheme ) {
|
156 |
+
$list[] = array( 'val' => $subtheme, 'desc' => $subtheme);
|
157 |
+
}
|
158 |
+
|
159 |
+
|
160 |
+
$value['value'] = $list;
|
161 |
+
weaverx_form_select_id($value);
|
162 |
+
}
|
163 |
+
|
164 |
function weaverx_form_select_layout($value) {
|
165 |
$list = array(array('val' => 'default', 'desc' => __('Use Default', 'weaver-xtreme' /*adm*/) ),
|
166 |
array('val' => 'right', 'desc' => __('Sidebars on Right', 'weaver-xtreme' /*adm*/) ),
|
admin/admin-lib-ts.php
CHANGED
@@ -230,6 +230,9 @@ function weaverx_form_show_options($weaverx_olist, $begin_table = true, $end_tab
|
|
230 |
case 'select_id':
|
231 |
weaverx_form_select_id($value);
|
232 |
break;
|
|
|
|
|
|
|
233 |
case 'select_layout':
|
234 |
weaverx_form_select_layout($value);
|
235 |
break;
|
@@ -728,7 +731,7 @@ function weaverx_ex_set_current_to_serialized_values($contents) {
|
|
728 |
|
729 |
weaverx_setopt('last_option','Weaver Xtreme');
|
730 |
weaverx_save_opts('loading theme'); // OK, now we've saved the options, update them in the DB
|
731 |
-
|
732 |
return true;
|
733 |
}
|
734 |
|
230 |
case 'select_id':
|
231 |
weaverx_form_select_id($value);
|
232 |
break;
|
233 |
+
case 'select_alt_theme':
|
234 |
+
weaverx_form_select_alt_theme($value);
|
235 |
+
break;
|
236 |
case 'select_layout':
|
237 |
weaverx_form_select_layout($value);
|
238 |
break;
|
731 |
|
732 |
weaverx_setopt('last_option','Weaver Xtreme');
|
733 |
weaverx_save_opts('loading theme'); // OK, now we've saved the options, update them in the DB
|
734 |
+
|
735 |
return true;
|
736 |
}
|
737 |
|
admin/admin-mainopts.php
CHANGED
@@ -1515,45 +1515,47 @@ function weaverx_mainopts_layout() {
|
|
1515 |
array('val' => 'one-column', 'desc' => __('No sidebars, content only', 'weaver-xtreme' /*adm*/) )
|
1516 |
)),
|
1517 |
|
1518 |
-
array('name' =>
|
1519 |
'info' => __('Layout for normal Pages on your site.', 'weaver-xtreme' /*adm*/),
|
1520 |
'value' => ''
|
1521 |
),
|
1522 |
-
array('name' =>
|
1523 |
'info' => __('Layout for main blog page. Includes "Page with Posts" Page templates.', 'weaver-xtreme' /*adm*/),
|
1524 |
'value' => ''
|
1525 |
),
|
1526 |
-
array('name' =>
|
1527 |
'info' => __('Layout for Posts displayed as a single page.', 'weaver-xtreme' /*adm*/),
|
1528 |
'value' => ''
|
1529 |
),
|
1530 |
-
|
|
|
1531 |
'info' => __('Layout for attachment pages such as images. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1532 |
'value' => ''
|
1533 |
),
|
1534 |
-
|
|
|
1535 |
'info' => __('Layout for archive by date pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1536 |
'value' => ''
|
1537 |
),
|
1538 |
-
|
|
|
1539 |
'info' => __('Layout for category archive pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1540 |
'value' => ''
|
1541 |
),
|
1542 |
-
array('name' =>
|
1543 |
'info' => __('Layout for tag archive pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1544 |
'value' => ''
|
1545 |
),
|
1546 |
-
|
|
|
1547 |
'info' => __('Layout for author archive pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1548 |
'value' => ''
|
1549 |
),
|
1550 |
-
array('name' =>
|
1551 |
'info' => __('Layout for search results and 404 pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1552 |
'value' => ''
|
1553 |
),
|
1554 |
|
1555 |
-
|
1556 |
-
|
1557 |
array('name' => '<span class="i-left" style="font-size:120%;">↔</span><small>' . __('Left Sidebar Width', 'weaver-xtreme' /*adm*/) . '</small>', 'id' => 'left_sb_width_int', 'type' => 'val_percent',
|
1558 |
'info' => __('Width for Left Sidebar (Default: 25%)', 'weaver-xtreme' /*adm*/),
|
1559 |
'value' => ''
|
@@ -1576,6 +1578,9 @@ function weaverx_mainopts_layout() {
|
|
1576 |
array('name' => __('Flow color to bottom', 'weaver-xtreme' /*adm*/), 'id' => 'flow_color', 'type' => '+checkbox',
|
1577 |
'info' => __('If checked, Content and Sidebar bg colors will flow to bottom of the Container (that is, equal heights). You must provide background colors for the Content and Sidebars or the default bg color will be used. (★Plus)', 'weaver-xtreme' /*adm*/)),
|
1578 |
|
|
|
|
|
|
|
1579 |
|
1580 |
|
1581 |
);
|
1515 |
array('val' => 'one-column', 'desc' => __('No sidebars, content only', 'weaver-xtreme' /*adm*/) )
|
1516 |
)),
|
1517 |
|
1518 |
+
array('name' => __('Page', 'weaver-xtreme' /*adm*/), 'id' => 'layout_page', 'type' => 'select_layout',
|
1519 |
'info' => __('Layout for normal Pages on your site.', 'weaver-xtreme' /*adm*/),
|
1520 |
'value' => ''
|
1521 |
),
|
1522 |
+
array('name' => __('Blog', 'weaver-xtreme' /*adm*/), 'id' => 'layout_blog', 'type' => 'select_layout',
|
1523 |
'info' => __('Layout for main blog page. Includes "Page with Posts" Page templates.', 'weaver-xtreme' /*adm*/),
|
1524 |
'value' => ''
|
1525 |
),
|
1526 |
+
array('name' => __('Post Single Page', 'weaver-xtreme' /*adm*/), 'id' => 'layout_single', 'type' => 'select_layout',
|
1527 |
'info' => __('Layout for Posts displayed as a single page.', 'weaver-xtreme' /*adm*/),
|
1528 |
'value' => ''
|
1529 |
),
|
1530 |
+
|
1531 |
+
array('name' => __('Attachments', 'weaver-xtreme' /*adm*/), 'id' => 'layout_image', 'type' => '+select_layout',
|
1532 |
'info' => __('Layout for attachment pages such as images. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1533 |
'value' => ''
|
1534 |
),
|
1535 |
+
|
1536 |
+
array('name' => __('Date Archive', 'weaver-xtreme' /*adm*/), 'id' => 'layout_archive', 'type' => '+select_layout',
|
1537 |
'info' => __('Layout for archive by date pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1538 |
'value' => ''
|
1539 |
),
|
1540 |
+
|
1541 |
+
array('name' => __('Category Archive', 'weaver-xtreme' /*adm*/), 'id' => 'layout_category', 'type' => '+select_layout',
|
1542 |
'info' => __('Layout for category archive pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1543 |
'value' => ''
|
1544 |
),
|
1545 |
+
array('name' => __('Tags Archive', 'weaver-xtreme' /*adm*/), 'id' => 'layout_tag', 'type' => '+select_layout',
|
1546 |
'info' => __('Layout for tag archive pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1547 |
'value' => ''
|
1548 |
),
|
1549 |
+
|
1550 |
+
array('name' => __('Author Archive</small>', 'weaver-xtreme' /*adm*/), 'id' => 'layout_author', 'type' => '+select_layout',
|
1551 |
'info' => __('Layout for author archive pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1552 |
'value' => ''
|
1553 |
),
|
1554 |
+
array('name' => __('Search Results, 404</small>', 'weaver-xtreme' /*adm*/), 'id' => 'layout_search', 'type' => '+select_layout',
|
1555 |
'info' => __('Layout for search results and 404 pages. (★Plus)', 'weaver-xtreme' /*adm*/),
|
1556 |
'value' => ''
|
1557 |
),
|
1558 |
|
|
|
|
|
1559 |
array('name' => '<span class="i-left" style="font-size:120%;">↔</span><small>' . __('Left Sidebar Width', 'weaver-xtreme' /*adm*/) . '</small>', 'id' => 'left_sb_width_int', 'type' => 'val_percent',
|
1560 |
'info' => __('Width for Left Sidebar (Default: 25%)', 'weaver-xtreme' /*adm*/),
|
1561 |
'value' => ''
|
1578 |
array('name' => __('Flow color to bottom', 'weaver-xtreme' /*adm*/), 'id' => 'flow_color', 'type' => '+checkbox',
|
1579 |
'info' => __('If checked, Content and Sidebar bg colors will flow to bottom of the Container (that is, equal heights). You must provide background colors for the Content and Sidebars or the default bg color will be used. (★Plus)', 'weaver-xtreme' /*adm*/)),
|
1580 |
|
1581 |
+
array('name' => __('Alt Page Themes', 'weaver-xtreme' /*adm*/), 'id' => '-editor-codex', 'type' => 'header_area',
|
1582 |
+
'info' => __('★ Weaver Xtreme Plus (V 3.1.1 or later) allows you to set Alternative Themes for the blog, single, and other archive-like pages.', 'weaver-xtreme' /*adm*/)),
|
1583 |
+
|
1584 |
|
1585 |
|
1586 |
);
|
includes/wvrx-ts-admin-page-posts.php
CHANGED
@@ -260,6 +260,18 @@ the <em></em>— Select —</em> default value.','weaverx-theme-support'
|
|
260 |
<?php
|
261 |
return;
|
262 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
echo '<strong>' . __('Page Templates','weaverx-theme-support' /*adm*/) . '</strong>';
|
264 |
weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaverx-theme-support' /*adm*/));
|
265 |
echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaverx-theme-support' /*adm*/); the_ID() ; echo ')</span>';
|
@@ -526,7 +538,18 @@ function wvrx_ts_post_extras() {
|
|
526 |
?>
|
527 |
<div style="line-height:150%;">
|
528 |
<p>
|
529 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
530 |
echo '<strong>' . __('Per Post Options','weaverx-theme-support' /*adm*/) . '</strong>';
|
531 |
weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaverx-theme-support' /*adm*/));
|
532 |
echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaverx-theme-support' /*adm*/); the_ID() ; echo ')</span>';
|
@@ -856,18 +879,7 @@ Custom styles will not be displayed by the Page Editor.'
|
|
856 |
_e('Note: This page will still use the default site subtheme settings to display in the Page Editor (i.e., on this screen).','weaver-xtreme');
|
857 |
|
858 |
// build the theme file list
|
859 |
-
$themes =
|
860 |
-
$upload_dir = wp_upload_dir();
|
861 |
-
$theme_dir = trailingslashit( $upload_dir['basedir'] ) . 'weaverx-subthemes/';
|
862 |
-
if( $media_dir = opendir($theme_dir) ) {
|
863 |
-
while ($m_file = readdir($media_dir)) {
|
864 |
-
$len = strlen($m_file);
|
865 |
-
$ext = $len > 4 ? substr($m_file,$len-4,4) : '';
|
866 |
-
if($ext == '.wxt' || $ext == '.wxb' ) {
|
867 |
-
$themes[] = $m_file;
|
868 |
-
}
|
869 |
-
}
|
870 |
-
}
|
871 |
?>
|
872 |
<br />
|
873 |
|
@@ -983,6 +995,22 @@ Weaver Xtreme Plus supports code and HTML insertion for some areas. To add code,
|
|
983 |
}
|
984 |
} // end of action function
|
985 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
986 |
add_action( 'wvrx_ts_xp_perpoststyle', 'wvrx_ts_xp_perpoststyle_action' );
|
987 |
|
988 |
function wvrx_ts_xp_perpoststyle_action() {
|
260 |
<?php
|
261 |
return;
|
262 |
}
|
263 |
+
|
264 |
+
$updir = wp_upload_dir();
|
265 |
+
$dir = trailingslashit($updir['basedir']) . 'weaverx-subthemes/editor-style-wvrx.css';
|
266 |
+
|
267 |
+
if (!@file_exists( $dir )) { ?>
|
268 |
+
<div style="padding:2px; border:2px solid red; background:#FAA;">
|
269 |
+
<?php _e('<strong>Note!</strong>
|
270 |
+
Please open the <em>Appearance:Weaver Xtreme Admin:Main Options</em> page and <em>Save Settings</em> to enable full editor theme match styling.','weaverx-theme-support' /*adm*/); ?>
|
271 |
+
</div><br />
|
272 |
+
<?php
|
273 |
+
}
|
274 |
+
|
275 |
echo '<strong>' . __('Page Templates','weaverx-theme-support' /*adm*/) . '</strong>';
|
276 |
weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaverx-theme-support' /*adm*/));
|
277 |
echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaverx-theme-support' /*adm*/); the_ID() ; echo ')</span>';
|
538 |
?>
|
539 |
<div style="line-height:150%;">
|
540 |
<p>
|
541 |
+
<?php
|
542 |
+
$updir = wp_upload_dir();
|
543 |
+
$dir = trailingslashit($updir['basedir']) . 'weaverx-subthemes/editor-style-wvrx.css';
|
544 |
+
|
545 |
+
if (!@file_exists( $dir )) { ?>
|
546 |
+
<div style="padding:2px; border:2px solid red; background:#FAA;">
|
547 |
+
<?php _e('<strong>Note!</strong>
|
548 |
+
Please open the <em>Appearance:Weaver Xtreme Admin:Main Options</em> page and <em>Save Settings</em> to enable full editor theme match styling.','weaverx-theme-support' /*adm*/); ?>
|
549 |
+
</div><br />
|
550 |
+
<?php
|
551 |
+
}
|
552 |
+
|
553 |
echo '<strong>' . __('Per Post Options','weaverx-theme-support' /*adm*/) . '</strong>';
|
554 |
weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaverx-theme-support' /*adm*/));
|
555 |
echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaverx-theme-support' /*adm*/); the_ID() ; echo ')</span>';
|
879 |
_e('Note: This page will still use the default site subtheme settings to display in the Page Editor (i.e., on this screen).','weaver-xtreme');
|
880 |
|
881 |
// build the theme file list
|
882 |
+
$themes = wvrx_ts_get_alt_themes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
?>
|
884 |
<br />
|
885 |
|
995 |
}
|
996 |
} // end of action function
|
997 |
|
998 |
+
function wvrx_ts_get_alt_themes() {
|
999 |
+
$themes = array();
|
1000 |
+
$upload_dir = wp_upload_dir();
|
1001 |
+
$theme_dir = trailingslashit( $upload_dir['basedir'] ) . 'weaverx-subthemes/';
|
1002 |
+
if( $media_dir = opendir($theme_dir) ) {
|
1003 |
+
while ($m_file = readdir($media_dir)) {
|
1004 |
+
$len = strlen($m_file);
|
1005 |
+
$ext = $len > 4 ? substr($m_file,$len-4,4) : '';
|
1006 |
+
if($ext == '.wxt' || $ext == '.wxb' ) {
|
1007 |
+
$themes[] = $m_file;
|
1008 |
+
}
|
1009 |
+
}
|
1010 |
+
}
|
1011 |
+
return $themes;
|
1012 |
+
}
|
1013 |
+
|
1014 |
add_action( 'wvrx_ts_xp_perpoststyle', 'wvrx_ts_xp_perpoststyle_action' );
|
1015 |
|
1016 |
function wvrx_ts_xp_perpoststyle_action() {
|
includes/wvrx-ts-runtime-lib.php
CHANGED
@@ -291,9 +291,9 @@ function weaverx_ts_get_sysinfo() {
|
|
291 |
add_action('weaverx_save_mcecss', 'weaverx_ts_save_mcecss'); // theme support plugin saved editor css in file
|
292 |
|
293 |
function weaverx_ts_save_mcecss() {
|
294 |
-
// generate and save mcecss style file
|
295 |
|
296 |
-
if (!
|
297 |
return;
|
298 |
}
|
299 |
|
@@ -302,7 +302,7 @@ function weaverx_ts_save_mcecss() {
|
|
302 |
|
303 |
$usename = 'editor-style-wvrx.css';
|
304 |
|
305 |
-
$theme_dir_exists =
|
306 |
if (!$theme_dir_exists) {
|
307 |
weaverx_f_file_access_fail(__('Unable to create directory to save editor style file. Probably a file system permission problem. Directory', 'weaver-xtreme' /*adm*/) . $save_dir);
|
308 |
return;
|
@@ -310,21 +310,21 @@ function weaverx_ts_save_mcecss() {
|
|
310 |
|
311 |
$theme_dir_writable = $theme_dir_exists;
|
312 |
|
313 |
-
if (
|
314 |
weaverx_f_file_access_fail(__('Directory not writable to save editor style file. Probably a file system permission problem. Directory: ', 'weaver-xtreme' /*adm*/) . $save_dir);
|
315 |
return;
|
316 |
}
|
317 |
|
318 |
$filename = $save_dir . '/'. $usename; // we will add txt
|
319 |
|
320 |
-
if (!$theme_dir_writable || !$theme_dir_exists || !($handle =
|
321 |
weaverx_f_file_access_fail(__('Unable to create editor style file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
|
322 |
return;
|
323 |
}
|
324 |
|
325 |
weaverx_ts_output_edit_style($handle);
|
326 |
|
327 |
-
if (!
|
328 |
weaverx_f_file_access_fail(__('Unable to create editor css file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
|
329 |
return '';
|
330 |
}
|
@@ -618,7 +618,7 @@ tr th, thead th {color: inherit;background:none;font-weight:normal;line-height:n
|
|
618 |
$put .= "text-decoration:underline;";
|
619 |
$put .= "}\n";
|
620 |
|
621 |
-
|
622 |
return;
|
623 |
}
|
624 |
|
@@ -637,7 +637,7 @@ function weaverx_ts_mce_css( $default_style ) {
|
|
637 |
$path = trailingslashit($updir['baseurl']) . 'weaverx-subthemes/editor-style-wvrx.css';
|
638 |
|
639 |
if (!@file_exists( $dir ))
|
640 |
-
return
|
641 |
|
642 |
if (is_ssl()) $path = str_replace('http:','https:',$path);
|
643 |
return $default_style . ',' . $path;
|
291 |
add_action('weaverx_save_mcecss', 'weaverx_ts_save_mcecss'); // theme support plugin saved editor css in file
|
292 |
|
293 |
function weaverx_ts_save_mcecss() {
|
294 |
+
// generate and save mcecss style file (using direct PHP file access)
|
295 |
|
296 |
+
if (!current_user_can( 'edit_theme_options' ) ) {
|
297 |
return;
|
298 |
}
|
299 |
|
302 |
|
303 |
$usename = 'editor-style-wvrx.css';
|
304 |
|
305 |
+
$theme_dir_exists = wp_mkdir_p($save_dir); // direct to wp mkdir
|
306 |
if (!$theme_dir_exists) {
|
307 |
weaverx_f_file_access_fail(__('Unable to create directory to save editor style file. Probably a file system permission problem. Directory', 'weaver-xtreme' /*adm*/) . $save_dir);
|
308 |
return;
|
310 |
|
311 |
$theme_dir_writable = $theme_dir_exists;
|
312 |
|
313 |
+
if (!@is_writable($save_dir)) { // direct php access
|
314 |
weaverx_f_file_access_fail(__('Directory not writable to save editor style file. Probably a file system permission problem. Directory: ', 'weaver-xtreme' /*adm*/) . $save_dir);
|
315 |
return;
|
316 |
}
|
317 |
|
318 |
$filename = $save_dir . '/'. $usename; // we will add txt
|
319 |
|
320 |
+
if (!$theme_dir_writable || !$theme_dir_exists || !($handle = fopen($filename, 'w')) ) { // Direct php
|
321 |
weaverx_f_file_access_fail(__('Unable to create editor style file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
|
322 |
return;
|
323 |
}
|
324 |
|
325 |
weaverx_ts_output_edit_style($handle);
|
326 |
|
327 |
+
if (!fclose($handle)) {
|
328 |
weaverx_f_file_access_fail(__('Unable to create editor css file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
|
329 |
return '';
|
330 |
}
|
618 |
$put .= "text-decoration:underline;";
|
619 |
$put .= "}\n";
|
620 |
|
621 |
+
fwrite($handle, $put);
|
622 |
return;
|
623 |
}
|
624 |
|
637 |
$path = trailingslashit($updir['baseurl']) . 'weaverx-subthemes/editor-style-wvrx.css';
|
638 |
|
639 |
if (!@file_exists( $dir ))
|
640 |
+
return $default_style;
|
641 |
|
642 |
if (is_ssl()) $path = str_replace('http:','https:',$path);
|
643 |
return $default_style . ',' . $path;
|
includes/wvrx-ts-shortcodes.php
CHANGED
@@ -362,9 +362,17 @@ function wvrx_ts_sc_tab_group( $args, $content ) {
|
|
362 |
$out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
|
363 |
|
364 |
if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
|
|
|
365 |
foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
|
366 |
-
|
367 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
$out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
|
370 |
. '<div class="wvr-tabs-nav">' . "\n"
|
@@ -381,6 +389,15 @@ function wvrx_ts_sc_tab_group( $args, $content ) {
|
|
381 |
return $add_style . $out;
|
382 |
}
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
function wvrx_ts_sc_tab( $args, $content ) {
|
385 |
extract( shortcode_atts( array(
|
386 |
'title' => 'Tab %d'
|
362 |
$out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
|
363 |
|
364 |
if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
|
365 |
+
$n = 0;
|
366 |
foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
|
367 |
+
$n++;
|
368 |
+
$tabs[] = '<span>' . $tab['title'] . '</span>' . "\n";
|
369 |
+
// on page refresh, this simple code reverts to the first tab showing. Since this is under JS fixup, there was a bit of
|
370 |
+
// a flash until page loaded. By initially adding wvr-tabs-hide class and making that hidden, the flash is eliminated since
|
371 |
+
// the JS hides/unhides anyway. Added Version 3.1.8
|
372 |
+
if ($n == 1)
|
373 |
+
$panes[] = "\n" .'<div class="wvr-tabs-pane wvr-tabs-show">' . wvrx_ts_strip_pp($tab['content']) . '</div>';
|
374 |
+
else
|
375 |
+
$panes[] = "\n" .'<div class="wvr-tabs-pane wvr-tabs-hide">' . wvrx_ts_strip_pp($tab['content']) . '</div>';
|
376 |
}
|
377 |
$out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
|
378 |
. '<div class="wvr-tabs-nav">' . "\n"
|
389 |
return $add_style . $out;
|
390 |
}
|
391 |
|
392 |
+
function wvrx_ts_strip_pp( $content ) {
|
393 |
+
// strip leading </p>\n<p> from tab content - added by editor
|
394 |
+
$loc = strpos($content, "</p>\n<p>");
|
395 |
+
if ( $loc !== false && $loc == 0 ) {
|
396 |
+
return substr($content, 8);
|
397 |
+
}
|
398 |
+
return $content;
|
399 |
+
}
|
400 |
+
|
401 |
function wvrx_ts_sc_tab( $args, $content ) {
|
402 |
extract( shortcode_atts( array(
|
403 |
'title' => 'Tab %d'
|
readme.txt
CHANGED
@@ -10,7 +10,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
10 |
Text Domain: weaverx-theme-support
|
11 |
Requires at least: 4.5
|
12 |
Tested up to: 4.8
|
13 |
-
Stable tag: 3.1.
|
14 |
|
15 |
A useful shortcode and widget collection for Weaver Xtreme
|
16 |
|
@@ -75,6 +75,13 @@ Support for this plugin can best be found at our forum - http://forum.weaverthem
|
|
75 |
See ChangeLog for changes to this version.
|
76 |
|
77 |
== ChangeLog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
= 3.1.7 =
|
79 |
* Fix: Added new way to style the page/post editor. Some security plugins block previous method.
|
80 |
* Tweak: updated page/post editor styling to better match theme settings - requires Weaver Xtreme 3.1.7 or later.
|
10 |
Text Domain: weaverx-theme-support
|
11 |
Requires at least: 4.5
|
12 |
Tested up to: 4.8
|
13 |
+
Stable tag: 3.1.8
|
14 |
|
15 |
A useful shortcode and widget collection for Weaver Xtreme
|
16 |
|
75 |
See ChangeLog for changes to this version.
|
76 |
|
77 |
== ChangeLog ==
|
78 |
+
= 3.1.8 =
|
79 |
+
* Fix: New editor style file no longer needs Weaver Xtreme Plus
|
80 |
+
* New: Display message if need to save options to generate editor-style-wvrx.css file.
|
81 |
+
* New: Support for Weaver Xtreme Plus archive per page alt theme
|
82 |
+
* Tweak: Handle leading </p> in tabs shortcode
|
83 |
+
* Tweak: improved styling for tab shortcode for improved visibility when loading
|
84 |
+
|
85 |
= 3.1.7 =
|
86 |
* Fix: Added new way to style the page/post editor. Some security plugins block previous method.
|
87 |
* Tweak: updated page/post editor styling to better match theme settings - requires Weaver Xtreme 3.1.7 or later.
|
weaverx-ts.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://weavertheme.com/plugins
|
|
5 |
Description: Weaver Xtreme Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver Xtreme and Weaver Foundation themes.
|
6 |
Author: wpweaver
|
7 |
Author URI: http://weavertheme.com/about/
|
8 |
-
Version: 3.1.
|
9 |
License: GPL V3
|
10 |
|
11 |
Weaver Xtreme Theme Support
|
@@ -43,7 +43,7 @@ function wvrx_is_user_logged_in() {
|
|
43 |
|
44 |
if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
|
45 |
|
46 |
-
define ('WVRX_TS_VERSION','3.1.
|
47 |
define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
|
48 |
define ('WVRX_TS_APPEARANCE_PAGE', false );
|
49 |
|
5 |
Description: Weaver Xtreme Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver Xtreme and Weaver Foundation themes.
|
6 |
Author: wpweaver
|
7 |
Author URI: http://weavertheme.com/about/
|
8 |
+
Version: 3.1.8
|
9 |
License: GPL V3
|
10 |
|
11 |
Weaver Xtreme Theme Support
|
43 |
|
44 |
if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
|
45 |
|
46 |
+
define ('WVRX_TS_VERSION','3.1.8');
|
47 |
define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
|
48 |
define ('WVRX_TS_APPEARANCE_PAGE', false );
|
49 |
|