This file contains 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 | |
/* | |
* Plugin Name: | |
* Plugin URI: | |
* Description: | |
* Version: 1.0 | |
* Author: | |
* Author URI: | |
* License: GPL2 |
This file contains 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 | |
/** | |
* Find a single item in a list based on specific criteria. | |
* | |
* @uses wp_list_filter() | |
* | |
* @param array $list | |
* @param array $args | |
* @param string $operator |
This file contains 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 | |
/* | |
* Plugin Name: Schema API | |
* Plugin URI: | |
* Description: | |
* Version: 0.1.0 | |
* Author: Micah Wood | |
* Author URI: https://wpscholar.com | |
* License: GPL2 |
This file contains 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 | |
/** | |
* A simple must-use plugin for WordPress that will provide a `/feed/json` endpoint for converting RSS feeds to JSON. | |
* In the absence of any URL parameters, it will convert the main feed to JSON. If a URL is set, it will convert the | |
* feed from that URL into JSON. If a callback is set, a JSONP implementation will be returned. | |
* | |
* Note: Be sure to flush rewrite rules manually by visiting the 'General'->'Permalinks' page in the WordPress admin. If | |
* you are using this in a plugin, be sure to flush the rewrite rules on activation using the 'flush_rewrite_rules()' function. | |
* |
This file contains 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 | |
class WP_Scholar_Defer_Scripts { | |
public static function initialize() { | |
add_filter( 'script_loader_tag', array( __CLASS__, 'defer_scripts' ), 10, 2 ); | |
add_filter( 'script_loader_tag', array( __CLASS__, 'async_scripts' ), 10, 2 ); | |
} | |
public static function defer_scripts( $tag, $handle ) { |
This file contains 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 | |
// General info | |
https://codex.wordpress.org/Theme_Development | |
// Theme Handbook | |
https://developer.wordpress.org/themes/ | |
// Demo content an theme unit testing | |
https://codex.wordpress.org/Theme_Unit_Test |
This file contains 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 | |
/* | |
Plugin Name: Remove Dashboard Meta Boxes | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: Removes the default dashboard widgets from the WordPress admin. | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: GPL2 | |
*/ |
This file contains 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 | |
https://wp-cli.org/ | |
https://make.wordpress.org/cli/handbook/ | |
https://make.wordpress.org/cli/handbook/quick-start/ | |
https://developer.wordpress.org/cli/commands/ | |
WP-CLI Commands A-N | |
wp admin – Open /wp-admin/ in a browser. |
This file contains 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 | |
/************ Work with Database ************/ | |
//interesting facts about DB | |
https://code.tutsplus.com/tutorials/understanding-and-working-with-data-in-wordpress--cms-20567 | |
https://developer.wordpress.org/reference/classes/wpdb/ | |
// * - for external file to include WP environment (tested) - require( '../sitename-base/wp-load.php' ); |
This file contains 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
// Action for change default system settings, it work's! | |
add_action('phpmailer_init','send_smtp_email'); | |
function send_smtp_email( $phpmailer ) | |
{ | |
// Define that we are sending with SMTP | |
$phpmailer->isSMTP(); | |
// The hostname of the mail server |