Changeset 761345
- Timestamp:
- 08/23/2013 04:39:12 PM (13 years ago)
- Location:
- evergreen-post-tweeter/trunk
- Files:
-
- 9 edited
-
Include/ept-debug.php (modified) (1 diff)
-
countdown/ept-app.js (modified) (1 diff)
-
ept-admin.php (modified) (8 diffs)
-
ept-core.php (modified) (4 diffs)
-
evergreen.php (modified) (6 diffs)
-
readme.txt (modified) (3 diffs)
-
screenshot-1.jpg (modified) (previous)
-
screenshot-2.jpg (modified) (previous)
-
screenshot-3.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
evergreen-post-tweeter/trunk/Include/ept-debug.php
r748326 r761345 3 3 function EPT_DEBUG( $str ) { 4 4 global $ept_debug; 5 $ept_enable_log = get_option('ept_enable_log');6 if($ept_enable_log)7 {8 $ept_debug->enable(true);9 }5 $ept_enable_log = get_option('ept_enable_log'); 6 if($ept_enable_log) 7 { 8 $ept_debug->enable(true); 9 } 10 10 11 11 $ept_debug->add_to_log( $str ); -
evergreen-post-tweeter/trunk/countdown/ept-app.js
r698835 r761345 1 1 jQuery(document).ready(function($) { 2 var untilDay = new Date(nextTweetTime * 1000);2 var untilDay = new Date(nextTweetTime.tweetTime * 1000); 3 3 $('#defaultCountdown').countdown({until: untilDay , format: 'HMS'}); 4 4 }); -
evergreen-post-tweeter/trunk/ept-admin.php
r756431 r761345 10 10 //check permission 11 11 if (current_user_can('manage_options')) 12 {12 { 13 13 $message = null; 14 14 $message_updated = __("Evergreen Post Tweeter options have been updated!", 'Evergreen'); 15 $ept_after_update = get_option( 'ept_after_update' ); 16 if ( $ept_after_update ) { 17 print(' 18 <div id="message" class="updated fade"> 19 <p>' . __('Evergreen Post Tweeter Options Updated.', 'Evergreen') . '</p> 20 </div>'); 21 update_option( 'ept_after_update', false ); 22 } 15 23 $response = null; 16 24 $save = true; … … 91 99 } 92 100 93 94 if ( get_option('next_tweet_time')=='0' ){95 $next_tweet_time = ept_determine_next_update();96 update_option('next_tweet_time', $next_tweet_time);97 }98 99 101 //if submit and if bitly selected its fields are filled then save 100 102 if (isset($_POST['submit']) && $save) { 101 103 $message = $message_updated; 102 104 103 105 // 104 106 if (isset($_POST['as_number_tweet'])) { … … 229 231 update_option('ept_opt_hashtags', ''); 230 232 } 231 232 $next_tweet_time = ept_determine_next_update();233 update_option('next_tweet_time', $next_tweet_time);234 233 235 234 //minimum post age to tweet … … 327 326 328 327 // set schedule time - counter 329 if (isset($_POST['ept_opt_schedule_times_counter'])) { 328 if (isset( $_POST['ept_opt_schedule_times_counter'] ) && 329 isset( $_POST['ept_opt_schedule_times_hour'] ) && 330 isset( $_POST['ept_opt_schedule_times_minute'] ) 331 ) { 332 $ept_schedule_times_counter = $_POST['ept_opt_schedule_times_counter']; 333 $ept_schedule_times_hour_array = $_POST['ept_opt_schedule_times_hour']; 334 $ept_schedule_times_minute_array = $_POST['ept_opt_schedule_times_minute']; 335 foreach ($ept_schedule_times_counter as $key => $value) { 336 $timestamp = strtotime($ept_schedule_times_hour_array[$key] . ':' . $ept_schedule_times_minute_array[$key]); 337 $ept_opt_schedule_times[$timestamp]['hour'] = $ept_schedule_times_hour_array[$key]; 338 $ept_opt_schedule_times[$timestamp]['minute'] = $ept_schedule_times_minute_array[$key]; 339 } 340 ksort($ept_opt_schedule_times); 330 341 update_option('ept_opt_schedule_times_counter', $_POST['ept_opt_schedule_times_counter']); 342 update_option('ept_opt_schedule_times', $ept_opt_schedule_times); 331 343 } else { 332 344 update_option('ept_opt_schedule_times_counter', array()); 333 } 334 345 update_option('ept_opt_schedule_times', array()); 346 } 347 348 update_option( 'next_tweet_time', ept_determine_next_update() ); 335 349 // set schedule time - hour 336 350 if (isset($_POST['ept_opt_schedule_times_hour'])) { … … 365 379 } 366 380 381 update_option( 'ept_after_update', true ); 382 383 echo '<script language="javascript">window.open ("' . get_bloginfo('wpurl') . '/wp-admin/options-general.php?page=Evergreen","_self")</script>'; 384 die; 385 367 386 //successful update message 368 print('369 <div id="message" class="updated fade">370 <p>' . __('Evergreen Post Tweeter Options Updated.', 'Evergreen') . '</p>371 </div>');372 387 } 373 388 //tweet now clicked … … 395 410 } 396 411 //set up data into fields from db 397 global $wpdb;412 global $wpdb; 398 413 399 414 $admin_url = site_url('/wp-admin/options-general.php?page=Evergreen'); … … 612 627 } 613 628 614 $ept_opt_schedule_times_hour = get_option( 'ept_opt_schedule_times_hour' ); 615 if (!(isset($ept_opt_schedule_times_hour)) || ! is_array($ept_opt_schedule_times_hour)) { 616 $ept_opt_schedule_times_hour = array(); 617 } 618 619 $ept_opt_schedule_times_minute = get_option( 'ept_opt_schedule_times_minute' ); 620 if (!(isset($ept_opt_schedule_times_minute)) || ! is_array($ept_opt_schedule_times_minute)) { 621 $ept_opt_schedule_times_minute = array(); 629 // $ept_opt_schedule_times_hour = get_option( 'ept_opt_schedule_times_hour' ); 630 // if (!(isset($ept_opt_schedule_times_hour)) || ! is_array($ept_opt_schedule_times_hour)) { 631 // $ept_opt_schedule_times_hour = array(); 632 // } 633 634 // $ept_opt_schedule_times_minute = get_option( 'ept_opt_schedule_times_minute' ); 635 // if (!(isset($ept_opt_schedule_times_minute)) || ! is_array($ept_opt_schedule_times_minute)) { 636 // $ept_opt_schedule_times_minute = array(); 637 // } 638 639 $ept_opt_schedule_times = get_option( 'ept_opt_schedule_times' ); 640 if (!(isset($ept_opt_schedule_times)) || ! is_array($ept_opt_schedule_times)) { 641 $ept_opt_schedule_times = array(); 642 } 643 644 foreach ($ept_opt_schedule_times as $key => $value) { 645 // echo var_dump($value); 646 $ept_opt_schedule_times_hour[] = $value['hour']; 647 $ept_opt_schedule_times_minute[] = $value['minute']; 622 648 } 623 649 … … 799 825 <div style="clear: left;"></div> 800 826 <label></label> 801 <div>Tweet at these times on <span id="scheduled-days"></span>< div>827 <div>Tweet at these times on <span id="scheduled-days"></span></div> 802 828 <div style="clear: left;"></div> 803 829 <label></label> -
evergreen-post-tweeter/trunk/ept-core.php
r756431 r761345 131 131 132 132 function ept_tweet_old_post() { 133 //check last tweet time against set interval and span134 //also check if it isn't in pause time135 // if (ept_opt_update_time() && ! ept_in_pause_time()) {136 // update_option('ept_opt_last_update', current_time('timestamp', 0));137 // ept_opt_tweet_old_post();138 // }139 140 // if ( ept_opt_update_time() ) {141 // update_option('ept_opt_last_update', current_time('timestamp', 0));142 // ept_opt_tweet_old_post();143 // }144 133 //check last tweet time against set interval and span 134 //also check if it isn't in pause time 135 // if (ept_opt_update_time() && ! ept_in_pause_time()) { 136 // update_option('ept_opt_last_update', current_time('timestamp', 0)); 137 // ept_opt_tweet_old_post(); 138 // } 139 140 // if ( ept_opt_update_time() ) { 141 // update_option('ept_opt_last_update', current_time('timestamp', 0)); 142 // ept_opt_tweet_old_post(); 143 // } 144 145 145 if ( ept_check_day_update() && ept_new_to_update() ) { 146 146 update_option('ept_opt_last_update', current_time('timestamp', 0)); 147 147 ept_opt_tweet_old_post(); 148 148 } 149 } 150 149 update_option( 'next_tweet_time', ept_determine_next_update() ); 150 } 151 152 function ept_new_to_update() 153 { 154 global $wpdb; 155 $last = $wpdb->get_var("select SQL_NO_CACHE option_value from $wpdb->options where option_name = 'ept_opt_last_update';"); 156 157 $ept_opt_schedule_times_counter = get_option( 'ept_opt_schedule_times_counter' ); 158 if (!(isset($ept_opt_schedule_times_counter)) || ! is_array($ept_opt_schedule_times_counter)) { 159 $ept_opt_schedule_times_counter = array(); 160 } 161 162 $ept_opt_schedule_times = get_option( 'ept_opt_schedule_times' ); 163 if (!(isset($ept_opt_schedule_times)) || ! is_array($ept_opt_schedule_times)) { 164 $ept_opt_schedule_times = array(); 165 } 166 ksort( $ept_opt_schedule_times ); 167 168 // $ept_opt_schedule_times_hour = get_option( 'ept_opt_schedule_times_hour' ); 169 // if (!(isset($ept_opt_schedule_times_hour)) || ! is_array($ept_opt_schedule_times_hour)) { 170 // $ept_opt_schedule_times_hour = array(); 171 // } 172 173 // $ept_opt_schedule_times_minute = get_option( 'ept_opt_schedule_times_minute' ); 174 // if (!(isset($ept_opt_schedule_times_minute)) || ! is_array($ept_opt_schedule_times_minute)) { 175 // $ept_opt_schedule_times_minute = array(); 176 // } 177 178 $ret = false; 179 if ( ! empty( $ept_opt_schedule_times ) ) { 180 $last_element = array_pop( array_keys( $ept_opt_schedule_times ) ); 181 } 182 $previous_time = null; 183 184 foreach ( $ept_opt_schedule_times as $key => $time ) { 185 $ept_time_start = strtotime($time['hour'] . ':' . $time['minute'], current_time('timestamp', 0)); 186 187 // echo var_dump( $last ) . "\n"; 188 // echo var_dump( $previous_time ) . "\n"; 189 // echo var_dump( $ept_time_start ) . "\n"; 190 191 if ( $key == $last_element ) { 192 $midnight_time = strtotime("23:59:59", current_time('timestamp', 0)); 193 194 if ( 195 $ept_time_start < (Integer)current_time('timestamp', 0) && 196 (Integer)current_time('timestamp', 0) < $midnight_time && 197 ( ! ( $ept_time_start < (Integer)$last && (Integer)$last < $midnight_time ) ) 198 ) { 199 $ret = true; 200 break; 201 } 202 } 203 204 if ( 205 $previous_time < (Integer)current_time('timestamp', 0) && 206 (Integer)current_time('timestamp', 0) < $ept_time_start && 207 ( ! ( $previous_time < (Integer)$last && (Integer)$last < $ept_time_start ) ) 208 ) { 209 $ret = true; 210 break; 211 } 212 213 $previous_time = $ept_time_start; 214 } 215 216 return $ret; 217 } 218 219 function ept_determine_next_update() 220 { 221 $ept_opt_schedule_times_counter = get_option( 'ept_opt_schedule_times_counter' ); 222 if (!(isset($ept_opt_schedule_times_counter)) || ! is_array($ept_opt_schedule_times_counter)) { 223 $ept_opt_schedule_times_counter = array(); 224 } 225 226 // $ept_opt_schedule_times = get_option( 'ept_opt_schedule_times' ); 227 // if (!(isset($ept_opt_schedule_times)) || ! is_array($ept_opt_schedule_times)) { 228 // $ept_opt_schedule_times = array(); 229 // } 230 231 // $ept_opt_schedule_times_hour = get_option( 'ept_opt_schedule_times_hour' ); 232 // if (!(isset($ept_opt_schedule_times_hour)) || ! is_array($ept_opt_schedule_times_hour)) { 233 // $ept_opt_schedule_times_hour = array(); 234 // } 235 236 // $ept_opt_schedule_times_minute = get_option( 'ept_opt_schedule_times_minute' ); 237 // if (!(isset($ept_opt_schedule_times_minute)) || ! is_array($ept_opt_schedule_times_minute)) { 238 // $ept_opt_schedule_times_minute = array(); 239 // } 240 241 $ept_opt_schedule_times = get_option( 'ept_opt_schedule_times' ); 242 if (!(isset($ept_opt_schedule_times)) || ! is_array($ept_opt_schedule_times)) { 243 $ept_opt_schedule_times = array(); 244 } 245 ksort( $ept_opt_schedule_times ); 246 247 $ept_times = array(); 248 $last_element = array_pop( array_keys( $ept_opt_schedule_times ) ); 249 $first_element = array_shift( array_keys( $ept_opt_schedule_times ) ); 250 251 foreach ($ept_opt_schedule_times as $key => $time) { 252 $ept_time_start = strtotime($time['hour'] . ':' . $time['minute'], current_time('timestamp', 0)); 253 254 if ( $key != $last_element ) { 255 $remaining_time = $ept_time_start - current_time( 'timestamp', 0 ); 256 } else { 257 if ( current_time('timestamp', 0) > $ept_time_start ) { 258 $ept_time_tomorrow = strtotime( 259 $ept_opt_schedule_times[$first_element]['hour'] . ':' . $ept_opt_schedule_times[$first_element]['minute'], 260 current_time( 'timestamp', 0 ) 261 ); 262 $ept_time_tomorrow += (24 * 60 *60); 263 // echo var_dump(); 264 $remaining_time = $ept_time_tomorrow - current_time( 'timestamp', 0 ); 265 } else { 266 $remaining_time = $ept_time_start - current_time( 'timestamp', 0 ); 267 } 268 } 269 if ( 0 < $remaining_time ) { 270 $ept_times[] = $remaining_time; 271 } 272 } 273 274 if ( empty($ept_times) ) { 275 return 0; 276 } 277 278 return (Integer)(time() + $ept_times[min(array_keys($ept_times, min($ept_times)))]); 279 } 280 281 function ept_check_day_update() 282 { 283 $current_day = date( 'N', current_time('timestamp', 0) ); 284 $ept_opt_schedule_day_mon = get_option('ept_opt_schedule_day_mon'); 285 $ept_opt_schedule_day_tue = get_option('ept_opt_schedule_day_tue'); 286 $ept_opt_schedule_day_wed = get_option('ept_opt_schedule_day_wed'); 287 $ept_opt_schedule_day_thu = get_option('ept_opt_schedule_day_thu'); 288 $ept_opt_schedule_day_fri = get_option('ept_opt_schedule_day_fri'); 289 $ept_opt_schedule_day_sat = get_option('ept_opt_schedule_day_sat'); 290 $ept_opt_schedule_day_sun = get_option('ept_opt_schedule_day_sun'); 291 $ret = false; 292 293 if ($current_day == $ept_opt_schedule_day_mon) { 294 $ret = true; 295 } else if ($current_day == $ept_opt_schedule_day_tue) { 296 $ret = true; 297 } else if ($current_day == $ept_opt_schedule_day_wed) { 298 $ret = true; 299 } else if ($current_day == $ept_opt_schedule_day_thu) { 300 $ret = true; 301 } else if ($current_day == $ept_opt_schedule_day_fri) { 302 $ret = true; 303 } else if ($current_day == $ept_opt_schedule_day_sat) { 304 $ret = true; 305 } else if ($current_day == $ept_opt_schedule_day_sun) { 306 $ret = true; 307 } 308 309 return $ret; 310 } 151 311 152 312 function ept_currentPageURL() { … … 291 451 ept_w3tc_cache_flush(); 292 452 293 $next_tweet_time = ept_determine_next_update(); 294 update_option('next_tweet_time', $next_tweet_time); 453 update_option( 'next_tweet_time', ept_determine_next_update() ); 295 454 296 455 return $ret; … … 540 699 $tags = $twitter_hashtags; 541 700 $message_length = strlen($message); 542 $url_length = strlen($url);701 $url_length = preg_match("@^https?://@", $url) ? 23 : 22; 543 702 //$cur_length = strlen($tags); 544 703 if ($hashtag_length == 0) … … 574 733 575 734 ept_w3tc_cache_flush(); 576 577 function ept_new_to_update()578 {579 global $wpdb;580 $last = $wpdb->get_var("select SQL_NO_CACHE option_value from $wpdb->options where option_name = 'ept_opt_last_update';");581 582 $ept_opt_schedule_times_counter = get_option( 'ept_opt_schedule_times_counter' );583 if (!(isset($ept_opt_schedule_times_counter)) || ! is_array($ept_opt_schedule_times_counter)) {584 $ept_opt_schedule_times_counter = array();585 }586 587 $ept_opt_schedule_times_hour = get_option( 'ept_opt_schedule_times_hour' );588 if (!(isset($ept_opt_schedule_times_hour)) || ! is_array($ept_opt_schedule_times_hour)) {589 $ept_opt_schedule_times_hour = array();590 }591 592 $ept_opt_schedule_times_minute = get_option( 'ept_opt_schedule_times_minute' );593 if (!(isset($ept_opt_schedule_times_minute)) || ! is_array($ept_opt_schedule_times_minute)) {594 $ept_opt_schedule_times_minute = array();595 }596 597 $ret = false;598 599 600 foreach ($ept_opt_schedule_times_counter as $key => $time) {601 $ept_time_start = strtotime($ept_opt_schedule_times_hour[$key] . ':' . $ept_opt_schedule_times_minute[$key]);602 $ept_time_end = $ept_time_start + (60 * 10);603 if (604 $ept_time_start < current_time('timestamp', 0) &&605 current_time('timestamp', 0) < $ept_time_end &&606 ( ! ( $ept_time_start < $last && $last < $ept_time_end ) )607 ) {608 $ret = true;609 break;610 }611 }612 613 return $ret;614 }615 616 function ept_determine_next_update()617 {618 $ept_opt_schedule_times_counter = get_option( 'ept_opt_schedule_times_counter' );619 if (!(isset($ept_opt_schedule_times_counter)) || ! is_array($ept_opt_schedule_times_counter)) {620 $ept_opt_schedule_times_counter = array();621 }622 623 $ept_opt_schedule_times_hour = get_option( 'ept_opt_schedule_times_hour' );624 if (!(isset($ept_opt_schedule_times_hour)) || ! is_array($ept_opt_schedule_times_hour)) {625 $ept_opt_schedule_times_hour = array();626 }627 628 $ept_opt_schedule_times_minute = get_option( 'ept_opt_schedule_times_minute' );629 if (!(isset($ept_opt_schedule_times_minute)) || ! is_array($ept_opt_schedule_times_minute)) {630 $ept_opt_schedule_times_minute = array();631 }632 633 $ept_times = array();634 635 foreach ($ept_opt_schedule_times_counter as $key => $value) {636 637 $ept_time_start = strtotime($ept_opt_schedule_times_hour[$key] . ':' . $ept_opt_schedule_times_minute[$key], current_time('timestamp', 0));638 $remaining_time = $ept_time_start - current_time('timestamp', 0);639 if ( 0 < $remaining_time ) {640 $ept_times[] = $remaining_time;641 }642 }643 644 // return $ept_times;645 646 if ( empty($ept_times) ) {647 return 0;648 }649 650 return (Integer)(time() + $ept_times[min(array_keys($ept_times, min($ept_times)))]);651 }652 653 function ept_check_day_update()654 {655 $current_day = date( 'N', current_time('timestamp', 0) );656 $ept_opt_schedule_day_mon = get_option('ept_opt_schedule_day_mon');657 $ept_opt_schedule_day_tue = get_option('ept_opt_schedule_day_tue');658 $ept_opt_schedule_day_wed = get_option('ept_opt_schedule_day_wed');659 $ept_opt_schedule_day_thu = get_option('ept_opt_schedule_day_thu');660 $ept_opt_schedule_day_fri = get_option('ept_opt_schedule_day_fri');661 $ept_opt_schedule_day_sat = get_option('ept_opt_schedule_day_sat');662 $ept_opt_schedule_day_sun = get_option('ept_opt_schedule_day_sun');663 $ret = false;664 665 if ($current_day == $ept_opt_schedule_day_mon) {666 $ret = true;667 } else if ($current_day == $ept_opt_schedule_day_tue) {668 $ret = true;669 } else if ($current_day == $ept_opt_schedule_day_wed) {670 $ret = true;671 } else if ($current_day == $ept_opt_schedule_day_thu) {672 $ret = true;673 } else if ($current_day == $ept_opt_schedule_day_fri) {674 $ret = true;675 } else if ($current_day == $ept_opt_schedule_day_sat) {676 $ret = true;677 } else if ($current_day == $ept_opt_schedule_day_sun) {678 $ret = true;679 }680 681 return $ret;682 }683 735 684 736 function ept_to_update() { -
evergreen-post-tweeter/trunk/evergreen.php
r757575 r761345 5 5 Description: Evergreen Post Tweeter enables you to automatically tweet out links to old posts based upon a tag or tags. 6 6 Author: Tom Ewer 7 Version: 1.8. 17 Version: 1.8.2 8 8 Author URI: http://www.leavingworkbehind.com/about-me/ 9 9 */ … … 27 27 function ept_admin_notice() { 28 28 global $current_user ; 29 $user_id = $current_user->ID;30 /* Check that the user hasn't already clicked to ignore the message */29 $user_id = $current_user->ID; 30 /* Check that the user hasn't already clicked to ignore the message */ 31 31 if ( ! get_user_meta($user_id, 'ept_ignore_notice') ) { 32 32 echo '<div class="updated"><p>'; 33 33 printf( __('Evergreen Post Tweeter has been upgraded with a brand new scheduling feature. You need to set a new schedule via the settings screen before tweets will be published. ') ); 34 34 echo "</p><p>"; 35 printf( __('<a href="%s">Go to EPT Setting Page</a> or <a href="%1$s">Hide Notice</a>'), site_url('/wp-admin/options-general.php?page=Evergreen'), '?ept_nag_ignore=0' );35 printf( __('<a class="button" href="%1$s">Go to EPT Settings Page</a> or <a class="button" href="%2$s">Hide Notice</a>'), site_url('/wp-admin/options-general.php?page=Evergreen'), '?ept_nag_ignore=0' ); 36 36 echo "</p></div>"; 37 37 } … … 42 42 function ept_nag_ignore() { 43 43 global $current_user; 44 $user_id = $current_user->ID; 45 /* If user clicks to ignore the notice, add that to their user meta */ 46 if ( isset($_GET['ept_nag_ignore']) && '0' == $_GET['ept_nag_ignore'] ) { 47 add_user_meta($user_id, 'ept_ignore_notice', 'true', true); 44 $user_id = $current_user->ID; 45 /* If user clicks to ignore the notice, add that to their user meta */ 46 if ( isset($_GET['ept_nag_ignore']) && '0' == $_GET['ept_nag_ignore'] ) { 47 add_user_meta($user_id, 'ept_ignore_notice', 'true', true); 48 wp_redirect( site_url('/wp-admin/options-general.php?page=Evergreen'), '302' ); 48 49 } 49 50 } … … 64 65 /* Link our already registered script to a page */ 65 66 wp_enqueue_script( 'ept_plugin_script_countdown' ); 66 wp_enqueue_script( 'ept_plugin_script_app', plugins_url( 'countdown/ept-app.js', __FILE__), array( 'jquery', 'ept_plugin_script_countdown' ) );67 wp_enqueue_script( 'ept_plugin_script_app', plugins_url( 'countdown/ept-app.js', __FILE__), array( 'jquery', 'ept_plugin_script_countdown' ), 1, true ); 67 68 wp_enqueue_script( 'ept_plugin_application', plugins_url( 'js/application.js', __FILE__ ), array( 'jquery' ) ); 68 $next_tweet_time = get_option('next_tweet_time') ;69 wp_localize_script( 'ept_plugin_script_app', 'nextTweetTime', $next_tweet_time);69 $next_tweet_time = get_option('next_tweet_time'); 70 wp_localize_script( 'ept_plugin_script_app', 'nextTweetTime', array('tweetTime' => $next_tweet_time) ); 70 71 } 71 72 … … 108 109 "ept_admin" 109 110 ); 110 add_action('admin_print_scripts-' . $page_hook_suffix, 'ept_admin_scripts');111 } 111 // add_action('admin_print_scripts-' . $page_hook_suffix, 'ept_admin_scripts'); 112 } 112 113 113 114 add_action('admin_menu', 'ept_admin_actions'); … … 115 116 add_action('init','ept_tweet_old_post'); 116 117 add_action('admin_init','ept_authorize',1); 118 add_action( 'admin_enqueue_scripts', 'ept_enqueue' ); 119 120 function ept_enqueue( $hook ) 121 { 122 if ( 'settings_page_Evergreen' != $hook ) { 123 return; 124 } 125 126 ept_admin_scripts(); 127 } 117 128 118 129 function ept_authorize() -
evergreen-post-tweeter/trunk/readme.txt
r757575 r761345 6 6 Requires at least: 3.5 7 7 Tested up to: 3.6 8 Stable tag: 1.8. 18 Stable tag: 1.8.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Evergreen Post Tweeter enables you to automatically tweet out links to old posts based upon a tag or tags.12 Evergreen Post Tweeter enables you to schedule and automatically tweet out links to old posts. 13 13 14 14 == Description == 15 15 16 Evergreen Post Tweeter enables you to automatically and periodically tweet out links to old posts based upon a tag or tags. 17 18 Rather than tweet out any and all of your old posts, Evergreen Post Tweeter enables you to selectively tweet out only those posts that are still relevant and "evergreen." Just create a custom tag for all of your best posts (like "Evergreen"), enable the plugin to tweet out posts with that tag and Evergreen Post Tweeter will do the rest! 16 Evergreen Post Tweeter enables you to schedule and automatically tweet out links to old posts. 19 17 20 18 Your Twitter followers will thank you for exposing them to more of your great content and you will get even more traffic to your site! I recently boosted Twitter referrals to my site by approximately 250% with Evergreen Post Tweeter. Enjoy! 21 19 22 20 Features: 23 21 - Schedule by day and time, just like Buffer 24 22 - Tweet out posts and/or pages 23 - Filter posts to be tweeted by category and/or tag 24 - Filter posts by age 25 25 - Add additional text to the tweet 26 26 - Choose from a selection of URL shorteners 27 - Set the time between each tweet28 - Set minimum/maximum post ages29 - Select multiple tags for inclusion30 27 31 28 If you have any comments or questions you can find me on Twitter @tomewer! … … 51 48 52 49 1. Basic options for the tweets that will be published. 53 2. Additional variables you can set for your tweets .54 3. The t ag selectionarea.50 2. Additional variables you can set for your tweets + category/tag selectors. 51 3. The tweet scheduling area. 55 52 56 53 == Upgrade Notice == 54 55 = 1.8.2 = 56 * Fix bug on new scheduling feature 57 57 58 58 = 1.8.1 = … … 103 103 == Changelog == 104 104 105 = 1.8.2 = 106 * Fix bug on new scheduling feature 107 105 108 = 1.8.1 = 106 109 * Add admin notice for plugin upgrade
Note: See TracChangeset
for help on using the changeset viewer.