Kiro CLI blocks social login (Google/GitHub) when running in remote environments (SSH sessions), showing:
Social login is not supported in remote environments.
Please use BuilderID or Identity Center authentication.
| This is a collection of my most used or most useful PHP and JS snippets | |
| **Disclaimer, I didn't write most of these - I just curated them over the years** |
| |
| <?php | |
| // For whatever reason, returning `false` isn't good enough. 🤷♀️ | |
| add_filter('get_user_option_elementor_enable_ai', fn () => '0', PHP_INT_MAX); |
| <?php | |
| /** | |
| * Preload Elementor background images if they are among the first elements on a page. | |
| * | |
| * @return void | |
| */ | |
| function sitecare_preload_elementor_background_images(): void { | |
| if ( ! did_action( 'elementor/loaded' ) ) { |
| <?php | |
| /** | |
| * Strip `width` & `height` attributes from `img` elements. | |
| * | |
| * @file functions.php | |
| */ | |
| function remove_width_and_height_attribute( $html ) { | |
| return preg_replace( '/(height|width)="\d*"\s/', "", $html ); | |
| } | |
| class ActivityTracker { | |
| constructor(totalTime, checkTime, metrikaId, debug = false) { | |
| this.events = [ | |
| "touchmove", | |
| "blur", | |
| "focus", | |
| "focusin", | |
| "focusout", | |
| "load", | |
| "resize", |
| function wpai_import_paragraph_block($paragraph_text){ | |
| $output = ""; | |
| $output .= '<!-- wp:paragraph \{"placeholder":"'.$paragraph_text.'"\} -->'; | |
| $output .= "\n"; | |
| $output .= '<p>'.$paragraph_text.'</p>'; | |
| $output .= "\n"; | |
| $output .= '<!-- /wp:paragraph -->'; | |
| return $output; |
| /** | |
| * Класс для менеджера событий (целей) | |
| * @constructor | |
| */ | |
| function EventManager() { | |
| this.init(); | |
| this.initEvents(); | |
| } | |
| /** |
| <?php | |
| add_filter( 'wp_all_import_single_image_uploads_dir', 'wpai_wp_all_import_single_image_uploads_dir', 10, 6 ); | |
| function wpai_wp_all_import_single_image_uploads_dir( $uploads, $image_url, $articleData, $current_xml_node, $import_id, $post_id ) { | |
| $position = strpos($image_url, 'uploads'); | |
| $result = substr($image_url, $position + 7,8); //eg: `/2021/05` | |
| $uploads['path'] = $uploads['basedir'].$result; | |
| $uploads['url'] = $uploads['baseurl'].$result; | |
| $uploads['subdir']=$result; |