Version Description
- [ Bug fix ] fix php error
Download this release
Release Info
Developer | kurudrive |
Plugin | Lightning Advanced Unit |
Version | 3.4.1 |
Comparing to | |
See all releases |
Code changes from version 3.4.0 to 3.4.1
- inc/widgets/widget-full-wide-title.php +43 -37
- inc/widgets/widget-new-posts.php +35 -21
- lightning_advanced_unit.php +1 -1
- readme.txt +5 -2
inc/widgets/widget-full-wide-title.php
CHANGED
@@ -1,12 +1,14 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
/*-------------------------------------------*/
|
6 |
|
7 |
add_action(
|
8 |
'widgets_init',
|
9 |
-
|
|
|
|
|
10 |
);
|
11 |
|
12 |
class LTG_Full_Wide_Title extends WP_Widget {
|
@@ -39,15 +41,15 @@ class LTG_Full_Wide_Title extends WP_Widget {
|
|
39 |
return wp_parse_args( (array) $args, $defaults );
|
40 |
}
|
41 |
|
42 |
-
|
43 |
-
|
44 |
/*-------------------------------------------*/
|
45 |
public function form( $instance ) {
|
46 |
$options = self::default_options( $instance );
|
47 |
// ※ wp_parse_args()かけてるのでisset不要
|
48 |
|
49 |
echo '<p>';
|
50 |
-
echo
|
51 |
$id = $this->get_field_id( 'title' );
|
52 |
$name = $this->get_field_name( 'title' );
|
53 |
echo '<input type="text" id="' . $id . '" name="' . $name . '" value="' . esc_attr( $options['title'] ) . '" />';
|
@@ -64,7 +66,7 @@ class LTG_Full_Wide_Title extends WP_Widget {
|
|
64 |
$name = $this->get_field_name( 'text' );
|
65 |
|
66 |
echo '<p>';
|
67 |
-
echo
|
68 |
echo '<textarea id="' . $id . '" name="' . $name . '" style="width:100%;">' . esc_textarea( $text ) . '</textarea>';
|
69 |
echo '</p>';
|
70 |
|
@@ -94,11 +96,11 @@ class LTG_Full_Wide_Title extends WP_Widget {
|
|
94 |
// 数字だったら、その数字の画像を full サイズで取得
|
95 |
$image = wp_get_attachment_image_src( $options['media_image_id'], 'full' );
|
96 |
}
|
97 |
-
?>
|
98 |
|
99 |
<div class="vkExUnit_banner_area" style="padding: 0.7em 0;">
|
100 |
<div class="_display" style="height:auto">
|
101 |
-
|
102 |
<img src="<?php echo esc_url( $image[0] ); ?>" style="width:100%;height:auto;" />
|
103 |
<?php endif; ?>
|
104 |
</div>
|
@@ -142,33 +144,35 @@ var vk_title_bg_image_delete = function(e){
|
|
142 |
}
|
143 |
</script>
|
144 |
|
145 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
echo '
|
153 |
-
echo
|
154 |
-
$id = $this->get_field_id( 'margin_top' );
|
155 |
-
$name = $this->get_field_name( 'margin_top' );
|
156 |
-
echo '<input type="text" id="' . $id . '" name="' . $name . '" value="' . esc_attr( $options['margin_top'] ) . '" /><br />';
|
157 |
-
echo __( 'Ex', LIGHTNING_ADVANCED_TEXTDOMAIN ) . ') 0;';
|
158 |
-
echo '</p>';
|
159 |
-
|
160 |
-
echo '<p>';
|
161 |
-
echo __( 'Margin Bottom', LIGHTNING_ADVANCED_TEXTDOMAIN ) . ' : ';
|
162 |
-
$id = $this->get_field_id( 'margin_bottom' );
|
163 |
-
$name = $this->get_field_name( 'margin_bottom' );
|
164 |
-
echo '<input type="text" id="' . $id . '" name="' . $name . '" value="' . esc_attr( $options['margin_bottom'] ) . '" /><br />';
|
165 |
-
echo __( 'Ex', LIGHTNING_ADVANCED_TEXTDOMAIN ) . ') 40px';
|
166 |
-
echo '</p>';
|
167 |
|
168 |
}
|
169 |
|
170 |
-
|
171 |
-
|
|
|
|
|
172 |
/*-------------------------------------------*/
|
173 |
|
174 |
public function update( $new_instance, $old_instance ) {
|
@@ -184,8 +188,10 @@ echo '</p>';
|
|
184 |
return $new_instance;
|
185 |
}
|
186 |
|
187 |
-
|
188 |
-
|
|
|
|
|
189 |
/*-------------------------------------------*/
|
190 |
public static function widget_outer_style( $instance ) {
|
191 |
|
@@ -203,7 +209,7 @@ echo '</p>';
|
|
203 |
// 背景色が登録されている場合(画像は登録されていない)
|
204 |
} elseif ( ! empty( $instance['title_bg_color'] ) && empty( $image ) ) {
|
205 |
$widget_outer_style = 'background: ' . sanitize_hex_color( $instance['title_bg_color'] ) . ';';
|
206 |
-
//
|
207 |
} elseif ( ! empty( $image ) && ! empty( $instance['title_bg_color'] ) ) {
|
208 |
$widget_outer_style = 'background-image: url(\'' . esc_url( $image ) . '\');';
|
209 |
// その他(画像も背景色も登録されていない)
|
@@ -243,8 +249,8 @@ echo '</p>';
|
|
243 |
return $widget_font_style;
|
244 |
}
|
245 |
|
246 |
-
|
247 |
-
|
248 |
/*-------------------------------------------*/
|
249 |
public function widget( $args, $instance ) {
|
250 |
$instance = self::default_options( $instance );
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
LTG Full Wide Title widget
|
5 |
/*-------------------------------------------*/
|
6 |
|
7 |
add_action(
|
8 |
'widgets_init',
|
9 |
+
function() {
|
10 |
+
register_widget( 'LTG_Full_Wide_Title' );
|
11 |
+
}
|
12 |
);
|
13 |
|
14 |
class LTG_Full_Wide_Title extends WP_Widget {
|
41 |
return wp_parse_args( (array) $args, $defaults );
|
42 |
}
|
43 |
|
44 |
+
/*
|
45 |
+
form
|
46 |
/*-------------------------------------------*/
|
47 |
public function form( $instance ) {
|
48 |
$options = self::default_options( $instance );
|
49 |
// ※ wp_parse_args()かけてるのでisset不要
|
50 |
|
51 |
echo '<p>';
|
52 |
+
echo __( 'Title:', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '<br>';
|
53 |
$id = $this->get_field_id( 'title' );
|
54 |
$name = $this->get_field_name( 'title' );
|
55 |
echo '<input type="text" id="' . $id . '" name="' . $name . '" value="' . esc_attr( $options['title'] ) . '" />';
|
66 |
$name = $this->get_field_name( 'text' );
|
67 |
|
68 |
echo '<p>';
|
69 |
+
echo __( 'Sub title:', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '<br>';
|
70 |
echo '<textarea id="' . $id . '" name="' . $name . '" style="width:100%;">' . esc_textarea( $text ) . '</textarea>';
|
71 |
echo '</p>';
|
72 |
|
96 |
// 数字だったら、その数字の画像を full サイズで取得
|
97 |
$image = wp_get_attachment_image_src( $options['media_image_id'], 'full' );
|
98 |
}
|
99 |
+
?>
|
100 |
|
101 |
<div class="vkExUnit_banner_area" style="padding: 0.7em 0;">
|
102 |
<div class="_display" style="height:auto">
|
103 |
+
<?php if ( $image ) : ?>
|
104 |
<img src="<?php echo esc_url( $image[0] ); ?>" style="width:100%;height:auto;" />
|
105 |
<?php endif; ?>
|
106 |
</div>
|
144 |
}
|
145 |
</script>
|
146 |
|
147 |
+
<?php
|
148 |
+
|
149 |
+
// Shadow Use
|
150 |
+
$checked = ( $options['bg_parallax'] ) ? ' checked' : '';
|
151 |
+
echo '<p><input type="checkbox" id="' . $this->get_field_id( 'bg_parallax' ) . '" name="' . $this->get_field_name( 'bg_parallax' ) . '" value="true"' . $checked . ' >';
|
152 |
+
echo '<label for="' . $this->get_field_id( 'bg_parallax' ) . '">' . __( 'Set to parallax', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '</label><br/></p>';
|
153 |
+
|
154 |
+
echo '<p>';
|
155 |
+
echo __( 'Margin Top', LIGHTNING_ADVANCED_TEXTDOMAIN ) . ' : ';
|
156 |
+
$id = $this->get_field_id( 'margin_top' );
|
157 |
+
$name = $this->get_field_name( 'margin_top' );
|
158 |
+
echo '<input type="text" id="' . $id . '" name="' . $name . '" value="' . esc_attr( $options['margin_top'] ) . '" /><br />';
|
159 |
+
echo __( 'Ex', LIGHTNING_ADVANCED_TEXTDOMAIN ) . ') 0;';
|
160 |
+
echo '</p>';
|
161 |
|
162 |
+
echo '<p>';
|
163 |
+
echo __( 'Margin Bottom', LIGHTNING_ADVANCED_TEXTDOMAIN ) . ' : ';
|
164 |
+
$id = $this->get_field_id( 'margin_bottom' );
|
165 |
+
$name = $this->get_field_name( 'margin_bottom' );
|
166 |
+
echo '<input type="text" id="' . $id . '" name="' . $name . '" value="' . esc_attr( $options['margin_bottom'] ) . '" /><br />';
|
167 |
+
echo __( 'Ex', LIGHTNING_ADVANCED_TEXTDOMAIN ) . ') 40px';
|
168 |
+
echo '</p>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
}
|
171 |
|
172 |
+
/*
|
173 |
+
-------------------------------------------*/
|
174 |
+
/*
|
175 |
+
update
|
176 |
/*-------------------------------------------*/
|
177 |
|
178 |
public function update( $new_instance, $old_instance ) {
|
188 |
return $new_instance;
|
189 |
}
|
190 |
|
191 |
+
/*
|
192 |
+
-------------------------------------------*/
|
193 |
+
/*
|
194 |
+
functions
|
195 |
/*-------------------------------------------*/
|
196 |
public static function widget_outer_style( $instance ) {
|
197 |
|
209 |
// 背景色が登録されている場合(画像は登録されていない)
|
210 |
} elseif ( ! empty( $instance['title_bg_color'] ) && empty( $image ) ) {
|
211 |
$widget_outer_style = 'background: ' . sanitize_hex_color( $instance['title_bg_color'] ) . ';';
|
212 |
+
// 画像も背景色もどちらも登録されている場合
|
213 |
} elseif ( ! empty( $image ) && ! empty( $instance['title_bg_color'] ) ) {
|
214 |
$widget_outer_style = 'background-image: url(\'' . esc_url( $image ) . '\');';
|
215 |
// その他(画像も背景色も登録されていない)
|
249 |
return $widget_font_style;
|
250 |
}
|
251 |
|
252 |
+
/*
|
253 |
+
widget
|
254 |
/*-------------------------------------------*/
|
255 |
public function widget( $args, $instance ) {
|
256 |
$instance = self::default_options( $instance );
|
inc/widgets/widget-new-posts.php
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
5 |
/*-------------------------------------------*/
|
6 |
class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
7 |
|
@@ -18,10 +20,12 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
18 |
);
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
21 |
/*-------------------------------------------*/
|
22 |
-
|
23 |
-
/*-------------------------------------------*/
|
24 |
-
static public function more_link_html( $instance ) {
|
25 |
if ( ! empty( $instance['more_text'] ) && ! empty( $instance['more_url'] ) ) {
|
26 |
$more_link_html = '<div class="text-right" style="margin-top:1em;">';
|
27 |
$more_link_html .= '<a href="' . esc_url( $instance['more_url'] ) . '" class="btn btn-default btn-xs">' . wp_kses_post( $instance['more_text'] ) . '</a>';
|
@@ -102,7 +106,7 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
102 |
}
|
103 |
|
104 |
endif;
|
105 |
-
echo
|
106 |
echo '</div>';
|
107 |
echo $args['after_widget'];
|
108 |
|
@@ -111,8 +115,10 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
111 |
|
112 |
} // widget($args, $instance)
|
113 |
|
114 |
-
|
115 |
-
|
|
|
|
|
116 |
/*-------------------------------------------*/
|
117 |
function display_pattern_1() {
|
118 |
global $post;
|
@@ -138,7 +144,7 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
138 |
|
139 |
<div class="entry-footer">
|
140 |
<?php
|
141 |
-
$args
|
142 |
'before' => '<nav class="page-link"><dl><dt>Pages :</dt><dd>',
|
143 |
'after' => '</dd></dl></nav>',
|
144 |
'link_before' => '<span class="page-numbers">',
|
@@ -149,8 +155,10 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
149 |
?>
|
150 |
|
151 |
<?php
|
152 |
-
|
153 |
-
|
|
|
|
|
154 |
/*-------------------------------------------*/
|
155 |
$args = array(
|
156 |
'template' => __( '<dl><dt>%s</dt><dd>%l</dd></dl>', 'lightning' ),
|
@@ -172,7 +180,7 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
172 |
<?php
|
173 |
$tags_list = get_the_tag_list();
|
174 |
if ( $tags_list ) :
|
175 |
-
|
176 |
<div class="entry-meta-dataList entry-tag">
|
177 |
<dl>
|
178 |
<dt><?php _e( 'Tags', 'lightning' ); ?></dt>
|
@@ -184,7 +192,7 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
184 |
|
185 |
</article>
|
186 |
|
187 |
-
|
188 |
}
|
189 |
|
190 |
function _taxonomy_init( $post_type ) {
|
@@ -222,7 +230,7 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
222 |
);
|
223 |
|
224 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
225 |
-
|
226 |
?>
|
227 |
<br/>
|
228 |
<?php echo _e( 'Display Format', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?>:<br/>
|
@@ -231,29 +239,29 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
231 |
<?php
|
232 |
if ( $instance['format'] == 0 ) {
|
233 |
echo 'checked'; }
|
234 |
-
?>
|
235 |
/><?php echo __( 'Thumbnail', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Date', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Category', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Title', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Excerpt', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?></label>
|
236 |
</li>
|
237 |
<li><label><input type="radio" name="<?php echo $this->get_field_name( 'format' ); ?>" value="1"
|
238 |
<?php
|
239 |
if ( $instance['format'] == 1 ) {
|
240 |
echo 'checked'; }
|
241 |
-
?>
|
242 |
/><?php echo __( 'Thumbnail', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Date', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Category', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Title', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Content', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?></label>
|
243 |
</li>
|
244 |
</ul>
|
245 |
<br/>
|
246 |
-
<?php
|
247 |
<label for="<?php echo $this->get_field_id( 'label' ); ?>"><?php _e( 'Title:' ); ?></label><br/>
|
248 |
<input type="text" id="<?php echo $this->get_field_id( 'label' ); ?>-title" name="<?php echo $this->get_field_name( 'label' ); ?>" value="<?php echo $instance['label']; ?>" />
|
249 |
<br/><br />
|
250 |
|
251 |
-
<?php
|
252 |
<label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Display count', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?>:</label><br/>
|
253 |
<input type="text" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo $instance['count']; ?>" />
|
254 |
<br /><br />
|
255 |
|
256 |
-
<?php
|
257 |
<label for="<?php echo $this->get_field_id( 'post_type' ); ?>"><?php _e( 'Slug for the custom type you want to display', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?>:</label><br />
|
258 |
<input type="text" id="<?php echo $this->get_field_id( 'post_type' ); ?>" name="<?php echo $this->get_field_name( 'post_type' ); ?>" value="<?php echo esc_attr( $instance['post_type'] ); ?>" />
|
259 |
<br/><br/>
|
@@ -275,7 +283,7 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
275 |
<label for="<?php echo $this->get_field_id( 'more_text' ); ?>"><?php _e( 'Notation text:', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?></label><br/>
|
276 |
<input type="text" placeholder="最新記事一覧 ≫" id="<?php echo $this->get_field_id( 'more_text' ); ?>" name="<?php echo $this->get_field_name( 'more_text' ); ?>" value="<?php echo esc_attr( $instance['more_text'] ); ?>" />
|
277 |
<br /><br />
|
278 |
-
|
279 |
}
|
280 |
|
281 |
function update( $new_instance, $old_instance ) {
|
@@ -290,4 +298,10 @@ class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
|
290 |
return $instance;
|
291 |
}
|
292 |
}
|
293 |
-
add_action( 'widgets_init', create_function( '', 'return register_widget("WP_Widget_ltg_adv_post_list");' ) );
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
-------------------------------------------*/
|
5 |
+
/*
|
6 |
+
Side Post list widget
|
7 |
/*-------------------------------------------*/
|
8 |
class WP_Widget_ltg_adv_post_list extends WP_Widget {
|
9 |
|
20 |
);
|
21 |
}
|
22 |
|
23 |
+
/*
|
24 |
+
-------------------------------------------*/
|
25 |
+
/*
|
26 |
+
一覧へのリンクhtmlを出力する関数
|
27 |
/*-------------------------------------------*/
|
28 |
+
public static function more_link_html( $instance ) {
|
|
|
|
|
29 |
if ( ! empty( $instance['more_text'] ) && ! empty( $instance['more_url'] ) ) {
|
30 |
$more_link_html = '<div class="text-right" style="margin-top:1em;">';
|
31 |
$more_link_html .= '<a href="' . esc_url( $instance['more_url'] ) . '" class="btn btn-default btn-xs">' . wp_kses_post( $instance['more_text'] ) . '</a>';
|
106 |
}
|
107 |
|
108 |
endif;
|
109 |
+
echo $this->more_link_html( $instance );
|
110 |
echo '</div>';
|
111 |
echo $args['after_widget'];
|
112 |
|
115 |
|
116 |
} // widget($args, $instance)
|
117 |
|
118 |
+
/*
|
119 |
+
-------------------------------------------*/
|
120 |
+
/*
|
121 |
+
display_pattern_1 Cointent Body
|
122 |
/*-------------------------------------------*/
|
123 |
function display_pattern_1() {
|
124 |
global $post;
|
144 |
|
145 |
<div class="entry-footer">
|
146 |
<?php
|
147 |
+
$args = array(
|
148 |
'before' => '<nav class="page-link"><dl><dt>Pages :</dt><dd>',
|
149 |
'after' => '</dd></dl></nav>',
|
150 |
'link_before' => '<span class="page-numbers">',
|
155 |
?>
|
156 |
|
157 |
<?php
|
158 |
+
/*
|
159 |
+
-------------------------------------------*/
|
160 |
+
/*
|
161 |
+
Category and tax data
|
162 |
/*-------------------------------------------*/
|
163 |
$args = array(
|
164 |
'template' => __( '<dl><dt>%s</dt><dd>%l</dd></dl>', 'lightning' ),
|
180 |
<?php
|
181 |
$tags_list = get_the_tag_list();
|
182 |
if ( $tags_list ) :
|
183 |
+
?>
|
184 |
<div class="entry-meta-dataList entry-tag">
|
185 |
<dl>
|
186 |
<dt><?php _e( 'Tags', 'lightning' ); ?></dt>
|
192 |
|
193 |
</article>
|
194 |
|
195 |
+
<?php
|
196 |
}
|
197 |
|
198 |
function _taxonomy_init( $post_type ) {
|
230 |
);
|
231 |
|
232 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
233 |
+
// タイトル
|
234 |
?>
|
235 |
<br/>
|
236 |
<?php echo _e( 'Display Format', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?>:<br/>
|
239 |
<?php
|
240 |
if ( $instance['format'] == 0 ) {
|
241 |
echo 'checked'; }
|
242 |
+
?>
|
243 |
/><?php echo __( 'Thumbnail', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Date', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Category', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Title', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Excerpt', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?></label>
|
244 |
</li>
|
245 |
<li><label><input type="radio" name="<?php echo $this->get_field_name( 'format' ); ?>" value="1"
|
246 |
<?php
|
247 |
if ( $instance['format'] == 1 ) {
|
248 |
echo 'checked'; }
|
249 |
+
?>
|
250 |
/><?php echo __( 'Thumbnail', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Date', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Category', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Title', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '/' . __( 'Content', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?></label>
|
251 |
</li>
|
252 |
</ul>
|
253 |
<br/>
|
254 |
+
<?php // タイトル ?>
|
255 |
<label for="<?php echo $this->get_field_id( 'label' ); ?>"><?php _e( 'Title:' ); ?></label><br/>
|
256 |
<input type="text" id="<?php echo $this->get_field_id( 'label' ); ?>-title" name="<?php echo $this->get_field_name( 'label' ); ?>" value="<?php echo $instance['label']; ?>" />
|
257 |
<br/><br />
|
258 |
|
259 |
+
<?php // 表示件数 ?>
|
260 |
<label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Display count', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?>:</label><br/>
|
261 |
<input type="text" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo $instance['count']; ?>" />
|
262 |
<br /><br />
|
263 |
|
264 |
+
<?php // 投稿タイプ ?>
|
265 |
<label for="<?php echo $this->get_field_id( 'post_type' ); ?>"><?php _e( 'Slug for the custom type you want to display', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?>:</label><br />
|
266 |
<input type="text" id="<?php echo $this->get_field_id( 'post_type' ); ?>" name="<?php echo $this->get_field_name( 'post_type' ); ?>" value="<?php echo esc_attr( $instance['post_type'] ); ?>" />
|
267 |
<br/><br/>
|
283 |
<label for="<?php echo $this->get_field_id( 'more_text' ); ?>"><?php _e( 'Notation text:', LIGHTNING_ADVANCED_TEXTDOMAIN ); ?></label><br/>
|
284 |
<input type="text" placeholder="最新記事一覧 ≫" id="<?php echo $this->get_field_id( 'more_text' ); ?>" name="<?php echo $this->get_field_name( 'more_text' ); ?>" value="<?php echo esc_attr( $instance['more_text'] ); ?>" />
|
285 |
<br /><br />
|
286 |
+
<?php
|
287 |
}
|
288 |
|
289 |
function update( $new_instance, $old_instance ) {
|
298 |
return $instance;
|
299 |
}
|
300 |
}
|
301 |
+
// add_action( 'widgets_init', create_function( '', 'return register_widget("WP_Widget_ltg_adv_post_list");' ) );
|
302 |
+
add_action(
|
303 |
+
'widgets_init',
|
304 |
+
function() {
|
305 |
+
register_widget( 'WP_Widget_ltg_adv_post_list' );
|
306 |
+
}
|
307 |
+
);
|
lightning_advanced_unit.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Lightning Advanced Unit
|
4 |
* Plugin URI: http://lightning.vektor-inc.co.jp/
|
5 |
-
* Version: 3.4.
|
6 |
* Author: Vektor,Inc.
|
7 |
* Author URI: https://www.vektor-inc.co.jp
|
8 |
* Description: This is a plug-ins that extend the functionality of the theme "Lightning".
|
2 |
/**
|
3 |
* Plugin Name: Lightning Advanced Unit
|
4 |
* Plugin URI: http://lightning.vektor-inc.co.jp/
|
5 |
+
* Version: 3.4.1
|
6 |
* Author: Vektor,Inc.
|
7 |
* Author URI: https://www.vektor-inc.co.jp
|
8 |
* Description: This is a plug-ins that extend the functionality of the theme "Lightning".
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: vektor-inc,bizvektor,kurudrive
|
3 |
Donate link:
|
4 |
Tags: Lightning,
|
5 |
-
Requires at least:
|
6 |
Tested up to: 4.9.5
|
7 |
-
Stable tag: 3.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -44,6 +44,9 @@ e.g.
|
|
44 |
|
45 |
== Changelog ==
|
46 |
|
|
|
|
|
|
|
47 |
= 3.4.0 =
|
48 |
* Add cease maintenance announce.
|
49 |
|
2 |
Contributors: vektor-inc,bizvektor,kurudrive
|
3 |
Donate link:
|
4 |
Tags: Lightning,
|
5 |
+
Requires at least: 5.3
|
6 |
Tested up to: 4.9.5
|
7 |
+
Stable tag: 3.4.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
44 |
|
45 |
== Changelog ==
|
46 |
|
47 |
+
= 3.4.1 =
|
48 |
+
* [ Bug fix ] fix php error
|
49 |
+
|
50 |
= 3.4.0 =
|
51 |
* Add cease maintenance announce.
|
52 |
|