Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Plugin Name: RB Tabify Settings Sections
* Plugin URI: https://blogs.recycleb.in/2024/07/wordpress-plugin-theme-settings-screen-turn-sections-into-tabs/
* Description: Turn plugin/theme settings screen sections into tabs.
* Version: 1.0.0
* Author: ckchaudhary
* Author URI: https://www.recycleb.in/u/chandan/
* Licence: GPLv2
*
@ckchaudhary
ckchaudhary / 1. rest-endpoints.php
Last active February 25, 2025 06:11
Add url parameters to a GET request made using javascript fetch, in the context of querying wordpress rest api custom endpoints.
<?php
// Send errors like this:
$update_status = $widget_obj->update( $new_data );
if ( ! $update_status['status'] ) {
// validation erorrs!
return rest_send_error( $update_status['message'] );
}
// Or, like this: