function generate_openai_audio_on_publish($post_id) { if (get_post_type($post_id) !== 'post') return; $post = get_post($post_id); $text = wp_strip_all_tags($post->post_content); $text = mb_substr($text, 0, 4000); // Limit text length $api_key = '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'; // Replace with your real key $voice = 'nova'; // voice option $response = wp_remote_post('https://api.openai.com/v1/audio/speech', [ 'headers' => [ 'Authorization' => 'Bearer ' . $api_key, 'Content-Type' => 'application/json' ], 'body' => json_encode([ 'model' => 'tts-1', 'voice' => $voice, 'input' => $text ]) ]); if (is_wp_error($response)) return; $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (!$data || empty($data['audio_url'])) return; $audio_url = $data['audio_url']; // Download audio file from OpenAI $audio_response = wp_remote_get($audio_url); if (is_wp_error($audio_response)) return; $audio_content = wp_remote_retrieve_body($audio_response); if (!$audio_content) return; // Save the audio file to uploads folder $upload = wp_upload_bits("post-{$post_id}.mp3", null, $audio_content); if ($upload['error']) return; // Save URL in post meta for later retrieval update_post_meta($post_id, '_openai_audio_url', $upload['url']); } Supreme Court upholds validity of Bangsamoro Organic Law, excludes Sulu from BARMM - newslineph.press

Supreme Court upholds validity of Bangsamoro Organic Law, excludes Sulu from BARMM

0

the Court declared that Sulu is not part of BARMM after the province rejected the law’s ratification.-Photo: Wikipedia

DAVAO CITY, Philippines — The Supreme Court (SC) ruled on Monday that Republic Act No. 11054, also known as the Organic Law for the Bangsamoro Autonomous Region in Muslim Mindanao (BARMM), is valid. However, the Court declared that Sulu is not part of BARMM after the province rejected the law’s ratification.

In a unanimous decision, the Court granted a petition challenging Sulu’s inclusion in BARMM but rejected challenges to other aspects of the Bangsamoro Organic Law, according to a news release.

“The decision is immediately executory,” the Court stated.

The Court found unconstitutional the interpretation of the law that allowed provinces and cities in the Autonomous Region in Muslim Mindanao (ARMM) to vote as a single geographical unit, including those that did not vote in favor of inclusion.

“This violates Article X, Section 18 of the Constitution, which mandates that only provinces, cities, and geographic areas that vote favorably in the plebiscite should be included in the autonomous region,” the Court explained.

Since Sulu voted against the Bangsamoro Organic Law in the plebiscite, the Court ruled that it was incorrect to include the province in BARMM.

The Bangsamoro Organic Law, enacted on July 27, 2018, established BARMM as a political entity with its own government structure. The law’s effectiveness and the determination of BARMM’s territorial jurisdiction depended on its ratification through a plebiscite.

The first plebiscite on January 21, 2019, covered areas of the then-ARMM, as well as Isabela City in Basilan and Cotabato City. A second plebiscite on February 6, 2019, included Lanao del Norte, municipalities in North Cotabato, and other areas seeking voluntary inclusion.

While most areas in the ARMM ratified the law, Sulu did not. Despite this, Sulu was initially included in BARMM, leading to the current petition challenging the inclusion.

The SC upheld the constitutionality of the Bangsamoro Organic Law, affirming that it does not make BARMM a separate state from the Philippines.

“The law does not grant BARMM the power to enter into relations with other states or grant it sovereignty,” the Court said. “BARMM’s autonomy is limited to internal governance and does not imply separation from the national government.”

The Court also affirmed the parliamentary form of government adopted by BARMM.

“An autonomous region may establish a government form different from the national government, provided it upholds democratic principles,” the Court stated.

“The Bangsamoro government is democratic, with Parliament members elected by its people. The Bangsamoro Parliament, in turn, elects a chief minister who exercises executive powers within the Bangsamoro government.”-with a report from PNA

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © All rights reserved. | CoverNews by AF themes.