Making WordPress.org

Ticket #3003: 3003.2.diff

File 3003.2.diff, 1.8 KB (added by xkon, 8 years ago)

Modified .diff ( instagram addressed already on previous ticket )

  • classes/tggr-source-flickr.php

     
    137137                 * @param string $hashtag
    138138                 */
    139139                public function import_new_items( $hashtag ) {
     140                        if ( empty( TGGRSettings::get_instance()->settings[ __CLASS__ ]['api_key'] )  ){
     141                                return;
     142                        }
    140143                        $media = self::get_new_media(
    141144                                TGGRSettings::get_instance()->settings[ __CLASS__ ]['api_key'],
    142145                                $hashtag,
  • classes/tggr-source-google.php

     
    135135                 * @param string $hashtag
    136136                 */
    137137                public function import_new_items( $hashtag ) {
     138                        if ( empty( TGGRSettings::get_instance()->settings[ __CLASS__ ]['api_key'] )  ){
     139                                return;
     140                        }
    138141                        $activities = self::get_new_activities(
    139142                                TGGRSettings::get_instance()->settings[ __CLASS__ ]['api_key'],
    140143                                $hashtag
  • classes/tggr-source-twitter.php

     
    217217                 * @param string $hashtag
    218218                 */
    219219                public function import_new_items( $hashtag ) {
     220                        if ( empty( TGGRSettings::get_instance()->settings[ __CLASS__ ]['consumer_key'] )
     221                                || empty( TGGRSettings::get_instance()->settings[ __CLASS__ ]['consumer_secret'] )
     222                                || empty( TGGRSettings::get_instance()->settings[ __CLASS__ ]['consumer_key'] ) ){
     223                                return;
     224                        }
     225
    220226                        $tweets = self::get_new_hashtagged_tweets(
    221227                                TGGRSettings::get_instance()->settings[ __CLASS__ ]['_bearer_token'],
    222228                                $hashtag,