new_fb_count(); } else { if ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ], $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ] != '' && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ] != '' ) { $count = $this -> new_fb_count(); } else { $api_url = 'https://www.facebook.com/' . $facebook_page_id; $count = $this -> facebook_count( $api_url ); } } set_transient( 'apsc_facebook', $count, $cache_period ); } else { $count = $facebook_count; } $count = ($count == 0) ? $default_count : $count; if ( $count != 0 ) { set_transient( 'apsc_facebook', $count, $cache_period ); }