Facebook
From Aqua Pheasant, 2 Years ago, written in PHP.
Embed
Download Paste or View Raw
Hits: 285
  1. /**
  2.  * Performance enhancements for Oxygen builder that are very for those
  3.  * with large databases. Only do if you are comfortable with editing PHP.
  4.  */
  5.  
  6.  
  7. /**
  8.  * Change lines 1085 to 1107 of /wp-content/plugins/oxygen/component-framework/component-init.php to this:
  9.  */
  10.  
  11.         $query = "
  12.         SELECT DISTINCT($wpdb->postmeta.meta_key)
  13.                 FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key NOT LIKE '\_%';
  14.         ";
  15.  
  16.         $meta = $wpdb->get_results($query);
  17.  
  18.         if( is_array( $meta ) ) {
  19.  
  20.                 function oxygen_return_meta_keys( $val ) {
  21.                         return $val->meta_key;
  22.                 }
  23.  
  24.                 $oxygen_meta_keys = array_map( 'oxygen_return_meta_keys', $meta );
  25.  
  26.         }
  27.    
  28. /**
  29.  * Change line 3854 in /wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php
  30.  * to this.
  31.  */
  32.  
  33.  $authors = get_users( array( 'who' => 'authors', 'has_published_posts' => true ) );
  34.  
  35.  /**
  36.   * Change line 1129 in /wp-content/plugins/oxygen/component-framework/components/classes/easy-posts.class.php
  37.   * to this.
  38.   */
  39.  
  40.   $authors = get_users( array( 'who' => 'authors', 'has_published_posts' => true ) );