Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
:root { | |
--violation-color: red; /* used for clear issues */ | |
--warning-color: orange; /* used for potential issues we should look into */ | |
} | |
/* IMAGES */ | |
/* | |
* Lazy-Loaded Images Check | |
* ==== |
The below code is plugin codes used for adding new functionality setup | |
while updating the plugin or activating the plugin. | |
This is simple plugin code and it will add transient while updating or activating the plugin. | |
Clear transient once we finished the operation. | |
======================================================================================= | |
<?php | |
/*Plugin Name: Wordpress Update |
<?php | |
/** | |
* Test if a WordPress plugin is active | |
*/ | |
if ( is_plugin_active('plugin-directory/plugin-file.php') ) { | |
// the plugin is active | |
} |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<?php | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
class WordPress_Plugin_Template_Settings { | |
private $dir; | |
private $file; | |
private $assets_dir; | |
private $assets_url; | |
private $settings_base; |
<?php | |
/* | |
Plugin Name: Testimonials Custom Post Type | |
Plugin URI: http://wpbeaches.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/ | |
Description: Testimonials Custom Post Types | |
Author: Neil Gowran | |
Version:1.0.0 | |
Author URI:http://wpbeaches.com | |
*/ |
<?php | |
# http://kovshenin.com/2012/the-wordpress-settings-api/ | |
# http://codex.wordpress.org/Settings_API | |
add_action( 'admin_menu', 'my_admin_menu' ); | |
function my_admin_menu() { | |
add_options_page( __('My Plugin Options', 'textdomain' ), __('My Plugin Options', 'textdomain' ), 'manage_options', 'my-plugin', 'my_options_page' ); | |
} | |
add_action( 'admin_init', 'my_admin_init' ); |
<?php | |
/* | |
* Select one or more of the options below to your wp-config.php file to have WordPress updates run automatically. | |
*/ | |
// Apply Major WordPress Updates Automatically | |
define( 'WP_AUTO_UPDATE_CORE', true ); | |
// Apply Minor WordPress Updates Automatically |
<?php | |
/* | |
Plugin Name: Site Plugin | |
Description: Site-specific code with support for Gutenberg blocks | |
Author: Shaun Palmer | |
Author URI: https://yourwebsite.com/ | |
*/ | |
class SP_SitePlugin { |
👸🏻: Let's break down your ideas based on the **"Register and add settings page"** file you shared and explore ways to incorporate licensing, custom post types, and toggles on the settings page. | |
### Key Points from the File: | |
1. **Settings Page Structure**: | |
- You have a clear framework to add settings, which includes registering options, adding fields, and sanitizing input. | |
- This is an excellent base for further expansion. | |
2. **What You Want**: | |
- **Licensing/Key Registration**: You want a licensing system where you can store and validate a key. | |
- **Custom Post Types**: A section to manage custom post types. |