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_action( 'update_option_active_sitewide_plugins', 'dpse_deactivate_self', 10, 2 ); | |
add_action( 'update_option_active_plugins', 'dpse_deactivate_self', 10, 2 ); | |
/** | |
* Deactivate ourself if Addthis is deactivated. | |
*/ | |
function dpse_deactivate_self( $plugin, $network_deactivating ) { | |
if ( !is_plugin_active( 'addthis/addthis_social_widget.php' ) ) { | |
deactivate_plugins( plugin_basename( __FILE__ ), true ); |
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
Listen 0.0.0.0:8080 | |
#Listen [::]:80 | |
#Listen 80 |
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
;;;;;;;;;;;;;;;; | |
; File Uploads ; | |
;;;;;;;;;;;;;;;; | |
; Whether to allow HTTP file uploads. | |
; http://php.net/file-uploads | |
file_uploads=On | |
; Temporary directory for HTTP uploaded files (will use system default if not | |
; specified). |
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 | |
// Change /*CUSTOMIZE_THIS*/ to a unique name (two places). Go ahead, make it long. | |
// Like, your initials, and your full plugin name. | |
// e.g. MTJ_Some_Awesome_Plugin_Controller | |
/*CUSTOMIZE_THIS*/_Controller::init(); | |
class /*CUSTOMIZE_THIS*/_Controller { | |
function init() { |
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 | |
$formatted_phone = preg_replace( '~.*(\d{3})[^\d]*(\d{3})[^\d]*(\d{4}).*~', '($1) $2-$3', $unformatted_number ); | |
$formatted_phone = preg_replace( '~.*(\d{3})[^\d]*(\d{3})[^\d]*(\d{4}).*~', '$1.$2.$3', $unformatted_number ); | |
$formatted_phone = preg_replace( '~.*(\d{3})[^\d]*(\d{3})[^\d]*(\d{4}).*~', '$1-$2-$3', $unformatted_number ); |
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( 'soliloquy_skipped_posttypes', 'myprefix_soliloquy_skipped_posttypes' ); | |
/** | |
* Remove Soliloquy Metabox from posts, etc.. | |
* @param array $post_types Array of skipped post types. | |
* @return array $post_types Modified array of skipped post types. | |
*/ | |
function myprefix_soliloquy_skipped_posttypes( $post_types ) { | |
$post_types['post']; |
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
HTML Slide Code: | |
`<a rel="soliloquybox{SOLILOQUYID}" href="http://domain.com/path/to/full-image.jpg" data-thumbnail="http://domain.com/path/to/thumbnail-image.jpg"><img src="http://domain.com/path/to/full-image.jpg" alt="HTML Slide"/></a>` |
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 | |
// Load the WordPress Environment | |
define( 'WP_DEBUG', true ); /* uncomment for debug mode */ | |
require('./wp-load.php'); | |
foreach( get_posts( array( 'post_type' => 'soliloquy', ) ) as $post ) { | |
$data = get_post_meta( $post->ID, '_sol_slider_data', true ); | |
$data['config']['thumbnails_num'] = 5; | |
update_post_meta( $post->ID, '_sol_slider_data', $data ); |
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_action( 'wpmu_new_blog', 'ap_install_p2p', 5, 6 ); | |
/** | |
* Create P2P table on site creation regardless of admin presence. | |
* | |
* @see P2P_Tools_Page::maybe_install() | |
* | |
* @author Ryan Imel <ryan@wpcandy.com> | |
* @author Travis Smith <t@wpsmith.com> |
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_action( 'wpmu_new_blog', 'wps_install_p2p', 5, 6 ); | |
/** | |
* Create P2P table on site creation regardless of admin presence. | |
* | |
* @see P2P_Tools_Page::maybe_install() | |
* @author Travis Smith <wpsmith.net> | |
* | |
* @param int $blog_id Blog ID. |