Created
February 4, 2019 01:16
-
-
Save MogulChris/f91863df31ce9da63d51e5577d8ab647 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Get a list of Mogul Framework layers to update the wiki | |
require_once('wp-load.php'); | |
global $wpdb; | |
$args = array( | |
'post_type' => 'acf-field-group', | |
'posts_per_page' => -1, | |
'orderby' => 'post_title', | |
'order' => 'asc', | |
'post_status' => 'any', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'mf_acf_cat', | |
'field' => 'slug', | |
'terms' => 'layer' | |
) | |
) | |
); | |
$layers = get_posts($args); | |
foreach($layers as $layer) { | |
$name = get_post_meta($layer->ID,'framework_template_path',true); | |
echo '* ' . basename($name,'.php') . "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment