Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

TheLoneDeveloper on "Pull out values from multidimensional associative array"

$
0
0

This is a bit embarrassing but arrays have always given me a run for my money.

I'm creating a plugin where I will give the user the option to select the interval they want a certain feature within my plugin to run.

So I'm pulling all cron schedules currently defined using: wp_get_schedules();


https://codex.wordpress.org/Function_Reference/wp_get_schedules

Then i'm doing this:

$active_cron_schedules = wp_get_schedules();

          print_r(Array_values($active_cron_schedules));

          foreach ($active_cron_schedules as $key => $value) {
            echo $key;
          }

currently it outputs the hourly twicedaily daily my_cron it's not going deep enough, I want to get the "display" so it shows the "nice name" of the schedule.

Help is appreciated, thank you.


Viewing all articles
Browse latest Browse all 8245

Trending Articles