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 | |
function do_something() { | |
// Here we are doing something | |
} | |
function do_another_thing() { | |
$some_variable = do_something(); | |
// Here we are doing another thing | |
} |
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 | |
// Simple way | |
add_filter( 'show_admin_bar', '__return_false' ); | |
// Standard way | |
add_filter( 'show_admin_bar', 'show_admin_bar_cb' ); | |
function show_admin_bar_cb() { | |
return false; | |
} |
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 | |
function add_featured_image_in_rss() { | |
if ( function_exists( 'get_the_image' ) && ( $featured_image = get_the_image('format=array&echo=0') ) ) { | |
$featured_image[0] = $featured_image['url']; | |
} elseif ( function_exists( 'has_post_thumbnail' ) and has_post_thumbnail() ) { | |
$featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'post-thumbnail' ); | |
} elseif ( function_exists( 'get_post_thumbnail_src' ) ) { | |
$featured_image = get_post_thumbnail_src(); |
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 | |
add_filter('bbp_get_reply_content', 'bb_sc_render', 99, 2); | |
add_filter('bbp_get_topic_content', 'bb_sc_render', 99, 2); | |
function bb_sc_render( $content, $reply_id ) { | |
$reply_author = bbp_get_reply_author_id( $reply_id ); | |
if( current_user_can( 'manage_options' ) ) |
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 | |
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'db_name_here'); | |
/** MySQL database username */ | |
define('DB_USER', 'db_user_name'); | |
/** MySQL database password */ |
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
<Files wp-login.php> | |
order deny,allow | |
Deny from all | |
Allow from xx.xxx.xxx.xxx | |
</Files> |
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 | |
define('AUTH_KEY', 'b],!QlPUie0ycv~R_qU~FL2o2kv7Ve}(oXs+QS$ynckMB[|C5hvCJv?Lt +)&[/4'); | |
define('SECURE_AUTH_KEY', 'vAzf}:6fi2>Y;;euR2(O==|Ja$-$k!Eg)M vYp=-4lxA22SQVP+Rv(#CSN^W79c~'); | |
define('LOGGED_IN_KEY', '!-*@/CC9{cK.q+a+v}bvTgb]:&,`QNx=udW/2Ah y.dJ 0[`XWV&OMc+<&p43~lQ'); | |
define('NONCE_KEY', 'SODE d>js8Tu;^SAEQ6f8Oj|V1iz?[(N{P)II5Cb9|-}2C$-y`E*Kn8L#@O/,e{U'); | |
define('AUTH_SALT', '3m07lkx1!-)97:LjkN~c6Q?|f>2_+=*QpyohH?`i=dY!Y)ksS0yZdp*I_+?nhUKF'); | |
define('SECURE_AUTH_SALT', 'jfrx@D<GkJ+>:#W9q?u{3n)+A|/:`8j@4nA@V}7&-C}-k`N:.|{qq`6-s.:>k5^)'); | |
define('LOGGED_IN_SALT', '.m~&d`Rh1v1_!g#w)]b-:-Hy/-g0ZQ0Ol$`BJ/u9w,cQ)?X TU~/v4kZD&8{;d]#'); | |
define('NONCE_SALT', 'h0HtiN26c+FD;AMAuNn)G)!aDzA=F[m,&w)Rzb/eJ^bh!DV#W)oz[t;%=VjMq] /'); |
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 | |
$table_prefix = 'wp_'; |
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
// Do this for all existing tables | |
RENAME table `wp_posts` TO `me_posts`; | |
// The the following | |
UPDATE `me_usermeta` SET `meta_key` = REPLACE( `meta_key`, 'wp_', 'me_' ); | |
UPDATE `me_options` SET `option_name` = 'me_user_roles' WHERE `option_name` = 'wp_user_roles'; |
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 | |
remove_action('wp_head', 'wp_generator'); |
OlderNewer