Key/Command | Description |
---|---|
Tab | Auto-complete files and folder names |
Ctrl + A | Go to the beginning of the line you are currently typing on |
Ctrl + E | Go to the end of the line you are currently typing on |
Ctrl + U | Clear the line before the cursor |
Ctrl + K | Clear the line after the cursor |
Ctrl + W | Delete the word before the cursor |
Ctrl + T | Swap the last two characters before the cursor |
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 |
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
User-agent: * | |
Disallow: /wp-admin | |
Disallow: /wp-includes | |
Disallow: /wp-content/plugins | |
Disallow: /wp-content/cache | |
Disallow: /wp-content/themes | |
Disallow: /wp-includes/js | |
Disallow: /trackback | |
Disallow: /category/*/* | |
Disallow: */trackback |
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
<? | |
$ftp_server = "ftp.domainname.com"; | |
$ftp_user_name = "ftp_username"; | |
$ftp_user_pass = "ftp_password"; | |
$ftp_directory = 'path/to/folder/'; // leave blank | |
$ftp_source_file_name = "data.xml"; | |
$ftp_dest_file_name = $ftp_source_file_name; | |
if( ftp_file( $ftp_server, $ftp_user_name, $ftp_user_pass, $ftp_source_file_name, $ftp_directory, $ftp_dest_file_name) ){ | |
echo "Success: FTP'd data\n"; |
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 | |
// FTP login details | |
$ftp_server = 'yourserver.com'; | |
$ftp_server_path = '/public_html/'; | |
$ftp_user_name = 'username'; | |
$ftp_user_pass = 'password'; | |
// Connect to the FTP | |
$conn_id = ftp_connect($ftp_server); | |
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); |
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 | |
/** | |
* @param WP_Query|null $wp_query | |
* @param bool $echo | |
* @param array $params | |
* | |
* @return string|null | |
* | |
* Accepts a WP_Query instance to build pagination (for custom wp_query()), | |
* or nothing to use the current global $wp_query (eg: taxonomy term page) |
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
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
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: Site Title (and Tagline) Smilies | |
* Description: Demonstration of selective refresh in the Customizer. Selectors are targeting elements in Twenty Fifteen. | |
* Author: Weston Ruter, XWP | |
* Plugin URL: https://gist.github.com/westonruter/a15b99bdd07e6f4aae7a | |
* | |
* @package SiteTitleSmilies | |
*/ |
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 | |
// See full blog post here | |
// http://pluto.kiwi.nz/2014/07/how-to-add-a-color-control-with-alphaopacity-to-the-wordpress-theme-customizer/ | |
function pluto_add_customizer_custom_controls( $wp_customize ) { | |
class Pluto_Customize_Alpha_Color_Control extends WP_Customize_Control { | |
public $type = 'alphacolor'; |
OlderNewer