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
| /** | |
| * SmugMug oEmbed centering | |
| * From https://tourkick.com/advice-tips-howto/smugmug-custom-domain-oembed-wordpress/ | |
| */ | |
| img[src*="https://media.tourkick.com"], /* Single Image from custom domain URL */ | |
| img[src*="https://photos.smugmug.com"], /* Single Image from smugmug.com URL */ | |
| iframe[src*="https://api.smugmug.com"]{ /* Videos and Slideshows (multiple images) regardless of custom domain URL or smugmug.com URL */ | |
| display: block; | |
| margin: 0 auto; | |
| } |
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 | |
| // From http://tourkick.com/2014/smugmug-custom-domain-oembed-wordpress/ | |
| // This version is based on the SmugMug code from wp-includes/class-oembed.php | |
| // Even if you set both WWW and non-WWW versions as CNAMEs in your DNS settings, an oEmbed attempt to the wrong custom SmugMug domain (e.g. WWW if the custom domain in your SmugMug settings is non-WWW) will not work, which is why (www\.)? is not in the regex | |
| // for a custom SmugMug subdomain like http://media.mydomain.com (notice the "backslash-dot" after the subdomain) | |
| wp_oembed_add_provider( '#https?://?media\.mydomain\.com/.*#i', 'http://api.smugmug.com/services/oembed/', true ); | |
| // for a custom SmugMug domain like http://mydomain.com: |
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 | |
| // From http://www.pagelinestheme.com/dms-editor-only-specified-admins/ | |
| // If not defined all users with edit_theme_options capability have access to the DMS Editor. | |
| // Example 1, only allow username 'admin' to use DMS Editor | |
| define( 'PL_EDITOR_LOCK', 'admin' ); | |
| // Example 2, allow 3 users to use DMS Editor | |
| define( 'PL_EDITOR_LOCK', 'bobadmin,simonadmin,sallyadmin' ); |
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
| // From http://www.pagelinestheme.com/disable-dms-regions-per-page/ | |
| //body[class*=" template-landing-"]:not(.logged-in) { //do not hide for logged in users | |
| body[class*=" template-landing-"] { //e.g. template-landing-snowremoval | |
| #fixed-top, | |
| .fixed-top-pusher, | |
| header, | |
| footer { | |
| //display:none; // no longer needed now that it is done via functions.php | |
| } |
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 | |
| // From http://www.pagelinestheme.com/disable-dms-regions-per-page/ | |
| //Disable Fixed, Header, and Footer on all these Page IDs | |
| add_filter( 'pl_setting-region_disable_fixed', 'customize_templates_by_page' ); | |
| add_filter( 'pl_setting-region_disable_header', 'customize_templates_by_page' ); | |
| add_filter( 'pl_setting-region_disable_footer', 'customize_templates_by_page' ); | |
| function customize_templates_by_page() { | |
| //could choose to still show for Admins (e.g. copy content from footer to template) | |
| //if( current_user_can('edit_theme_options') ) { return false; } |
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 | |
| //from http://www.pagelinestheme.com/all-the-dynamic-dms-page-handling-you-want/ | |
| add_filter( 'pl_breaker_type', 'custom_breakers'); | |
| function custom_breakers( $type ) { | |
| $prepend = '* '; | |
| if(is_tax('jetpack-portfolio-type')) { | |
| $type = $prepend . get_query_var( 'taxonomy'); | |
| } | |
| return $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 | |
| //from http://www.pagelinestheme.com/all-the-dynamic-dms-page-handling-you-want/ | |
| add_filter( 'pl_breaker_type', 'custom_breakers'); | |
| function custom_breakers( $type ) { | |
| $prepend = '* '; | |
| //each custom taxonomy is its own type | |
| if(is_tax()) { | |
| $type = $prepend . get_query_var( 'taxonomy'); | |
| } |
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 | |
| //from http://www.pagelinestheme.com/all-the-dynamic-dms-page-handling-you-want/ | |
| add_filter( 'pl_breaker_type', 'custom_breakers'); | |
| function custom_breakers( $type ) { | |
| $prepend = '* '; | |
| //each post category is its own type | |
| if(is_category()) { | |
| $type = $prepend . get_category(get_query_var('cat'))->slug; | |
| } |
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 | |
| // Condense information on Restrict Content Pro wp-admin tables (avoid "too tall" table rows) | |
| // override .widefat * { word-wrap: break-word; } and table.fixed { table-layout: fixed; } | |
| // RCP pages with tables: /wp-admin/admin.php?page= ... rcp-members, rcp-member-levels, rcp-discounts, rcp-payments, or rcp-logs | |
| // there are some columns we may NOT want to make AUTO width: https://github.com/pippinsplugins/Restrict-Content-Pro/blob/master/includes/css/admin-styles.css#L31 | |
| add_action('admin_head','my_rcp_tables_not_too_tall'); | |
| function my_rcp_tables_not_too_tall() { | |
| $current_screen = get_current_screen(); | |
| if( !is_object($current_screen) ) { |