Changeset 842838
- Timestamp:
- 01/22/2014 05:08:07 AM (12 years ago)
- Location:
- getsocial/trunk
- Files:
-
- 7 edited
-
getsocial.php (modified) (26 diffs)
-
readme.txt (modified) (1 diff)
-
screenshot-1.jpg (modified) (previous)
-
screenshot-2.jpg (modified) (previous)
-
screenshot-3.jpg (modified) (previous)
-
screenshot-4.jpg (modified) (previous)
-
settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
getsocial/trunk/getsocial.php
r841815 r842838 5 5 Description: GetSocial adds an intelligent, lightweight, quick to setup floating social media sharing box on your blog posts. 6 6 Author: Riyaz 7 Version: 2.0 7 Version: 2.0.1 8 8 Author URI: http://www.riyaz.net 9 9 License: GPL2 … … 63 63 64 64 function GetSocial() { 65 return $this-> __construct();66 } 67 68 function __construct() {65 return $this->gs_construct(); 66 } 67 68 function gs_construct() { 69 69 $this->define_constants(); 70 70 $this->add_actions(); … … 107 107 add_action( 'save_post', array( $this, 'save_inpost_meta' ) ); 108 108 109 add_action( 'admin_notices', array( $this, 'show_admin_notice' ) );109 // add_action( 'admin_notices', array( $this, 'show_admin_notice' ) ); 110 110 } 111 111 … … 179 179 180 180 function add_admin_css_styles() { 181 if ( (is_admin() && $_GET[ 'page' ] == 'getsocial/getsocial.php' ) ) {181 if ( (is_admin() && isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'getsocial/getsocial.php' ) ) { 182 182 wp_deregister_style( 'farbtastic' ); 183 183 wp_register_style( 'farbtastic', GETSOCIAL_LIB_URL . 'farbtastic.css' ); … … 190 190 191 191 function add_admin_scripts() { 192 if ( (is_admin() && $_GET[ 'page' ] == 'getsocial/getsocial.php' ) ) {192 if ( (is_admin() && isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'getsocial/getsocial.php' ) ) { 193 193 194 194 wp_deregister_script( 'jquery' ); … … 537 537 function gs_get_page_url() { 538 538 $pageURL = 'http'; 539 if ( $_SERVER[ "HTTPS" ] == "on") {539 if ( isset( $_SERVER[ "HTTPS" ] ) && "on" == $_SERVER[ "HTTPS" ] ) { 540 540 $pageURL .= "s"; 541 541 } … … 578 578 } 579 579 if ( $context == 'options' ) { 580 ?> 581 <li class="ui-state-default" id="rtw"> 580 ?><li class="ui-state-default" id="rtw"> 582 581 <div class="sortth">Twitter Tweet Button</div> 583 582 <div class="sorttd"><div id="radio-tc"> … … 600 599 ?> /><label for="gsthide">Hide</label> 601 600 </div></div> 602 </li> 603 <?php 601 </li><?php 604 602 } 605 603 break; … … 613 611 } 614 612 if ( $context == 'options' ) { 615 ?> 616 <li class="ui-state-default" id="rbf"> 613 ?><li class="ui-state-default" id="rbf"> 617 614 <div class="sortth">Buffer Button</div> 618 615 <div class="sorttd"><div id="radio-bc"> … … 634 631 ?> /><label for="gsbhide">Hide</label> 635 632 </div></div> 636 </li> 637 <?php 633 </li><?php 638 634 } 639 635 break; … … 680 676 } 681 677 if ( $context == 'options' ) { 682 ?> 683 <li class="ui-state-default" id="rfb"> 678 ?><li class="ui-state-default" id="rfb"> 684 679 <div class="sortth">Facebook Like Button</div> 685 680 <div class="sorttd"><div id="radio-fc"> … … 701 696 ?> /><label for="gsfhide">Hide</label> 702 697 </div></div> 703 </li> 704 <?php 698 </li><?php 705 699 } 706 700 break; … … 715 709 } 716 710 if ( $context == 'options' ) { 717 ?> 718 <li class="ui-state-default" id="rgp"> 711 ?><li class="ui-state-default" id="rgp"> 719 712 <div class="sortth">Google +1 Button</div> 720 713 <div class="sorttd"><div id="radio-gc"> … … 736 729 ?> /><label for="gsghide">Hide</label> 737 730 </div></div> 738 </li> 739 <?php 731 </li><?php 740 732 } 741 733 break; … … 757 749 } 758 750 if ( $context == 'options' ) { 759 ?> 760 <li class="ui-state-default" id="rsu"> 751 ?><li class="ui-state-default" id="rsu"> 761 752 <div class="sortth">StumbleUpon Button</div> 762 753 <div class="sorttd"><div id="radio-sc"> … … 778 769 ?> /><label for="gsshide">Hide</label> 779 770 </div></div> 780 </li> 781 <?php 771 </li><?php 782 772 } 783 773 break; … … 792 782 } 793 783 if ( $context == 'options' ) { 794 ?> 795 <li class="ui-state-default" id="rcu"> 784 ?><li class="ui-state-default" id="rcu"> 796 785 <div class="sortth">CentUp Button</div> 797 786 <div class="sorttd"><div id="radio-dc"> … … 808 797 ?> /><label for="gschide">Hide</label> 809 798 </div></div> 810 </li> 811 <?php 799 </li><?php 812 800 } 813 801 break; … … 824 812 } 825 813 if ( $context == 'options' ) { 826 ?> 827 <li class="ui-state-default" id="rli"> 814 ?><li class="ui-state-default" id="rli"> 828 815 <div class="sortth">LinkedIn Button</div> 829 816 <div class="sorttd"><div id="radio-lc"> … … 845 832 ?> /><label for="gslhide">Hide</label> 846 833 </div></div> 847 </li> 848 <?php 834 </li><?php 849 835 } 850 836 break; … … 863 849 } 864 850 if ( $context == 'options' ) { 865 ?> 866 <li class="ui-state-default" id="rpi"> 851 ?><li class="ui-state-default" id="rpi"> 867 852 <div class="sortth">Pinterest Pin it Button</div> 868 853 <div class="sorttd"><div id="radio-pc"> … … 884 869 ?> /><label for="gsphide">Hide</label> 885 870 </div></div> 886 </li> 887 <?php 871 </li><?php 888 872 } 889 873 break; … … 896 880 } 897 881 if ( $context == 'options' ) { 898 ?> 899 <li class="ui-state-default" id="rab"> 882 ?><li class="ui-state-default" id="rab"> 900 883 <div class="sortth">Additional buttons</div> 901 884 <div class="sorttd"> 902 885 <textarea name="getsocial[main][additional]" id="getsocial_additional" cols="45" rows="5"><?php echo esc_textarea( $main[ 'additional' ] ); ?></textarea> 903 886 </div> 904 </li> 905 <?php 887 </li><?php 906 888 } 907 889 break; … … 913 895 914 896 function show_admin_notice() { 897 if ( !isset( $_GET[ 'gsmsg' ] ) ) { 898 return; 899 } 900 915 901 if ( 'dismiss' == $_GET[ 'gsmsg' ] ) { 916 902 update_option( 'getsocial_show_remote_massage', 'dismiss' ); … … 964 950 break; 965 951 default: 966 trigger_error( "invalid hex length ($len). must be (3) or (6)", e_user_error );952 $color = 'FFFFFF'; 967 953 } 968 954 969 955 if ( !preg_match( '/[a-f0-9]{6}/i', $color ) ) { 970 $color = htmlentities( $color ); 971 trigger_error( "invalid hex string #$color", e_user_error ); 956 $color = htmlentities( 'FFFFFF' ); 972 957 } 973 958 … … 1003 988 if ( class_exists( "GetSocial" ) ) { 1004 989 $gs = new GetSocial(); 1005 register_activation_hook( __FILE__, array( 'GetSocial', 'activate' ) ); 1006 register_deactivation_hook( __FILE__, array( 'GetSocial', 'deactivate' ) ); 1007 add_action( 'plugins_loaded', array( &$gs, 'update_db_table_structure_if_needed' ) ); 990 // add_action( 'plugins_loaded', array( &$gs, 'update_db_table_structure_if_needed' ) ); 1008 991 } -
getsocial/trunk/readme.txt
r841815 r842838 101 101 102 102 == Changelog == 103 = 2.0.1 = 104 * Minor bug fixes 105 103 106 = 2.0 = 104 107 * Plugin rewritten in object-oriented style 105 108 * Added support for CentUp button 109 * Hides itself on tablet and mobile screens 106 110 * Minor bug fixes 107 111 * Tested compatibility with WordPress 3.8 -
getsocial/trunk/settings.php
r841815 r842838 12 12 $("#sortable").disableSelection(); 13 13 }); 14 </script> 15 <?php 14 </script><?php 16 15 global $wp_query; 17 16 $messages = get_transient( $this->_getsocial_settings_transient ); … … 28 27 } 29 28 ?> 30 <form method="post" action="<?php echo add_query_arg( array( ) ); ?>" name="gsopt"> 31 <?php 29 <form method="post" action="<?php echo add_query_arg( array( ) ); ?>" name="gsopt"><?php 32 30 settings_fields( 'getsocial-settings-group' ); 33 31 wp_nonce_field( 'save-getsocial-settings', 'save-getsocial-settings-nonce' ); … … 51 49 <input type="hidden" name="order" id="order" value=""/> 52 50 <div class="dragtitle">Simply drag and drop the boxes below to re-order the buttons on GetSocial bar.</div> 53 <ul id="sortable" class="gstleft"> 54 <?php 51 <ul id="sortable" class="gstleft"><?php 55 52 $order = esc_attr( $main[ 'order' ] ); 56 53 $order = trim( $order, ',' );
Note: See TracChangeset
for help on using the changeset viewer.