Задать вопрос
  • Как спрятать ключи авторизации при HTTP запросах в JS?

    @petruncho Автор вопроса
    Александр Лисин, пока остановился на варианте отправлять тело запроса с ключами через бэк,
    а через JS обращаться к своему бэку
    Написано
  • Как спрятать ключи авторизации при HTTP запросах в JS?

    @petruncho Автор вопроса
    http only cookie можно через консоль посмотреть?
    Написано
  • Как спрятать ключи авторизации при HTTP запросах в JS?

    @petruncho Автор вопроса
    Wispik, какое решение тогда?
    Делать защиту на стороне приема запроса?
    Написано
  • Как получить ссылку на запись со статусом черновик Wordpress?

    @petruncho Автор вопроса
    Дмитрий, подходит для решения. Спасибо!
    Написано
  • Как получить ссылку на запись со статусом черновик Wordpress?

    @petruncho Автор вопроса
    $my_post = clone $post;
    создает копию в бд?
    или в памяти сервера, а после выполнения удаляется?
    Написано
  • Как вернуть package control в Sublime Text 4?

    @petruncho Автор вопроса
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/Package Control.py", line 89, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/commands/__init__.py", line 3, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/commands/advanced_install_package_command.py", line 10, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/package_manager.py", line 34, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/downloaders/__init__.py", line 20, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/downloaders/oscrypto_downloader.py", line 44, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/tls.py", line 11, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_mac/tls.py", line 39, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_mac/util.py", line 208, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto.py", line 15, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto_ctypes.py", line 30, in
    File "./python3.3/ctypes/__init__.py", line 353, in __init__
    OSError: dlopen(/usr/local/lib/libcrypto.dylib, 0x0006): tried: '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libcrypto.dylib' (no such file), '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.3.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
    plugins loaded
    Написано
  • Как вернуть package control в Sublime Text 4?

    @petruncho Автор вопроса
    Traceback (most recent call last):
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 308, in reload_plugin
    m = importlib.import_module(modulename)
    File "./python3.3/importlib/__init__.py", line 90, in import_module
    File "", line 1584, in _gcd_import
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/2_bootstrap.py", line 26, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/bootstrap.py", line 20, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/download_manager.py", line 24, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/downloaders/__init__.py", line 20, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/downloaders/oscrypto_downloader.py", line 44, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/tls.py", line 11, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_mac/tls.py", line 39, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_mac/util.py", line 208, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto.py", line 15, in
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    File "/Users/petrov/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto_ctypes.py", line 30, in
    File "./python3.3/ctypes/__init__.py", line 353, in __init__
    OSError: dlopen(/usr/local/lib/libcrypto.dylib, 0x0006): tried: '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libcrypto.dylib' (no such file), '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.3.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
    reloading python 3.3 plugin Package Control.Package Control
    Traceback (most recent call last):
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 308, in reload_plugin
    m = importlib.import_module(modulename)
    File "./python3.3/importlib/__init__.py", line 90, in import_module
    File "", line 1584, in _gcd_import
    File "", line 1565, in _find_and_load
    File "", line 1532, in _find_and_load_unlocked
    File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1697, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
    Написано
  • Какие есть альтернативы Google reCAPTCHA v3?

    @petruncho Автор вопроса
    Михаил Р.,

    Внутренняя проверка пользователя — изначально капча скрыта. Если скоринг маленький, капча появляется.
    Для тех, у кого скоринг достаточный — капча не показывается.
    Написано
  • Как создать динамичный поддомен?

    @petruncho Автор вопроса
    Lynn «Кофеман», продублируйте решение в ответе — отмечу решением)
    Написано
  • Как добавить свой класс кнопке "В корзину" вне зависимости от типа товара?

    Смотря для чего добавлять класс.

    Вариант 1:
    С помощью JS добавлять класс нужной кнопки

    Вариант 2:
    Отредактировать тему, найти верстку с кнопкой и добавить туда класс.
    Если кнопка выводится через функцию, то доработать функцию.

    P.S. если прикрепишь шаблон страницы товара, смогу дать точное решение
    Написано
  • Как настроить rewrite rule для WordPress?

    @petruncho Автор вопроса
    IvanU7n, vcard не кастомный тип поста.
    Смена названия файла поможет?

    При rewrite нужно подключать wp core? Не будет ли зацикливания?
    Написано
  • Как генерировать закругленный QR-код с ссылкой на запись WordPress?

    @petruncho Автор вопроса
    Спасибо! То, что нужно!
    Не знал, что у QR Code Monkey есть либа)
    Написано
  • Как передать в программу нажатие клавиш Python?

    @petruncho Автор вопроса
    Есть процесс в системе, известен его PID.
    Просто кнопки потыкать не совсем подходит

    Нужно что-то типа:
    process = psutil.Process(pid = 120500)
    process.key_down('a')
    process.key_up('a')
  • Как сделать интервальное нажатие клавиш на MacOS Sonoma?

    @petruncho Автор вопроса
    Решение нашел в Python — написал скрипт, который нажимает кнопки клавиатуры в интервале (аналог кликера).
    Использовал библиотеку pyautogui
  • Как скрыть Rest API маршрут из списка маршрутов WP JSON?

    @petruncho Автор вопроса
    maksam07, поправил чуть-чуть — заработало!

    add_filter('rest_index', function ($routes){
    	if (isset($routes->data['routes']['/lead/v1'])){
    		unset( $routes->data['routes']['/lead/v1'] );
    	}
    
    	return $routes;
    });
  • Как скрыть Rest API маршрут из списка маршрутов WP JSON?

    @petruncho Автор вопроса
    maksam07, выдает критическую ошибку