Version Description
- New - Per Page/Post Report from Add-ons menu
- Fix: '\1234' values in per post style
- Fix: Internal name of Per Post Style - may cause loss of prevoius setting - sorry
Download this release
Release Info
Developer | wpweaver |
Plugin | Weaver Xtreme Theme Support |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.0.1
- includes/wvrx-ts-admin-page-posts.php +6 -4
- includes/wvrx-ts-runtime-lib.php +10 -0
- readme.txt +6 -1
- weaverx-ts.php +64 -4
includes/wvrx-ts-admin-page-posts.php
CHANGED
@@ -10,7 +10,7 @@ if ( !defined('ABSPATH')) exit; // Exit if accessed directly
|
|
10 |
// Admin panel that gets added to the page edit page for per page options
|
11 |
|
12 |
|
13 |
-
if ( !
|
14 |
|
15 |
function wvrx_ts_isp_true($val) {
|
16 |
if ($val) return true;
|
@@ -454,7 +454,7 @@ __('Enter optional per post CSS style rules. <strong>Do not</strong> include the
|
|
454 |
Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
|
455 |
(e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
|
456 |
<br />
|
457 |
-
<textarea name="
|
458 |
<br />
|
459 |
<br />
|
460 |
<p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
|
@@ -550,7 +550,7 @@ function wvrx_ts_save_post_fields($post_id) {
|
|
550 |
'_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
|
551 |
'_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
|
552 |
'_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
|
553 |
-
'_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '
|
554 |
'_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
|
555 |
'_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
|
556 |
'_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
|
@@ -569,7 +569,9 @@ if (weaverx_allow_multisite()) {
|
|
569 |
if (isset($_POST['post_meta'])) {
|
570 |
foreach ($all_post_fields as $post_field) {
|
571 |
if (isset($_POST[$post_field])) {
|
572 |
-
$data =
|
|
|
|
|
573 |
|
574 |
if (get_post_meta($post_id, $post_field) == '') {
|
575 |
add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
|
10 |
// Admin panel that gets added to the page edit page for per page options
|
11 |
|
12 |
|
13 |
+
if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
|
14 |
|
15 |
function wvrx_ts_isp_true($val) {
|
16 |
if ($val) return true;
|
454 |
Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
|
455 |
(e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
|
456 |
<br />
|
457 |
+
<textarea name="_pp_post_styles" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_styles", true)); ?></textarea>
|
458 |
<br />
|
459 |
<br />
|
460 |
<p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
|
550 |
'_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
|
551 |
'_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
|
552 |
'_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
|
553 |
+
'_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
|
554 |
'_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
|
555 |
'_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
|
556 |
'_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
|
569 |
if (isset($_POST['post_meta'])) {
|
570 |
foreach ($all_post_fields as $post_field) {
|
571 |
if (isset($_POST[$post_field])) {
|
572 |
+
$data = $_POST[$post_field];
|
573 |
+
if ( $post_field != '_pp_post_styles')
|
574 |
+
$data = stripslashes($data); // passed via post, so strip slashes
|
575 |
|
576 |
if (get_post_meta($post_id, $post_field) == '') {
|
577 |
add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
|
includes/wvrx-ts-runtime-lib.php
CHANGED
@@ -137,7 +137,17 @@ Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" cla
|
|
137 |
<?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
|
138 |
</li>
|
139 |
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
</div>
|
|
|
141 |
<?php
|
142 |
}
|
143 |
?>
|
137 |
<?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
|
138 |
</li>
|
139 |
</ul>
|
140 |
+
|
141 |
+
|
142 |
+
<h3><?php _e('Per Page/Post Settings','weaver-xtreme' /*adm*/); ?></h3>
|
143 |
+
<p> <?php _e("Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/'); ?></p>
|
144 |
+
<div style="clear:both;"></div>
|
145 |
+
<form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
|
146 |
+
<span class='submit'><input name="show_per_page_report" type="submit" value="<?php _e('Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/'); ?>" /></span>
|
147 |
+
<?php weaverx_nonce_field('show_per_page_report'); ?>
|
148 |
+
</form><br /><br />
|
149 |
</div>
|
150 |
+
|
151 |
<?php
|
152 |
}
|
153 |
?>
|
readme.txt
CHANGED
@@ -9,7 +9,7 @@ License: GPLv2 or later
|
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Requires at least: 3.9
|
11 |
Tested up to: 4.1
|
12 |
-
Stable tag: 1.0
|
13 |
|
14 |
A useful shortcode and widget collection for Weaver Xtreme
|
15 |
|
@@ -75,6 +75,11 @@ This is the initial release of this plugin.
|
|
75 |
|
76 |
== ChangeLog ==
|
77 |
|
|
|
|
|
|
|
|
|
|
|
78 |
= 1.0 =
|
79 |
* Minor tweaks
|
80 |
* wvrx_ shortcode prefix option
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Requires at least: 3.9
|
11 |
Tested up to: 4.1
|
12 |
+
Stable tag: 1.0.1
|
13 |
|
14 |
A useful shortcode and widget collection for Weaver Xtreme
|
15 |
|
75 |
|
76 |
== ChangeLog ==
|
77 |
|
78 |
+
= 1.0.1 =
|
79 |
+
* New - Per Page/Post Report from Add-ons menu
|
80 |
+
* Fix: '\1234' values in per post style
|
81 |
+
* Fix: Internal name of Per Post Style - may cause loss of prevoius setting - sorry
|
82 |
+
|
83 |
= 1.0 =
|
84 |
* Minor tweaks
|
85 |
* wvrx_ shortcode prefix option
|
weaverx-ts.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Weaver
|
4 |
Plugin URI: http://weavertheme.com/plugins
|
5 |
Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
|
6 |
Author: wpweaver
|
7 |
Author URI: http://weavertheme.com/about/
|
8 |
-
Version: 1.0
|
9 |
License: GPL V3
|
10 |
|
11 |
-
Weaver
|
12 |
|
13 |
Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
|
14 |
|
@@ -33,7 +33,7 @@ $theme = get_template_directory();
|
|
33 |
|
34 |
if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
|
35 |
|
36 |
-
define ('WVRX_TS_VERSION','1.0');
|
37 |
define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
|
38 |
define ('WVRX_TS_APPEARANCE_PAGE', false );
|
39 |
|
@@ -235,6 +235,8 @@ Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','
|
|
235 |
update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
|
236 |
weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
|
237 |
}
|
|
|
|
|
238 |
}
|
239 |
|
240 |
}
|
@@ -332,5 +334,63 @@ function wvrx_ts_child_saverestore_action() {
|
|
332 |
have created. These save/restore options are not related to Add-on Subthemes, although you can
|
333 |
modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
|
334 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
}
|
336 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: Weaver Xtreme Theme Support
|
4 |
Plugin URI: http://weavertheme.com/plugins
|
5 |
Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
|
6 |
Author: wpweaver
|
7 |
Author URI: http://weavertheme.com/about/
|
8 |
+
Version: 1.0.1
|
9 |
License: GPL V3
|
10 |
|
11 |
+
Weaver Xtreme Theme Support
|
12 |
|
13 |
Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
|
14 |
|
33 |
|
34 |
if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
|
35 |
|
36 |
+
define ('WVRX_TS_VERSION','1.0.1');
|
37 |
define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
|
38 |
define ('WVRX_TS_APPEARANCE_PAGE', false );
|
39 |
|
235 |
update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
|
236 |
weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
|
237 |
}
|
238 |
+
} else if ( weaverx_submitted('show_per_page_report')) {
|
239 |
+
wvrx_ts_per_page_report();
|
240 |
}
|
241 |
|
242 |
}
|
334 |
have created. These save/restore options are not related to Add-on Subthemes, although you can
|
335 |
modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
|
336 |
}
|
337 |
+
|
338 |
+
// --------------------------------------
|
339 |
+
function wvrx_ts_per_page_report() {
|
340 |
+
echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
|
341 |
+
echo "<h2>" . __('Show Pages and Posts with Per Page / Per Post Settings','weaverx-axtreme') . "</h2>\n";
|
342 |
+
echo "<h3>" . __('Posts','weaverx-axtreme') . "</h3>\n";
|
343 |
+
wvrx_ts_scan_section('post');
|
344 |
+
echo "<h3>" . __('Pages','weaverx-axtreme') . "</h3>\n";
|
345 |
+
wvrx_ts_scan_section('page');
|
346 |
+
echo "</div>\n";
|
347 |
+
}
|
348 |
+
|
349 |
+
function wvrx_ts_scan_section($what) {
|
350 |
+
|
351 |
+
$post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
|
352 |
+
'_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
|
353 |
+
'_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
|
354 |
+
'_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
|
355 |
+
'_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
|
356 |
+
'_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
|
357 |
+
'_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
|
358 |
+
'_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
|
359 |
+
'_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
|
360 |
+
'_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
|
361 |
+
'_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
|
362 |
+
'_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
|
363 |
+
'_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
|
364 |
+
);
|
365 |
+
|
366 |
+
$args = array('posts_per_page' => -1, 'post_type' => $what, 'post_status' => 'any' );
|
367 |
+
echo '<ul>';
|
368 |
+
|
369 |
+
$allposts = get_posts($args);
|
370 |
+
foreach ($allposts as $post) {
|
371 |
+
$id = $post->ID;
|
372 |
+
setup_postdata($post);
|
373 |
+
$meta = get_post_meta( $id );
|
374 |
+
if (!empty($meta)) {
|
375 |
+
$type = $post->post_type;
|
376 |
+
$title = esc_html($post->post_title);
|
377 |
+
$link = esc_url(get_permalink($id));
|
378 |
+
$tlink = "<a href='{$link}' alt='Post {$id}' target='_blank'>{$title}</a>";
|
379 |
+
$heading = false;
|
380 |
+
foreach ($meta as $name => $val_array) { // old value gets put into $val_array[0]
|
381 |
+
if (in_array($name, $post_fields) ) {
|
382 |
+
$val = $val_array[0]; // easier to work with
|
383 |
+
if ($type == 'page') {
|
384 |
+
echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-axtreme') . "</li>\n";
|
385 |
+
} else {
|
386 |
+
echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-axtreme') . "</li>\n";
|
387 |
+
}
|
388 |
+
break;
|
389 |
+
}
|
390 |
+
}
|
391 |
+
}
|
392 |
+
}
|
393 |
+
echo '</ul>';
|
394 |
+
}
|
395 |
}
|
396 |
?>
|