Version Description
*
Download this release
Release Info
Developer | hidaka.bizplugin |
Plugin | What's New Generator |
Version | 1.6.0 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.6.0
- readme.txt +6 -3
- screenshot-2.png +0 -0
- whats-new-generator.php +9 -3
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== What's New Generator ===
|
2 |
Contributors: WordPress BizPlugin
|
3 |
Donate link:
|
4 |
-
Tags: what's new, update
|
5 |
Requires at least: 3.4
|
6 |
-
Tested up to: 3.5
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -39,6 +39,9 @@ What’s New Generatorは、投稿、固定ページ、ウィジェットに新
|
|
39 |
|
40 |
== Changelog ==
|
41 |
|
|
|
|
|
|
|
42 |
= 1.5.0 =
|
43 |
* 新着一覧のタイトル背景色にcolor pickerを追加 ( WordPress 3.5以上 )
|
44 |
* NEWマークデザイン変更
|
1 |
=== What's New Generator ===
|
2 |
Contributors: WordPress BizPlugin
|
3 |
Donate link:
|
4 |
+
Tags: what's new, update Post page
|
5 |
Requires at least: 3.4
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.6.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
39 |
|
40 |
== Changelog ==
|
41 |
|
42 |
+
= 1.6.0 =
|
43 |
+
* 新着一覧の表示コンテンツに投稿+固定ページを追加
|
44 |
+
|
45 |
= 1.5.0 =
|
46 |
* 新着一覧のタイトル背景色にcolor pickerを追加 ( WordPress 3.5以上 )
|
47 |
* NEWマークデザイン変更
|
screenshot-2.png
CHANGED
Binary file
|
whats-new-generator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: What's New Generator
|
4 |
Plugin URI: http://residentbird.main.jp/bizplugin/
|
5 |
Description: What's New(新着情報)を指定した固定ページや投稿に自動的に表示するプラグインです。
|
6 |
-
Version: 1.
|
7 |
Author:WordPress Biz Plugin
|
8 |
Author URI: http://residentbird.main.jp/bizplugin/
|
9 |
*/
|
@@ -180,7 +180,7 @@ class WhatsNewPlugin{
|
|
180 |
// RADIO-BUTTON - Name: whats_new_options[option_set1]
|
181 |
function setting_content_type() {
|
182 |
$options = get_option($this->option_name);
|
183 |
-
$items = array("投稿", "固定ページ");
|
184 |
foreach($items as $item) {
|
185 |
$checked = ($options['wng_content_type']==$item) ? ' checked="checked" ' : '';
|
186 |
echo "<label><input ".$checked." value='$item' name='whats_new_options[wng_content_type]' type='radio' /> $item</label><br />";
|
@@ -225,7 +225,13 @@ class WhatsNewInfo{
|
|
225 |
|
226 |
private function createWhatsNewItems($option_name){
|
227 |
$condition = array();
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
$condition['numberposts'] = $this->num;
|
230 |
$condition['order'] = 'desc';
|
231 |
$condition['orderby'] = $this->orderby == '公開日順' ? 'post_date' : 'modified';
|
3 |
Plugin Name: What's New Generator
|
4 |
Plugin URI: http://residentbird.main.jp/bizplugin/
|
5 |
Description: What's New(新着情報)を指定した固定ページや投稿に自動的に表示するプラグインです。
|
6 |
+
Version: 1.6.0
|
7 |
Author:WordPress Biz Plugin
|
8 |
Author URI: http://residentbird.main.jp/bizplugin/
|
9 |
*/
|
180 |
// RADIO-BUTTON - Name: whats_new_options[option_set1]
|
181 |
function setting_content_type() {
|
182 |
$options = get_option($this->option_name);
|
183 |
+
$items = array("投稿", "固定ページ", "投稿+固定ページ");
|
184 |
foreach($items as $item) {
|
185 |
$checked = ($options['wng_content_type']==$item) ? ' checked="checked" ' : '';
|
186 |
echo "<label><input ".$checked." value='$item' name='whats_new_options[wng_content_type]' type='radio' /> $item</label><br />";
|
225 |
|
226 |
private function createWhatsNewItems($option_name){
|
227 |
$condition = array();
|
228 |
+
if ( $this->content_type == '投稿'){
|
229 |
+
$condition['post_type'] = 'post';
|
230 |
+
}else if ( $this->content_type == '固定ページ' ){
|
231 |
+
$condition['post_type'] = 'page';
|
232 |
+
}else{
|
233 |
+
$condition['post_type'] = array('page', 'post');
|
234 |
+
}
|
235 |
$condition['numberposts'] = $this->num;
|
236 |
$condition['order'] = 'desc';
|
237 |
$condition['orderby'] = $this->orderby == '公開日順' ? 'post_date' : 'modified';
|