| Server IP : 118.139.160.155 / Your IP : 216.73.217.176 Web Server : Apache System : Linux sg2plmcpnl504228.prod.sin2.secureserver.net 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64 User : twll3xqyaqrh ( 9725459) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/twll3xqyaqrh/public_html/Site WP/wp-content/plugins/post-grid/includes/menu/ |
Upload File : |
<?php
/*
* @Author pickplugins
* Copyright: 2015 pickplugins.com
*/
if ( ! defined('ABSPATH')) exit; // if direct access
?>
<div class="wrap">
<div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".sprintf(__('%s - Data Update', 'post-grid'), post_grid_plugin_name)."</h2>";?>
<div class=" post-grid-settings">
<?php
$default_query_args['post_type'] = array('post_grid');
$default_query_args['post_status'] = array('any');
$post_grid_wp_query = new WP_Query($default_query_args);
if ( $post_grid_wp_query->have_posts() ) :
?>
<ul>
<?php
while ( $post_grid_wp_query->have_posts() ) : $post_grid_wp_query->the_post();
$post_id = get_the_id();
$post_grid_meta_options = get_post_meta( get_the_ID(), 'post_grid_meta_options', true );
$categories = $post_grid_meta_options['categories'];
$meta_query = $post_grid_meta_options['meta_query'];
$tax_arr = array();
if(!empty($categories))
foreach ($categories as $categoriesData){
$categoriesArr = explode(',', $categoriesData);
$tax_name = isset($categoriesArr[0]) ? $categoriesArr[0] : '';
$term_id = isset($categoriesArr[1]) ? $categoriesArr[1] : '';
if(!empty($term_id)){
$tax_arr[$tax_name]['checked'] = $tax_name;
$tax_arr[$tax_name]['terms_relation'] = 'IN';
$tax_arr[$tax_name]['terms'][] = $term_id;
}
}
$post_grid_meta_options['taxonomies'] = $tax_arr;
if(!empty($meta_query))
foreach ($meta_query as $index => $meta_queryData){
$meta_args[$index] = array_merge(array('arg_type'=>'single'), $meta_queryData);
}
$post_grid_meta_options['meta_query'] = $meta_args;
update_post_meta($post_id, 'post_grid_meta_options', $post_grid_meta_options);
?>
<li><?php echo get_the_title(); ?></li>
<?php
//echo $post_id;
endwhile;
?>
</ul>
<?php
endif;
$post_grid_info = get_option('post_grid_info');
$post_grid_info['data_update_status'] = 'done';
update_option('post_grid_info',$post_grid_info);
?>
</div>
</div>