Changeset 3306368
- Timestamp:
- 06/04/2025 12:03:42 PM (10 months ago)
- File:
-
- 1 edited
-
blogify-ai/trunk/core/hooks.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blogify-ai/trunk/core/hooks.php
r3299707 r3306368 29 29 */ 30 30 function side_effects(): void { 31 // Initialize client secret if not exists 32 add_option(BLOGIFY_CLIENT_SECRET_OPTION_HANDLE, generate_uuid()); 31 33 register_actions_filter(); 32 34 register_settings_hooks(); … … 227 229 <input style='width: 80%;' type='password' id='<?php echo esc_attr(BLOGIFY_ACCESS_TOKEN_OPTION_HANDLE); ?>' name='<?php echo esc_attr(BLOGIFY_ACCESS_TOKEN_OPTION_HANDLE); ?>' name='<?php echo esc_attr(BLOGIFY_ACCESS_TOKEN_OPTION_HANDLE); ?>' 228 230 value='<?php echo esc_attr(get_option(BLOGIFY_ACCESS_TOKEN_OPTION_HANDLE)); ?>'> 231 <p class="description">Access Token from your Blogify account.</p> 229 232 <?php 230 233 }, … … 235 238 ] 236 239 ); 240 241 add_settings_field( 242 'blogify_client_secret', 243 'Blogify Client Secret', 244 function () { 245 $client_secret = get_option(BLOGIFY_CLIENT_SECRET_OPTION_HANDLE); 246 ?> 247 <input style='width: 80%;' type='text' id='blogify_client_secret' value='<?php echo esc_attr($client_secret); ?>' readonly /> 248 <p class="description">This is your Blogify Client Secret. Keep it safe and do not share it publicly.</p> 249 <?php 250 }, 251 'blogify', 252 'blogify_section', 253 [ 254 'label_for' => 'blogify_client_secret', 255 ] 256 ); 237 257 }); 238 258 } … … 244 264 */ 245 265 function register_rest_hooks(): void { 246 // Initialize client secret if not exists247 add_option(BLOGIFY_CLIENT_SECRET_OPTION_HANDLE, generate_uuid());248 266 249 267 // Register create post endpoint
Note: See TracChangeset
for help on using the changeset viewer.