Changeset 2100721
- Timestamp:
- 06/04/2019 11:09:08 PM (7 years ago)
- Location:
- post-thanks
- Files:
-
- 2 edited
-
tags/1.2/postthankyou.php (modified) (5 diffs)
-
trunk/postthankyou.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-thanks/tags/1.2/postthankyou.php
r2100706 r2100721 6 6 Plugin Name: Post Thanks 7 7 Description: This plugin adds custom text in end of each post published. 8 Version: 1. 28 Version: 1.1 9 9 Author: Inderjeet Singh 10 10 License: GPLv2 or later … … 32 32 font-size: -webkit-xxx-large;">Post Thank You ---- Menu</h2> 33 33 <form action="' . $_SERVER['REQUEST_URI'] . '" method="post"> 34 <div style="float:left;width:50%;"> 34 35 <p style ="font-weight: 900; 35 36 font-style: italic; … … 61 62 <br> 62 63 </div> 64 </div> 65 <div style="float:left;width:50%;height: 389px;"> 66 <p style="font-weight: 900; 67 font-style: italic; 68 font-size: large;">Show text on top or bottom of posts.</p> 69 <div class="radio"> 70 <label style="font-weight: 900; 71 font-style: italic; 72 font-size: inherit;"><input type="radio" name="topbottom" value="top">Top</label> 73 </div> 74 <div class="radio"> 75 <label style="font-weight: 900; 76 font-style: italic; 77 font-size: inherit;"><input type="radio" name="topbottom" value="bottom" checked>Bottom</label> 78 </div> 79 <br> 80 </div> 63 81 <br> 64 82 <br> … … 89 107 add_option( 'post_thanks_text_displayhide', $showhide ); 90 108 update_option( 'post_thanks_text_displayhide', $showhide ); 109 110 $topbottom = $_POST["topbottom"]; 111 add_option( 'post_thanks_text_topbottom', $topbottom ); 112 update_option( 'post_thanks_text_topbottom', $topbottom ); 113 91 114 echo '<div style="border:solid; padding:15px;"><br><div style="font-weight: 900; 92 115 font-style: italic; 93 font-size: large;">Following text added in end ofall posts: </div> <br><div style="color:'.get_option( 'post_thanks_text_color' ).'">'.116 font-size: large;">Following text added in all posts: </div> <br><div style="color:'.get_option( 'post_thanks_text_color' ).'">'. 94 117 get_option( 'post_thanks_text' ).'</div></div>'; 95 118 } … … 101 124 $post_thanks_text_color = get_option( 'post_thanks_text_color' ); 102 125 $post_thanks_text_showhide = get_option( 'post_thanks_text_displayhide' ); 126 $post_thanks_text_topbottom = get_option( 'post_thanks_text_topbottom' ); 103 127 104 128 if($post_thanks_text == ''){ 105 129 return $content; 106 130 } 107 else { 108 return $content .= '<div style = "color: '.$post_thanks_text_color.'; display: '.$post_thanks_text_showhide.';" class="post_thanks">'.$post_thanks_text.'</div>'; 131 if($post_thanks_text != ''){ 132 if($post_thanks_text_topbottom == 'bottom'){ 133 return $content .= '<div style = "color: '.$post_thanks_text_color.'; display: '.$post_thanks_text_showhide.';" class="post_thanks">'.$post_thanks_text.'</div>'; 134 } 135 if($post_thanks_text_topbottom == 'top'){ 136 $content2 = '<div style = "color: '.$post_thanks_text_color.'; display: '.$post_thanks_text_showhide.';" class="post_thanks">'.$post_thanks_text.'</div>' . $content; 137 return $content2 ; 138 } 109 139 } 110 140 } -
post-thanks/trunk/postthankyou.php
r2100706 r2100721 6 6 Plugin Name: Post Thanks 7 7 Description: This plugin adds custom text in end of each post published. 8 Version: 1. 28 Version: 1.1 9 9 Author: Inderjeet Singh 10 10 License: GPLv2 or later … … 32 32 font-size: -webkit-xxx-large;">Post Thank You ---- Menu</h2> 33 33 <form action="' . $_SERVER['REQUEST_URI'] . '" method="post"> 34 <div style="float:left;width:50%;"> 34 35 <p style ="font-weight: 900; 35 36 font-style: italic; … … 61 62 <br> 62 63 </div> 64 </div> 65 <div style="float:left;width:50%;height: 389px;"> 66 <p style="font-weight: 900; 67 font-style: italic; 68 font-size: large;">Show text on top or bottom of posts.</p> 69 <div class="radio"> 70 <label style="font-weight: 900; 71 font-style: italic; 72 font-size: inherit;"><input type="radio" name="topbottom" value="top">Top</label> 73 </div> 74 <div class="radio"> 75 <label style="font-weight: 900; 76 font-style: italic; 77 font-size: inherit;"><input type="radio" name="topbottom" value="bottom" checked>Bottom</label> 78 </div> 79 <br> 80 </div> 63 81 <br> 64 82 <br> … … 89 107 add_option( 'post_thanks_text_displayhide', $showhide ); 90 108 update_option( 'post_thanks_text_displayhide', $showhide ); 109 110 $topbottom = $_POST["topbottom"]; 111 add_option( 'post_thanks_text_topbottom', $topbottom ); 112 update_option( 'post_thanks_text_topbottom', $topbottom ); 113 91 114 echo '<div style="border:solid; padding:15px;"><br><div style="font-weight: 900; 92 115 font-style: italic; 93 font-size: large;">Following text added in end ofall posts: </div> <br><div style="color:'.get_option( 'post_thanks_text_color' ).'">'.116 font-size: large;">Following text added in all posts: </div> <br><div style="color:'.get_option( 'post_thanks_text_color' ).'">'. 94 117 get_option( 'post_thanks_text' ).'</div></div>'; 95 118 } … … 101 124 $post_thanks_text_color = get_option( 'post_thanks_text_color' ); 102 125 $post_thanks_text_showhide = get_option( 'post_thanks_text_displayhide' ); 126 $post_thanks_text_topbottom = get_option( 'post_thanks_text_topbottom' ); 103 127 104 128 if($post_thanks_text == ''){ 105 129 return $content; 106 130 } 107 else { 108 return $content .= '<div style = "color: '.$post_thanks_text_color.'; display: '.$post_thanks_text_showhide.';" class="post_thanks">'.$post_thanks_text.'</div>'; 131 if($post_thanks_text != ''){ 132 if($post_thanks_text_topbottom == 'bottom'){ 133 return $content .= '<div style = "color: '.$post_thanks_text_color.'; display: '.$post_thanks_text_showhide.';" class="post_thanks">'.$post_thanks_text.'</div>'; 134 } 135 if($post_thanks_text_topbottom == 'top'){ 136 $content2 = '<div style = "color: '.$post_thanks_text_color.'; display: '.$post_thanks_text_showhide.';" class="post_thanks">'.$post_thanks_text.'</div>' . $content; 137 return $content2 ; 138 } 109 139 } 110 140 }
Note: See TracChangeset
for help on using the changeset viewer.