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 | |
/* | |
WPFront Notification Bar Plugin | |
Copyright (C) 2013, WPFront.com | |
Website: wpfront.com | |
Contact: [email protected] | |
WPFront Notification Bar Plugin is distributed under the GNU General Public License, Version 3, | |
June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin | |
St, Fifth Floor, Boston, MA 02110, USA |
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
<div id="light-gallery" class="row small-up-2 medium-up-3 large-up-4"> | |
<div class="column column-block" data-src="large.jpg" data-sub-html="Image Caption"> | |
<div class="thumbnail" style="background-image: url(thumbnail.jpg);"></div> | |
<img width="640" height="427" src="thumbnail.jpg" class="attachment-medium size-medium" alt=""> | |
</div> | |
<div class="column column-block" data-src="large.jpg" data-sub-html="Image Caption"> | |
<div class="thumbnail" style="background-image: url(thumbnail.jpg);"></div> | |
<img width="640" height="427" src="thumbnail.jpg" class="attachment-medium size-medium" alt=""> | |
</div> | |
<div class="column column-block" data-src="large.jpg" data-sub-html="Image Caption"> |
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
$folder = ''; | |
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on"){$ssl_set = "s";} else{$ssl_set = "";} | |
if(isset($folder) && $folder != ''){ $folder = '/' . $folder;} | |
define('WP_HOME', 'http'.$ssl_set.'://'.$_SERVER['HTTP_HOST'].$folder); // no trailing slash | |
define('WP_SITEURL', 'http'.$ssl_set.'://'.$_SERVER['HTTP_HOST'].$folder); // no trailing slash |
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 | |
// Add group custom group attribute to check later | |
add_filter( 'ld_course_list_shortcode_attr_defaults', function( $defaults ) { | |
$defaults['mygroups'] = null; | |
return $defaults; | |
}, 10 ); |
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 | |
$activation_key = ''; | |
if( isset( $_GET['activation_key'] ) && ! empty( $_GET['activation_key'] ) ) { | |
$activation_key = $_GET['activation_key']; | |
} | |
if( !empty( $activation_key ) ) { |
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 | |
/** | |
* Checks if the the post has excerpt or not | |
* Code reference: https://wordpress.stackexchange.com/a/52897/12615 | |
*/ | |
// | |
function wpse_40574_populate_excerpt( $data, $postarr ) | |
{ | |
if( ! isset( $data['news'] ) ) { |
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 | |
/** | |
* Load a template part into a template | |
* | |
* Makes it easy for a theme to reuse sections of code in a easy to overload way | |
* for child themes. | |
* | |
* Includes the named template part for a theme or if a name is specified then a | |
* specialised part will be included. If the theme contains no {slug}.php file |
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 _s_get_textarea( $text ) { | |
if( empty( $text ) ) { | |
return false; | |
} | |
return wpautop( $text ); | |
} |
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 | |
add_action( 'admin_enqueue_scripts', 'load_admin_scripts' ); | |
function load_admin_scripts() { | |
wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/css/subscriber.css', false, '1.0' ); | |
} |
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 | |
add_action('admin_head', 'my_custom_styles'); | |
function my_custom_styles() { | |
echo '<style> | |
.class-name { | |
padding: 100px; | |
} | |
</style>'; |