Version Description
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- plugins/call_to_action/view.actionbox.php +8 -4
- plugins/insert_ads.php +20 -18
- readme.txt +1 -1
- vkExUnit.php +1 -1
plugins/call_to_action/view.actionbox.php
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$
|
4 |
$url = get_post_meta( $id, 'vkExUnit_cta_url', true );
|
5 |
$text = get_post_meta( $id, 'vkExUnit_cta_text', true);
|
6 |
$text = preg_replace('/\n/', '<br/>', $text);
|
7 |
$imgid = get_post_meta( $id, 'vkExUnit_cta_img', true);
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
$image_position = get_post_meta( $id, 'vkExUnit_cta_img_position', true);
|
10 |
if(!$image_position){ $image_position = 'right'; }
|
11 |
|
@@ -21,10 +25,10 @@ if( $imgid ){
|
|
21 |
$content .= '<div class="vkExUnit_cta_body_txt '.(($imgid)? 'image_exist' : 'image_no').'">';
|
22 |
$content .= $text;
|
23 |
$content .= '</div>';
|
24 |
-
if( $url ){
|
25 |
$content .= '<div class="vkExUnit_cta_body_link">';
|
26 |
$content .= '<a href="'.$url.'" class="btn btn-primary btn-block btn-lg" target="_blank">';
|
27 |
-
$content .= $
|
28 |
$content .= '</a>';
|
29 |
$content .= '</div>';
|
30 |
}
|
1 |
<?php
|
2 |
|
3 |
+
$btn_text = get_post_meta( $id, 'vkExUnit_cta_button_text', true );
|
4 |
$url = get_post_meta( $id, 'vkExUnit_cta_url', true );
|
5 |
$text = get_post_meta( $id, 'vkExUnit_cta_text', true);
|
6 |
$text = preg_replace('/\n/', '<br/>', $text);
|
7 |
$imgid = get_post_meta( $id, 'vkExUnit_cta_img', true);
|
8 |
+
|
9 |
+
if (isset($imgid) && $imgid){
|
10 |
+
$cta_image = wp_get_attachment_image_src($imgid,full);
|
11 |
+
}
|
12 |
+
|
13 |
$image_position = get_post_meta( $id, 'vkExUnit_cta_img_position', true);
|
14 |
if(!$image_position){ $image_position = 'right'; }
|
15 |
|
25 |
$content .= '<div class="vkExUnit_cta_body_txt '.(($imgid)? 'image_exist' : 'image_no').'">';
|
26 |
$content .= $text;
|
27 |
$content .= '</div>';
|
28 |
+
if( $url && $btn_text ){
|
29 |
$content .= '<div class="vkExUnit_cta_body_link">';
|
30 |
$content .= '<a href="'.$url.'" class="btn btn-primary btn-block btn-lg" target="_blank">';
|
31 |
+
$content .= $btn_text;
|
32 |
$content .= '</a>';
|
33 |
$content .= '</div>';
|
34 |
}
|
plugins/insert_ads.php
CHANGED
@@ -29,10 +29,9 @@ class vExUnit_Ads {
|
|
29 |
protected function run_init() {
|
30 |
add_action('admin_init', array($this, 'option_init' ));
|
31 |
add_filter('the_content', array($this, 'set_content' ), 1);
|
32 |
-
add_shortcode('vkExUnit_ad', array($this, 'shortcode') );
|
33 |
}
|
34 |
|
35 |
-
|
36 |
public function option_init() {
|
37 |
vkExUnit_register_setting(
|
38 |
__('Insert ads', 'vkExUnit'), // tab label.
|
@@ -66,22 +65,25 @@ class vExUnit_Ads {
|
|
66 |
|
67 |
|
68 |
private function render_ad( $ads ,$area='more'){
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
$
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
85 |
}
|
86 |
|
87 |
|
29 |
protected function run_init() {
|
30 |
add_action('admin_init', array($this, 'option_init' ));
|
31 |
add_filter('the_content', array($this, 'set_content' ), 1);
|
32 |
+
add_shortcode('vkExUnit_ad', array($this, 'shortcode') );
|
33 |
}
|
34 |
|
|
|
35 |
public function option_init() {
|
36 |
vkExUnit_register_setting(
|
37 |
__('Insert ads', 'vkExUnit'), // tab label.
|
65 |
|
66 |
|
67 |
private function render_ad( $ads ,$area='more'){
|
68 |
+
// Display only post
|
69 |
+
if( get_post_type() == 'post'){
|
70 |
+
|
71 |
+
if( !$ads[0] ) return '';
|
72 |
+
$class = "col-md-12";
|
73 |
+
if( isset($ads[1]) && $ads[1] ) $class="col-md-6";
|
74 |
+
|
75 |
+
$content = '';
|
76 |
+
$content .= '<aside class="row vkExUnit_insertAds '.$area.'">';
|
77 |
+
foreach($ads as $ad){
|
78 |
+
if(!$ad) break;
|
79 |
+
|
80 |
+
$content .= '<div class="'.$class.'">';
|
81 |
+
$content .= $ad;
|
82 |
+
$content .= '</div>';
|
83 |
+
}
|
84 |
+
$content .= '</aside>';
|
85 |
+
return $content;
|
86 |
+
} // if( get_post_type() == 'post'){
|
87 |
}
|
88 |
|
89 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 2.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
vkExUnit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: VK All in One Expansion Unit
|
4 |
Plugin URI: https://github.com/kurudrive/VK-All-in-one-Expansion-Unit
|
5 |
Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
|
6 |
-
Version: 2.1.
|
7 |
Author: Vektor,Inc.
|
8 |
Author URI: http://vektor-inc.co.jp
|
9 |
License: GPL2
|
3 |
Plugin Name: VK All in One Expansion Unit
|
4 |
Plugin URI: https://github.com/kurudrive/VK-All-in-one-Expansion-Unit
|
5 |
Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
|
6 |
+
Version: 2.1.1
|
7 |
Author: Vektor,Inc.
|
8 |
Author URI: http://vektor-inc.co.jp
|
9 |
License: GPL2
|