This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Инструкция: Настройки для работы с API vk.com | |
1. Прочитать Знакомство с API ВКонтакте https://vk.com/dev/first_guide (можно пропустить:)) | |
2. Регистрация приложения: | |
2.1. Открыть «Мои приложения» https://vk.com/apps?act=manage | |
2.2. Нажать «Создать» | |
2.3. Нужно выбрать один из трех типов приложений (для старта Standalone-приложение) | |
2.4. Подтвердить создание через СМС | |
2.5. Открыть вкладку «Настройки» в меню слева, сохранить свой «ID приложения», он же API_ID, APP_ID, client_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Configuring Automatic Background Updates | |
* @link //codex.wordpress.org/Configuring_Automatic_Background_Updates | |
*/ | |
# Example. To enable ALL automatic updates | |
add_filter( 'automatic_updates_is_vcs_checkout','__return_false', 1 ); | |
add_filter( 'auto_update_core', '__return_true' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Инструкция | |
1. Открыть владельцу/администратору страницу | |
1.1. Для чистки паблика/группы «Управление сообществом» > «Участники», ссылка https://vk.com/ваш_паблик?act=users | |
1.2. Для чистки друзей «Друзья», ссылка https://vk.com/friends | |
2. Проскроллить до конца списка участников, чтобы все подгрузились (протестировано на 15к подписчиков) | |
3. Открыть консоль браузера используя клавиатуру: | |
3.1. Command - Option - J (Mac) | |
3.2. Ctrl - Shift - J (Windows/Linux) | |
4. Скопировать код данный ниже в консоль |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Detect if a WordPress plugin is active | |
* A function you can use to check if plugin is active/loaded for your plugins/themes | |
* @link //gist.github.com/llgruff/c5666bfeded5de69b1aa424aa80cc14f | |
*/ | |
// When coding plugins that rely on another one, like Private Content for bbPress or Visual Attributes for WooCommerce, you need to make if the WordPress Plugin is active to initialize your plugin routines or display a notice saying that the required plugin must be activated. In this tutorial we’ll see how to detect whether a certain plugin is active in a couple of ways. | |
## 1. Check whether a certain class or function or constant exists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Additional functions for WordPress Plugin [404 Error Logger] | |
* @link //wordpress.org/plugins/404-error-logger | |
*/ | |
/** | |
* Add WordPress Dashboard Widget only for admin users (can 'manage_options') | |
* @link //codex.wordpress.org/Dashboard_Widgets_API | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove [All in One SEO Pack] HTML Comments | |
* @link //gist.github.com/llgruff/a7ab776167aa0ed307ec445df54e5fdb | |
*/ | |
if (defined('AIOSEOP_VERSION')) { | |
add_action('get_header', function() { | |
ob_start( | |
function($o) { | |
return preg_replace('/\n?<.*?One SEO Pack.*?>/mi','',$o); |