10 ) ); if ( ! is_wp_error( $promo_response ) ) { $promo_data = json_decode( wp_remote_retrieve_body( $promo_response ), true ); set_transient( 'codepopular_promo_data', $promo_data, 2 * HOUR_IN_SECONDS ); } } // ✅ Show promo if active if ( isset( $promo_data['active'] ) && $promo_data['active'] === 'yes' ) { ?>
CodePopular
10 ) ); if ( ! is_wp_error( $post_response ) ) { $posts_data = json_decode( wp_remote_retrieve_body( $post_response ) ); set_transient( 'codepopular_blog_posts', $posts_data, 2 * HOUR_IN_SECONDS ); } } // ✅ Show blog posts if ( ! empty( $posts_data ) && is_array( $posts_data ) ) { foreach ( $posts_data as $post ) { $date = gmdate( 'M j, Y', strtotime( $post->modified ) ); ?>

title->rendered ); ?> -

content->rendered ), 25, '...' ); ?>

get_option( 'wmufs_notice_disable_time' ) ) { add_action( 'load-index.php', function () { add_action( 'admin_notices', 'codepopular_wmufs_promotions' ); } ); } if ( ! function_exists( 'codepopular_wmufs_promotions' ) ) { /** * Display admin notice for support/promotion. */ function codepopular_wmufs_promotions() { ?>