| 开发者 | obydullah |
|---|---|
| 更新时间 | 2026年10月12日 22:38 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp_options rather than theme_mod() for the same reason.
What it does
wp_options.{prefix}ofcm_bookings table instead of the posts table. This keeps the posts table clean and booking queries fast as submissions accumulate.ofcm_ prefix, so the plugin cannot collide with your theme or another plugin.public => false. Nothing added through this plugin is publicly queryable, and the booking table is never exposed to the front end.{prefix}ofcm_bookings database table.fetch() request to admin-ajax.php. Your front-end form needs to append two fields:
action with the value ofcm_submit_bookingnonce from wp_create_nonce( 'ofcm_booking_nonce' ), passed to your script with wp_localize_script()name, email, phone, goal, and message. Name and email are required; everything else is optional. The response is a JSON object — on success the message is in the data property of the payload, and on failure the payload is an error with a data string explaining what went wrong.
For theme developers
Content is read with the standard WordPress APIs. Query the post types directly, or read meta with the prefixed keys:
ofcm_hero_slide — ofcm_slide_subtitle, ofcm_slide_description, ofcm_slide_btn_text, ofcm_slide_btn_url, ofcm_slide_btn2_text, ofcm_slide_btn2_urlofcm_service — ofcm_service_iconofcm_testimonial — ofcm_testimonial_quote, ofcm_testimonial_role, ofcm_testimonial_rating, ofcm_testimonial_resultofcm_pricing — ofcm_pricing_price, ofcm_pricing_period, ofcm_pricing_features, ofcm_pricing_popular, ofcm_pricing_btn_textget_option() using keys such as ofcm_contact_email, ofcm_social_instagram, ofcm_about_coach_name, and ofcm_about_stat1_number.
Bookings are read from the table with $wpdb. Always use prepare():
$rows = $wpdb->get_results( $wpdb->prepare( "SELECT id, name, email, status FROM {$table} WHERE status = %s ORDER BY created_at DESC LIMIT %d", $status, 20 ) );In your own WordPress database on your own hosting. Content types use custom post types and their meta, settings use wp_options, and bookings use a custom table prefixed with your WordPress table prefix. Nothing is sent anywhere else.
Form submissions are write-once records that never need revisions, categories, or scheduled publishing. Storing them in a custom table keeps the posts table from filling with thousands of low-value entries and keeps booking queries fast regardless of how many submissions you have.
Not from inside the plugin. The table is created fresh on activation. If you are moving from a site where bookings were stored as a custom post type, you will need to copy those rows into the new table yourself, or re-enter them.
No. It loads no remote fonts, scripts, or styles, makes no outbound HTTP requests, and collects no usage or telemetry data.
No. Removing the plugin leaves your content, settings, and the bookings table in place. Delete the {prefix}ofcm_bookings table and the ofcm_ options yourself if you want a clean slate.
No. The plugin is theme-independent and works with any theme. It provides no front-end output on its own — your theme renders the content.
Yes. All strings use the obydullah-fitness-content-manager text domain. A translation file in the plugin's languages folder is picked up automatically.
{prefix}ofcm_bookings table, created with dbDelta() on activation.wp_options.