Changeset 1918433
- Timestamp:
- 08/01/2018 06:39:16 PM (8 years ago)
- Location:
- davsy
- Files:
-
- 4 added
- 4 edited
-
assets/banner-1544x500-rtl.png (added)
-
assets/banner-1544x500.jpg (added)
-
assets/banner-772x250-rtl.png (added)
-
assets/banner-772x250.jpg (added)
-
trunk/assets/css/wp_davsy_front.css (modified) (4 diffs)
-
trunk/davsy.php (modified) (4 diffs)
-
trunk/includes/class-davsy-widget.php (modified) (5 diffs)
-
trunk/includes/class-wp-davsy-api.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
davsy/trunk/assets/css/wp_davsy_front.css
r1917056 r1918433 1 1 .davsy-main-widget .davsy-widget { list-style: none;padding: 0;margin: 0;} 2 .davsy-main-widget .davsy-widget li {width: 48.8 0%; font-size: 0;display: inline-block;text-align: center;margin-bottom: 10px;2 .davsy-main-widget .davsy-widget li {width: 48.8%; font-size: 0; overflow: hidden;display: inline-block;text-align: center;margin-bottom: 10px; 3 3 margin-right: 10px; vertical-align: top;-webkit-box-shadow: 1px 4px 5px 1px rgba(0,0,0,0.35); 4 4 -moz-box-shadow: 1px 4px 5px 1px rgba(0,0,0,0.35); … … 6 6 .davsy-main-widget .davsy-widget li a{display:inline-block;} 7 7 .davsy-main-widget .davsy-widget li a img {max-width: 100%;} 8 .davsy-main-widget .davsy-widget li a span {display: inline-block;margin: 10px 0; padding: 0 6px; color: #000;font-size: 15px;}8 .davsy-main-widget .davsy-widget li a span {display: inline-block;margin: 10px 0; line-height: 20px;padding: 0 6px; color: #000;font-size: 15px; font-weight: 600;} 9 9 .davsy-main-widget.davsy-col-1 .davsy-widget li{ margin-right: 0px;} 10 10 .davsy-main-widget .davsy-widget li:nth-child(2n+2){ margin-right: 0px; } … … 25 25 box-shadow: 1px 4px 5px 1px rgba(0,0,0,0.35);} 26 26 @media(min-width: 479px) and (max-width: 900px){ 27 .bb-col.col- davsy_sidebar{ width: 100%; }27 .bb-col.col-sidebar{ width: 100%; } 28 28 .davsy_sidebar .widget_davsy_widget .davsy-widget li{width: 48.80%;display: inline-block;text-align: center; 29 29 margin-bottom: 10px;margin-right: 10px; vertical-align: top;} … … 42 42 background-size: cover; 43 43 background-position: top center; 44 min-height: 211px;44 min-height: 190px; 45 45 margin: 0px !important; 46 46 background-repeat: no-repeat; 47 47 overflow: hidden; 48 48 } 49 .davsy-powered ul{padding:0;list-style:none;margin:0;} 50 .powered-text{width:49%;vertical-align:middle;display:inline-block;font-weight: 600;} 51 .powered-logo{width:49%;vertical-align:middle;display:inline-block;background-color:transparent;height:65px;} 52 .powered-logo a img{max-width:100%;} 53 /*.davsy_sidebar .davsy-main-widget .davsy-widget li a { display: inline-block; height: 120px; 54 overflow: hidden;} 55 .davsy_sidebar .davsy-main-widget .davsy-widget li a span {width: 45%;vertical-align: top; 56 } 57 .davsy_sidebar .davsy-main-widget .davsy-widget li a span.davsy-img-block {width: 47.6%; vertical-align: top;}*/ -
davsy/trunk/davsy.php
r1915087 r1918433 160 160 <td colspan="2"> 161 161 <?php echo esc_html__( 'Get your website key from your Davsy', 'wp-davsy' ); ?> 162 <a href="http ://app.davsy.com/" target="_blank"> dashboard</a><br>162 <a href="https://app.davsy.com/" target="_blank"> dashboard</a><br> 163 163 164 164 Don't have an account yet? Sign up for one 165 <a href="http ://app.davsy.com/register" target="_blank">here</a>165 <a href="https://app.davsy.com/register" target="_blank">here</a> 166 166 </td> 167 167 </tr> … … 180 180 </td> 181 181 </tr> 182 <tr>183 <th><?php echo esc_html__( 'Number Of Posts', 'wp-davsy' ); ?></th>184 <td>185 <select style="width:80%" name="davsy_no_post">186 <option <?=$davsy_no_post == '1' ? 'selected="selected"' : ''; ?> value="1"> 1 </option>187 <option <?= $davsy_no_post == '2' ? 'selected="selected"' : ''; ?> value='2'> 2 </option>188 <option <?= $davsy_no_post == '4' ? 'selected="selected"' : ''; ?> value='4'> 4 </option>189 <option <?= $davsy_no_post == '6' ? 'selected="selected"' : ''; ?> value='6'> 6 </option>190 <option <?= $davsy_no_post == '8' ? 'selected="selected"' : ''; ?> value='8'> 8 </option>191 </select>192 193 194 195 </td>196 </tr>197 198 182 <tr> 199 183 <td><p class="submit"><input type="submit" name="submit" id="wp_davsy_submit" class="button button-primary" value="Submit"></p></td> … … 231 215 $davsy_header_title=trim( get_option('davsy_header_title')); 232 216 $davsy_api_key=trim( get_option('davsy_api_key') ); 233 $davsy_no_post=trim( get_option('davsy_no_post') ); 234 $no_post=isset($davsy_no_post)?$davsy_no_post:'1'; 217 $no_post=4; 235 218 236 219 if(!empty($davsy_api_key) && strlen($davsy_api_key)>='17'){ … … 257 240 Wp_Davsy_API::updateDavsyPostsviewCount(json_encode($pids)); 258 241 $davsy_obj .= "</ul>"; 242 $davsy_obj .= "<div class='davsy-powered'><ul><li class='powered-text'><span>Powered By: </span></li><li class='powered-logo'><a href='https://davsy.com/' target='_blank'><img src='https://app.davsy.com:443/assets/images/davsy-logo.png'></a></li></ul></div>"; 259 243 $davsy_obj .= "</div>"; 260 244 }else{ -
davsy/trunk/includes/class-davsy-widget.php
r1917056 r1918433 35 35 echo $args['before_widget']; 36 36 37 $no_post= $instance['no_post'];37 $no_post=4; 38 38 $davsy_header_title=$instance['header']; 39 39 $davsy_api_key=trim( get_option('davsy_api_key') ); 40 41 42 $no_post=isset($no_post)?$no_post:'1';43 40 44 41 if(!empty($davsy_api_key) && strlen($davsy_api_key)>='17'){ … … 68 65 Wp_Davsy_API::updateDavsyPostsviewCount(json_encode($pids)); 69 66 echo "</ul>"; 67 echo "<div class='davsy-powered'><ul><li class='powered-text'><span>Powered By: </span></li><li class='powered-logo'><a href='https://davsy.com/' target='_blank'><img src='https://app.davsy.com:443/assets/images/davsy-logo.png'></a></li></ul></div>"; 70 68 echo "</div>"; 71 69 }else{ … … 91 89 public function form( $instance ) { 92 90 $header = ! empty( $instance['header'] ) ? $instance['header'] : esc_html__( 'Partner Posts', 'wp-davsy'); 93 $no_post = ! empty( $instance['no_post'] ) ? $instance['no_post'] : esc_html__(4, 'wp-davsy' );91 $no_post = 4; 94 92 ?> 95 93 … … 99 97 <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'header' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'header' ) ); ?>" type="text" value="<?php echo esc_attr( $header ); ?>"> 100 98 </p> 101 <p> 102 <label for="<?php echo esc_attr( $this->get_field_id( 'no_post' ) ); ?>"><?php esc_attr_e( 'Number Of Posts:', 'wp-davsy' ); ?></label> 103 <select id="<?php echo esc_attr( $this->get_field_id( 'no_post' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'no_post' ) ); ?>" class="widefat"> 104 <option <?= esc_attr($no_post) == 1 ? 'selected=selected' : '' ?> value=1> 1 </option> 105 <option <?= esc_attr($no_post) == 2 ? 'selected=selected' : '' ?> value=2> 2 </option> 106 <option <?= esc_attr($no_post) == 4 ? 'selected=selected' : '' ?> value=4> 4 </option> 107 <option <?= esc_attr($no_post) == 6 ? 'selected=selected' : '' ?> value=6> 6 </option> 108 <option <?= esc_attr($no_post) == 8 ? 'selected=selected' : '' ?> value=8> 8 </option> 109 </select> 110 </p> 99 111 100 <?php 112 101 } … … 120 109 $instance = array(); 121 110 $instance['header'] = ( ! empty( $new_instance['header'] ) ) ? sanitize_text_field( $new_instance['header'] ) : ''; 122 $instance['no_post'] = ( ! empty( $new_instance['no_post'] ) ) ? sanitize_text_field( $new_instance['no_post'] ) : '';111 123 112 124 113 return $instance; -
davsy/trunk/includes/class-wp-davsy-api.php
r1912595 r1918433 22 22 $default_args = array( 23 23 'key' => $davsy_api_key, 24 'noofposts' =>' 8',24 'noofposts' =>'4', 25 25 'order' => 'DESC', 26 26 'rand' => 1
Note: See TracChangeset
for help on using the changeset viewer.