Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory usage tweaks to improve usage of memory #3951

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions classes/PodsAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ public function admin_head () {
* @since 2.0
*/
public function admin_menu () {
$advanced_content_types = PodsMeta::$advanced_content_types;
$taxonomies = PodsMeta::$taxonomies;
$settings = PodsMeta::$settings;
$pods_meta = PodsMeta::init();

$advanced_content_types = $pods_meta->get_objects( 'pod' );
$taxonomies = $pods_meta->get_objects( 'taxonomy' );
$settings = $pods_meta->get_objects( 'settings' );

$all_pods = pods_api()->load_pods( array( 'count' => true ) );

Expand Down Expand Up @@ -550,7 +552,7 @@ public function parent_file ( $parent_file ) {
global $current_screen;

if ( isset( $current_screen ) && ! empty( $current_screen->taxonomy ) ) {
$taxonomies = PodsMeta::$taxonomies;
$taxonomies = PodsMeta::init()->get_objects( 'taxonomy' );
if ( !empty( $taxonomies ) ) {
foreach ( (array) $taxonomies as $pod ) {
if ( $current_screen->taxonomy !== $pod[ 'name' ] )
Expand Down
Loading