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
/* | |
If you are using BP 2.1+, this will insert a Country selectbox. | |
Add the function to bp-custom.php and then visit .../wp-admin/users.php?page=bp-profile-setup | |
Remove this function after the field is created. | |
*/ | |
function bp_add_custom_country_list() { | |
if ( !xprofile_get_field_id_from_name('Country') && 'bp-profile-setup' == $_GET['page'] ) { | |
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
.elment{ | |
position: $position; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} |
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
function mamaduka_remove_tax_name( $title, $sep, $seplocation ) { | |
if ( is_tax() ) { | |
$term_title = single_term_title( '', false ); | |
// Determines position of separator | |
if ( 'right' == $seplocation ) { | |
$title = $term_title . " $sep "; | |
} else { | |
$title = " $sep " . $term_title; | |
} |
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
function dias($dia_semana, $mes, $ano) { | |
$Date = new DateTime(); | |
$dias = cal_days_in_month(CAL_GREGORIAN, $mes, $ano); | |
for ($dia = 0; $dia <= $dias; $dia++) { | |
$Date->setDate( $ano, $mes, $dia ); | |
if ($Date->format( "w" ) == $dia_semana) { | |
$datas[] = $dia."/".$mes."/".$ano; | |
} | |
} | |
return $datas; |
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
// Execute only one time, then remove from your code | |
$all_users = get_users(); | |
foreach( $all_users as $user ): | |
bp_update_user_last_activity( $user->ID ); | |
endforeach; |
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
function showSocialShareButtons( target ){ | |
/* | |
Instructions: | |
This funciton work with ajax load content | |
<!-- Your HTML --> | |
<div id="content-to-share"> | |
<div class="share" | |
data-url="<?php echo $attachment_link; ?>" |
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
$("img").one("load", function() { | |
// do stuff | |
}).each(function() { | |
if(this.complete) $(this).load(); | |
}); |
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
Open file blog/wp-admin/includes/screen.php in your favorite text editor. | |
On line 706 find the following PHP statement: <?php echo self::$this->_help_sidebar; ?> | |
Replace it with the statement: <?php echo $this->_help_sidebar; ?> | |
Save your changes. |
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
define( 'WP_AUTO_UPDATE_CORE', false ); |
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
define( 'DISALLOW_FILE_EDIT', true ); |