/** * add background image div before #page element */ function tool_login_display_background() { $url_background = get_theme_mod("login_backgroundimage"); if (empty($url_background) && custom_is_registered_tool("backgroundimage")) { // $url_background = get_theme_mod('backgroundimage_image'); } if (!empty($url_background)) { ?> <div id="tool-login-background" style="background: url('<?php echo $url_background; ?> ') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; -ms-background-size: cover; background-size: cover; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -100;"></div> <?php } }
/** * retrieve default templates for specified post * @param number $post_id * @return string */ function wall_get_default_template($post_id = null) { if ($post_id == null) { $post_id = get_the_ID(); } $template = "content"; if (custom_is_registered_tool('video') && video_has_featured_video($post_id)) { $template = "video"; } else { if (has_post_thumbnail($post_id)) { $template = "thumb"; } } return $template; }
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ defined('ABSPATH') or die("Go Away!"); ?> <article> <?php $has_video = false; $has_thumb = false; // featured video if (custom_is_registered_tool('video') && video_has_featured_video(get_the_ID())) { $has_video = true; ?> <div class="video"><?php echo video_get_featured_video(get_the_ID(), "100%", "100%"); ?> </div> <?php } // featured thumbnail if (!$has_video) { if (has_post_thumbnail()) { $attach_id = get_post_thumbnail_id(get_the_ID()); if ($attach_id) { $image = wp_get_attachment_image_src($attach_id, 'full'); if ($image) {