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 | |
| // show uncompressed javascript in popups plugin http://wordpress.org/plugins/popups/ | |
| define( 'SPU_DEBUG_MODE', 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
| add_filter( 'wsi_cred_type', 'mycreed_points_types', 10, 2); | |
| function mycreed_points_types( $cred_type, $wsi_obj_id ){ | |
| // default mycreed type | |
| $cred_type = 'mycred_default'; | |
| // invitations sent on page with id 2 | |
| if( '2' == $wsi_obj_id ) { | |
| $cred_type = 'my_points_type'; | |
| } |
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 | |
| /** | |
| * MyCred Hook | |
| * @since v2 | |
| * @version 1.1 | |
| */ | |
| class Wsi_MyCreed extends myCRED_Hook { | |
| /** | |
| * Construct |
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 | |
| /** | |
| * Frontend_box class will help you to create bootstrap style alert boxes on your theme | |
| * @author Damian Logghe <info@timersys.com> | |
| * @license GPL-2.0+ | |
| * @link http://wp.timersys.com/how-to-create-bootstraps-style-alert-boxes-in-your-theme/ | |
| * @version 1.0 | |
| */ | |
| class Frontend_box { |
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
| /* http://wordpress.org/plugins/popups/ | |
| * Adding a custom rule to display popup only on | |
| * single posts of certain category | |
| * / | |
| add_filter('spu/rules/rule_match/post_category', 'spu_rule_match_post_category', 12, 2); | |
| function spu_rule_match_post_category($match, $rule){ | |
| global $post; | |
| // validate | |
| if( !$post->ID ) |
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
| add_filter( 'wsi/placeholders/custom_url', 'wsi_my_custom_link' ); | |
| function wsi_my_custom_link() { | |
| global $current_user; | |
| get_currentuserinfo(); | |
| //return home url with ref username | |
| return site_url('?mref='.$current_user->user_login); | |
| //return the same shortened with goo.gl |
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
| [jetpack_subscription_form show_subscribers_total="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 // <-- don't add this in your functions.php if already there | |
| /** | |
| * https://wordpress.org/support/plugin/popups | |
| * Allow editors to edit popups | |
| * For more roles check https://codex.wordpress.org/Roles_and_Capabilities | |
| */ | |
| add_filter('spu/settings_page/roles', 'my_custom_role'); | |
| function my_custom_role(){ | |
| return 'edit_others_posts'; | |
| } |
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 need to show a shortcode code and double | |
| * brackets ar enot working for you [[]] | |
| * you can always try this | |
| */ | |
| add_shortcode('raw','raw_fc'); | |
| function raw_fc($atts, $content){ | |
| remove_filter( 'the_content', 'do_shortcode', 11 ); | |
| return '<code>'.$content.'</code>'; | |
| add_filter( 'the_content', 'do_shortcode', 11 ); |