add_action('template_redirect', function () { if (!isset($_GET['run_featured_image_test'])) { return; } if (!current_user_can('manage_options')) { wp_die('Not allowed'); } echo "
Starting bulk featured image test...\n\n";

    $posts = get_posts([
        'numberposts' => 10,
        'post_type'   => 'post',
        'post_status' => 'publish'
    ]);

    if (empty($posts)) {
        wp_die("No posts found");
    }

    require_once(ABSPATH . 'wp-admin/includes/image.php');
    require_once(ABSPATH . 'wp-admin/includes/file.php');
    require_once(ABSPATH . 'wp-admin/includes/media.php');

    $access_key = 'Q9f-Dqt7uV7-mGPUg_Q6BF01CmY6NulPvzc-AvITU8I';

    foreach ($posts as $post) {

        echo "-----------------------------\n";
        echo "Post ID: {$post->ID}\n";

        if (has_post_thumbnail($post->ID)) {
            echo "SKIPPED: already has image\n";
            continue;
        }

        $title = get_the_title($post->ID);
        echo "Title: {$title}\n";

       // Build smarter query attempts (MAX 3 tries)
$words = preg_split('/\s+/', strtolower($title));

// better stopwords
$stopwords = [
    'the','and','for','with','this','that','from','your','how','why','what',
    'are','was','were','will','can','you',
    'best','top','guide','tips','ways','strategies','2024','2025'
];

// clean keywords
$keywords = array_values(array_filter(array_diff($words, $stopwords), function($word) {
    return strlen($word) > 3 && !is_numeric($word);
}));

// prioritize visual words
$visual_words = [
    'fitness','workout','gym','money','cash','laptop','office','travel',
    'food','car','marketing','business','saas','ai','technology'
];

usort($keywords, function($a, $b) use ($visual_words) {
    $a_score = in_array($a, $visual_words) ? 1 : 0;
    $b_score = in_array($b, $visual_words) ? 1 : 0;
    return $b_score - $a_score;
});

$queries = [];

// Attempt 1: best 2–3 keywords
if (count($keywords) >= 3) {
    $queries[] = implode(' ', array_slice($keywords, 0, 3));
} elseif (count($keywords) >= 2) {
    $queries[] = implode(' ', array_slice($keywords, 0, 2));
}

// Attempt 2: best single keyword
if (!empty($keywords)) {
    $queries[] = $keywords[0];
}

// Attempt 3: fallback
$queries[] = "technology";

$image_url = null;

foreach ($queries as $q) {

    $query = urlencode($q);
    echo "Trying query: {$q}\n";

    $page = rand(1, 10);

    $api_url = "https://api.unsplash.com/search/photos?query={$query}&per_page=1&page={$page}&orientation=landscape&client_id={$access_key}";

    $response = wp_remote_get($api_url);

    if (is_wp_error($response)) {
        continue;
    }

    $body = json_decode(wp_remote_retrieve_body($response), true);

    if (!empty($body['results'][0]['urls']['regular'])) {
        $image_url = $body['results'][0]['urls']['regular'];
        echo "Found image with query: {$q}\n";
        break;
    }
}

if (!$image_url) {
    echo "ERROR: No image found at all\n";
    continue;
}
       
        echo "Image URL OK\n";

       $tries = 0;
$image_response = false;

while ($tries < 2) {

    $image_response = wp_remote_get($image_url, [
        'timeout' => 20,
        'redirection' => 5,
        'user-agent' => 'Mozilla/5.0'
    ]);

    if (!is_wp_error($image_response)) {
        break;
    }

    $tries++;
}

if (is_wp_error($image_response)) {
    echo "ERROR: Download failed after retry\n";
    continue;
}

$image_data = wp_remote_retrieve_body($image_response);

if (!$image_data) {
    echo "ERROR: Empty image data\n";
    continue;
}

        $upload_dir = wp_upload_dir();

        if (empty($upload_dir['path'])) {
            echo "ERROR: Upload path issue\n";
            continue;
        }

        $filename = 'unsplash-' . time() . '-' . $post->ID . '.jpg';
        $file = trailingslashit($upload_dir['path']) . $filename;

        file_put_contents($file, $image_data);

        if (!file_exists($file)) {
            echo "ERROR: File write failed\n";
            continue;
        }

        $filetype = wp_check_filetype($filename, null);

        $attachment = [
            'post_mime_type' => $filetype['type'],
            'post_title'     => sanitize_text_field($title),
            'post_status'    => 'inherit'
        ];

        $attach_id = wp_insert_attachment($attachment, $file, $post->ID);

        if (is_wp_error($attach_id)) {
            echo "ERROR: Attachment failed\n";
            continue;
        }

        $attach_data = wp_generate_attachment_metadata($attach_id, $file);
        wp_update_attachment_metadata($attach_id, $attach_data);

        set_post_thumbnail($post->ID, $attach_id);

        echo "SUCCESS\n";
    }

    echo "\nDONE.\n
"; exit; });

Why Northeast India Remains Neglected and How to Fix It

TDY News

When Lakshmipriya Devi took the stage at the recent 2026 British Academy Film Awards in London, she made history. Her debut film, Boong, a quiet, deeply human story from the North-East Indian state of Manipur, follows a young boy navigating conflict while trying to reunite his fractured family. It had just won the award for Best Children’s and Family Film, becoming the first Indian film ever to claim that honor. Devi used her moment in the spotlight not just to celebrate. She dedicated the award to her homeland, describing it as “rooted in a place that’s very troubled, very much ignored and underrepresented in India.” 

For many watching around the world, it was the first time they had heard Manipur described so plainly — not through the lens of conflict bulletins or political briefings, but through the voice of an artist simply asking to be seen.

But what exactly is happening in Manipur, and why has this small state in India’s Northeast — along with the wider region — long been described as neglected and underrepresented? And, crucially, what can be done to solve this problem?

For the past few years, Manipur has been torn apart by communal violence between the Meitei and Kuki ethnic groups, with hundreds of deaths and around 60,000 displaced. Despite the scale of the situation, Prime Minister Narendra Modi only visited the state two years later, a move that has been sharply criticized. The leaders of the opposition Congress party dismissed his visit as a “farce” and argued that he should have visited much sooner.

The government has also been criticized by human rights groups, such as Amnesty International. which has claimed inaction on the part of the authorities in Manipur. The government did implement Presidential Rule in the state, and the Parliament voted on a resolution to extend it further, but many felt this was too little and too late.

So, why wasn’t more done for Manipur? Most importantly, why do people in India’s North-Eastern states continue to feel neglected by the centre?

A structural imbalance at the heart of Parliament

This sense of neglect is not new. India’s Northeastern states, home to numerous Indigenous communities, have long felt sidelined by New Delhi, both politically and culturally. Addressing this requires more than reactive governance; it calls for institutional reform that ensures regions have a meaningful voice in national decision-making.

India has a two-house Parliament: the Lok Sabha (House of the People) and the Rajya Sabha (Upper House/Council of States). One of the most practical and impactful reforms lies in rethinking the Rajya Sabha.

Currently, representation in both the Lok Sabha and the Rajya Sabha is based on population. While this method works for the Lok Sabha, which is meant to reflect the will of the people, it limits the Rajya Sabha’s ability to represent the states equally.

As a result, large states dominate both houses of Parliament, leaving smaller states, especially those in the Northeast, with limited influence. 

What the Upper House was meant to be

In the Lok Sabha, larger states naturally have more members, while smaller states have fewer. For example, Uttar Pradesh has 80 seats to reflect its large population, while northeastern states like Meghalaya and Manipur with much smaller populations, have only two seats each. This is fair, as the Lok Sabha is supposed to be proportional.

The Rajya Sabha, or Upper House, on the other hand, is supposed to represent the states. This should act as a countermajoritarian body that gives equal representation to each state so they can have a voice in government. However, here too, the number of seats depends on the population. This means that bigger states end up with far more representation than smaller ones. Uttar Pradesh holds 31 seats in the Rajya Sabha. In contrast, the small Northeastern states such as Manipur, Nagaland and Meghalaya each have only one seat. Large states dominate both houses of Parliament, leaving smaller states, such as those in the Northeast, with very little influence in national decision-making.

A reformed Rajya Sabha could create more balance. India could adopt a system where each state is guaranteed a minimum level of equal representation, similar to models seen in other federal systems. 

What India can learn from other federal systems

In the US, every state has equal representation in the Senate regardless of population. This means that California, with a population of nearly 39 million, has the same number of Senators as Wyoming, with just 600,000 people. The purpose of this system is to balance the voices of both large and small states, ensuring that no region feels neglected or overshadowed. 

Similarly, the EU balances representation through a dual-threshold system. Each member state has equal representation in the Council of the European Union, which operates similarly to the Upper House of the legislature. A “Qualified Majority Voting” process is used for many important decisions, where a proposal needs the support of 55% of EU member states representing at least 65% of the population. This prevents big states from dominating, but also stops a few small states from blocking decisions on their own.

Reimaging representation in India

India could apply a similar idea. Instead of allocating seats purely by population, each state could be guaranteed an equal base number of seats in the Rajya Sabha and major votes could require two thresholds. For example, the support of at least half of all states and representing at least half of India’s population. 

Such reforms would increase the influence of smaller states in national decisions. But, more importantly, equal representation in the Rajya Sabha would force politicians to take smaller states seriously because neglecting them would carry a real political cost. Today, the situation is very different.

Take Manipur, for instance. It currently has only two seats in the Lok Sabha and one in the Rajya Sabha, a pattern found across much of the Northeast. With such limited numbers, their voices are easily drowned out by larger states. 

This creates a dangerous imbalance. Major political parties and lawmakers have little incentive to prioritize the concerns of small states, because focusing on bigger states with more seats simply offers greater political rewards. Hence, regions like the Northeast are often overlooked.

Ensuring every region counts

If every state had equal representation in the Upper House, this dynamic would change dramatically. National parties would no longer focus primarily on larger states for electoral gains, as smaller states would also carry a great weight in the legislative process. Neglect would no longer be consequence-free.

Equal representation in the Rajya Sabha would not only strengthen democracy but also ensure that no part of the country is treated as an afterthought. It would ensure that democracy in India does not simply mean “rule of the majority,” but a system where every region matters equally — whether it’s the political powerhouse of Uttar Pradesh or a small Northeastern state like Manipur.

When politicians know they cannot afford to neglect Manipur — or any state — then real change will follow.

[Rosa Messer edited this piece]

The views expressed in this article are the author’s own and do not necessarily reflect Fair Observer’s editorial policy.

The post Why Northeast India Remains Neglected and How to Fix It appeared first on Fair Observer.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Share post:

Subscribe

spot_img

Popular

More like this
Related

FO Talks: The Collapse of New START Treaty Raises Global Nuclear Risks

Editor-in-Chief Atul Singh and Simon Cleobury, Head of Arms...

How Hybrid Warfare Shaped the Iran War Before It Began

On February 28, before the first explosion was visible...

Bangladesh Nationalist Party Declares Victory in Pivotal Election

In Dhaka, the Bangladesh Nationalist Party claimed what party...

NATO Presses Members to Boost Defense Spending Amid Renewed Security Concerns

Leaders of NATO concluded a high stakes summit in...