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 | |
| //* Do NOT include the opening php tag shown above if adding to functions.php. | |
| //* the following example changes individual event colours | |
| //* based on what the title matches | |
| //* see full list of options here https://fullcalendar.io/docs/v3/event-object | |
| add_filter( 'wfea_cal_event_extra_options', function ( $options ) { | |
| if ( preg_match( '/Monday/', $options['title'] ) ) { | |
| $options['color'] = '#000'; |
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
| var date = Utilities.formatDate(new Date(), "GMT", "EEE, dd MMM yyyy HH:mm:ss Z"); | |
| var secret = xxxxxx; | |
| var public_key = yyyyyyyyyy; | |
| var developer_id = 'xxxx'; | |
| var plugin_id = 'yyyy'; | |
| var resource_url = '/v1/developers/' + developer_id + '/plugins/' + plugin_id + '/installs.json'; |
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 | |
| /** @var \Freemius $myfreemiustag_fs Freemius global object. */ | |
| global $myfreemiustag_fs; | |
| if ( ! isset( $myfreemiustag_fs ) ) { | |
| // Include Freemius SDK. | |
| require_once 'mypath/includes/vendor/freemius/wordpress-sdk/start.php'; | |
| $myfreemiustag_fs = fs_dynamic_init( array( | |
| 'id' => '10000', |
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
| /* code to check if logged in to a different WP site example.com */ | |
| $logged_in_cookie = 'wordpress_logged_in_' . md5( 'https://example.com' ); | |
| if ( ! isset($_COOKIE[ $logged_in_cookie ]) ) { | |
| // display adverts | |
| } | |
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
| $gravity_view_frontend = \GravityView_frontend::getInstance(); | |
| remove_filter('the_title', [$gravity_view_frontend, 'single_entry_title'], 1, 2); |
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
| .help-tip { | |
| position: absolute; | |
| text-align: center; | |
| background-color: #409EBB; | |
| border-radius: 50%; | |
| width: 15px; | |
| height: 15px; | |
| font-size: 12px; | |
| line-height: 17px; | |
| cursor: default; |
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
| var isIE = window.document.documentMode ? true : false; | |
| if ( isIE ) { | |
| window.location.replace("https://my-site/new-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
| <?php | |
| // this should be in top template I think | |
| enqueue_script('wfea-slideshow-script'); | |
| $speed=apply_filters('wfea_slideshow_speed', $speed); | |
| $script_vars = 'var wfea_slider_speed = ' . $speed . ';' . | |
| 'var wfea_slider_count = ' . $data->atts['limit'] . ';'; | |
| wp_add_inline_script( 'wfea-slideshow-script', $script_vars, 'before' ); | |
| ?> | |
| <div class="wfea-slides" style="position: absolute;top: 0;left: 0;bottom: 0; right: 0;"> // style in CSS? |
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
| // wfea_slide_count set externally | |
| // wfea_slide_speed milliseconds set externally | |
| (function ($) { | |
| function specific_slide(num) { | |
| while ( num != counter ) { | |
| counter++; | |
| if (counter > wfea_slide_count ) { | |
| counter = 1; | |
| } |
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
| <head> | |
| <style> | |
| .vfx-slideshow { | |
| position: relative; | |
| } | |
| .vfx-slideshow > div:not(:first-child) { | |
| display:none; | |
| } | |
| .vfx-slideshow > div { |