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 | |
/** | |
* Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field | |
* | |
* Preview your Gravity forms on the frontend of your website. Adds a "Live Preview" link to the Gravity Forms toolbar. | |
* | |
* Usage | |
* | |
* 1 - Enable "Allow field to be populated dynamically" option on field which should be populated. | |
* 2 - In the "Parameter Name" input, enter the merge tag (or merge tags) of the field whose value whould be populated into this field. |
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
Verifying that +gofas is my openname (Bitcoin username). https://onename.com/gofas |
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 | |
function my_init_email_as_username() | |
{ | |
//check for level as well to make sure we're on checkout page | |
if(empty($_REQUEST['level'])) | |
return; | |
if(!empty($_REQUEST['bemail'])) | |
$_REQUEST['username'] = $_REQUEST['bemail']; | |
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 | |
function add_capability() { | |
// gets the author role | |
$role = get_role( 'author' ); | |
// This only works, because it accesses the class instance. | |
$role->add_cap( 'edit_others_posts' ); | |
} | |
add_action( 'admin_init', 'add_capability'); |
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
// Logo Padrão no Login | |
function gofas_wp_login_image() { | |
echo " | |
<style> | |
body.login #login h1 a { | |
background: url('".get_bloginfo('url')."/uploads/logo.png') 0px 0 no-repeat transparent; | |
height:50px; | |
width:160px; } | |
</style> |
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 | |
/** | |
* Change Upload Directory for one Custom Post-Type | |
* Author: https://gist.github.com/RRWD/8705908 | |
* This will change the upload directory for a custom post-type. Attachments for this custom post type will | |
* now be uploaded to a seperate "uploads" directory. Make | |
* sure you swap out "post-type" and the "my-dir" with the appropriate values... | |
* credits to: http://wordpress.stackexchange.com/users/4044/jhdenham | |
* and http://yoast.com/smarter-upload-handling-wp-plugins/ | |
*/ |
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
// fonte: http://premium.wpmudev.org/blog/display-wordpress-post-page-ids/ | |
add_filter( 'manage_posts_columns', 'revealid_add_id_column', 5 ); | |
add_action( 'manage_posts_custom_column', 'revealid_id_column_content', 5, 2 ); | |
function revealid_add_id_column( $columns ) { | |
$columns['revealid_id'] = 'ID'; | |
return $columns; | |
} |
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
/* | |
Plugin Name: Post Tags and Categories for Pages | |
Plugin URI: http://wpthemetutorial.com/plugins/post-tags-and-categories-for-pages/ | |
Description: Simply adds the stock Categories and Post Tags to your Pages. | |
Version: 1.3 | |
Author: curtismchale | |
Author URI: http://wpthemetutotial.com/about/ | |
License: GNU General Public License v2.0 | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
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 | |
/* | |
Plugin Name: SSL URLs Only in Specific Sites of Network | |
Plugin URI: https://www.gofas.com.br/ | |
Description: pt_BR: Permite que apenas o site principal da rede e outros sites específicos sejam acessados com https://, sem interferir nos demais sites da rede que não possuem certificado de segurançaapenas, ou seja, que podem ser acessados apenas com http://. | |
en_US: Allows only the main network site and other specific sites are accessed with https://, without interfering with other network sites that do not have SSL certificate in other words, that can be accessed only with http:// and not with https://. | |
Version: 0.4 | |
Author: Mauricio Gofas | |
Author URI: https://www.gofas.com.br | |
Network: 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
<?php | |
/* | |
* Muda a pasta de uploads padrão do WordPress via functions.php | |
* mesmo com "define( 'UPLOADS', 'wp-content/'.'uploads' );" em wp-config.php | |
* Ideal para wp multisite. | |
* Change the default upload folder via the WordPress functions.php | |
* Even with "define( 'UPLOADS', 'wp-content/'.'uploads' );" in wp-config.php | |
* Ideal for wp multisite | |
* @upload_dir |