Changeset 1933357
- Timestamp:
- 08/30/2018 07:08:50 PM (7 years ago)
- Location:
- wp-newrelic/trunk
- Files:
-
- 3 edited
-
classes/class-wp-nr-apm.php (modified) (4 diffs)
-
newrelic-reporting-for-wordpress.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-newrelic/trunk/classes/class-wp-nr-apm.php
r1867767 r1933357 28 28 add_action( 'admin_init', array( $this, 'set_admin_transaction' ) ); 29 29 } else { 30 add_action( 'pre_get_posts', array( $this, 'sitemap_check' ), 1 ); 30 31 add_action( 'wp', array( $this, 'set_wp_transaction' ) ); 31 32 add_action( 'rest_api_init', array( $this, 'set_wp_transaction' ) ); … … 86 87 if ( is_user_logged_in() ) { 87 88 $user = wp_get_current_user(); 88 newrelic_set_user_attributes( $user->ID, '', array_shift( $user->roles ) ); 89 if ( isset( $user->roles[0] ) ) { 90 newrelic_set_user_attributes( $user->ID, '', $user->roles[0] ); 91 } else { 92 newrelic_set_user_attributes( $user->ID, '', 'no-role' ); 93 } 89 94 } else { 90 95 newrelic_set_user_attributes( 'not-logged-in', '', 'no-role' ); … … 137 142 } elseif ( is_front_page() ) { 138 143 $transaction = 'Front Page'; 139 } elseif ( is_home() ) {144 } elseif ( is_home() && false === get_query_var( 'sitemap', false ) ) { 140 145 $transaction = 'Blog Page'; 141 146 } elseif ( is_single() ) { … … 179 184 180 185 $transaction = apply_filters( 'wp_nr_transaction_name', $transaction ); 186 181 187 if ( ! empty( $transaction ) ) { 182 188 newrelic_name_transaction( $transaction ); 189 } 190 } 191 192 /** 193 * Set current transaction name to Sitemap if it is a sitemap. 194 * 195 * @access public 196 * @action pre_get_posts 197 * 198 * @param WP_Query $query The main query. 199 */ 200 public function sitemap_check( $query ) { 201 // do nothing if function doesn't exist. 202 if ( ! function_exists( 'newrelic_name_transaction' ) ) { 203 return; 204 } 205 206 if ( get_query_var( 'sitemap', false ) ) { 207 newrelic_name_transaction( 'Sitemap' ); 183 208 } 184 209 } -
wp-newrelic/trunk/newrelic-reporting-for-wordpress.php
r1868221 r1933357 4 4 * Plugin Name: New Relic Reporting for WordPress 5 5 * Description: New Relic APM reports for WordPress 6 * Version: 1. 26 * Version: 1.3 7 7 * Author: 10up 8 8 * Author URI: https://10up.com -
wp-newrelic/trunk/readme.txt
r1867767 r1933357 1 1 === New Relic Reporting for WordPress === 2 Contributors: rittesh.patel, tott, 10up 2 Contributors: rittesh.patel, tott, 10up, oscarssanchez 3 3 Tags: New Relic, New Relic Reporting, New Relic APM Reporting, APM Reporting 4 4 Requires at least: 4.0 5 Tested up to: 4.9. 56 Stable tag: 1. 25 Tested up to: 4.9.8 6 Stable tag: 1.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 106 106 == Changelog == 107 107 108 = 1.3 = 109 * Bug fixes with Beaver Builder (props oscarssanchez) 110 * Support for Yoast SEO Sitemaps. 111 112 108 113 = 1.2 = 109 114 * Add support for REST API requests (props Rahe)
Note: See TracChangeset
for help on using the changeset viewer.