/**
* Post list
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
3,
'post_type' => array( 'post', 'page' ),
'orderby' => 'modified',
) );
if ( $posts ) {
$html .= '
' . esc_html( $post_type ) . 's
';
$html .= '
';
$html .= '';
while ( $query->have_posts() ) {
$query->the_post();
$id = get_the_ID();
$url = wp_nonce_url( admin_url( 'admin-ajax.php?action=aqpanel_featured_posts&post=' . $id . '&aqpanel_featured=no' ), 'aqpanel-featured-post' );
$html .= '
';
}
$html .= '
';
}
wp_reset_query();
}
// Featured orders
if ( class_exists( 'woocommerce' ) && array_key_exists( 'shop_order', $aqpanel_options['aqpanel_posttypes'] ) ) {
if ( $aqpanel_options['aqpanel_posttypes']['shop_order'] == '1' ) {
$customer_orders = get_posts( array(
'numberposts' => -1,
'post_type' => 'shop_order',
'meta_key' => '_is_aqpanel_featured_post',
'post_status' => array_keys( wc_get_order_statuses() ),
) );
if ( !empty($customer_orders) ) {
$has_one_or_more = true;
// Going through each current customer orders
$html .= 'You can add posts here through post list column or through special post meta box.
';
}
$html .= '