• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wppa_initialize_runtime函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wppa_initialize_runtime函数的典型用法代码示例。如果您正苦于以下问题:PHP wppa_initialize_runtime函数的具体用法?PHP wppa_initialize_runtime怎么用?PHP wppa_initialize_runtime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wppa_initialize_runtime函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: widget

 function widget($args, $instance)
 {
     global $wppa;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => __('WPPA+ Text', 'wppa'), 'text' => '', 'loggedinonly' => false));
     if ($instance['loggedinonly'] && !is_user_logged_in()) {
         return;
     }
     $title = apply_filters('widget_title', $instance['title']);
     $wppa['in_widget'] = 'gp';
     $wppa['mocc']++;
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     $text = apply_filters('widget_text', $instance['text'], $instance);
     //		$text = apply_filters('widget_text', __($instance['text']));
     if ($instance['filter']) {
         $text = wpautop($text);
     }
     $text = '<div class="wppa-gp-widget" style="margin-top:2px; margin-left:2px;" >' . wppa_albums_filter(do_shortcode($text)) . '</div>';
     echo $text;
     echo '<div style="clear:both"></div>';
     echo $after_widget;
     $wppa['in_widget'] = false;
     $wppa['fullsize'] = '';
     // Reset to prevent inheritage of wrong size in case widget is rendered before main column
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:35,代码来源:wppa-gp-widget.php


示例2: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $widget_content;
     wppa('in_widget', 'multitag');
     wppa_bump_mocc();
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => __('Photo Tags', 'wp-photo-album-plus'), 'cols' => '2', 'tags' => array()));
     $widget_title = apply_filters('widget_title', $instance['title']);
     // Display the widget
     echo $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     $tags = is_array($instance['tags']) ? implode(',', $instance['tags']) : '';
     echo '<div class="wppa-multitag-widget" >' . wppa_get_multitag_html($instance['cols'], $tags) . '</div>';
     echo '<div style="clear:both"></div>';
     echo $after_widget;
     wppa('in_widget', false);
 }
开发者ID:msayagh,项目名称:Quercus-source-code-Maven,代码行数:27,代码来源:wppa-multitag-widget.php


示例3: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $widget_content;
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     wppa('mocc', wppa('mocc') + 1);
     wppa('in_widget', 'search');
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => __('Search Photos', 'wp-photo-album-plus'), 'label' => '', 'root' => false, 'sub' => false, 'album' => '', 'landingpage' => '0'));
     $widget_title = apply_filters('widget_title', $instance['title']);
     // Display the widget
     echo $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo wppa_get_search_html($instance['label'], $instance['sub'], $instance['root'], $instance['album'], $instance['landingpage']);
     echo $after_widget;
     wppa('in_widget', false);
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:26,代码来源:wppa-search-widget.php


示例4: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $widget_content;
     global $wppa;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     $wppa['in_widget'] = 'tagcloud';
     $wppa['mocc']++;
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => __('Photo Tags', 'wppa'), 'tags' => array()));
     if (empty($instance['tags'])) {
         $instance['tags'] = array();
     }
     $widget_title = apply_filters('widget_title', $instance['title']);
     // Display the widget
     echo $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo '<div class="wppa-tagcloud-widget" >' . wppa_get_tagcloud_html(implode(',', $instance['tags'])) . '</div>';
     echo '<div style="clear:both"></div>';
     echo $after_widget;
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:29,代码来源:wppa-tagcloud-widget.php


示例5: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     wppa('in_widget', 'stereo');
     wppa_bump_mocc();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => __('3D Stereo Settings', 'wp-photo-album-plus')));
     $widget_title = apply_filters('widget_title', $instance['title']);
     $widget_content = "\n" . '<!-- WPPA+ stereo Widget start -->';
     $widget_content .= wppa_get_stereo_html();
     $widget_content .= '<div style="clear:both"></div>';
     $widget_content .= "\n" . '<!-- WPPA+ stereo Widget end -->';
     echo "\n" . $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo $widget_content . $after_widget;
     wppa('in_widget', false);
 }
开发者ID:msayagh,项目名称:Quercus-source-code-Maven,代码行数:27,代码来源:wppa-stereo-widget.php


示例6: widget

    /** @see WP_Widget::widget */
    function widget($args, $instance)
    {
        global $wpdb;
        global $widget_content;
        require_once dirname(__FILE__) . '/wppa-links.php';
        require_once dirname(__FILE__) . '/wppa-styles.php';
        require_once dirname(__FILE__) . '/wppa-functions.php';
        require_once dirname(__FILE__) . '/wppa-thumbnails.php';
        require_once dirname(__FILE__) . '/wppa-boxes-html.php';
        require_once dirname(__FILE__) . '/wppa-slideshow.php';
        wppa_initialize_runtime();
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('QR Widget', 'wp-photo-album-plus') : $instance['title']);
        $qrsrc = 'http://api.qrserver.com/v1/create-qr-code/' . '?data=' . site_url() . '&amp;size=' . wppa_opt('qr_size') . 'x' . wppa_opt('qr_size') . '&amp;color=' . trim(wppa_opt('qr_color'), '#') . '&amp;bgcolor=' . trim(wppa_opt('qr_bgcolor'));
        $widget_content = '
		<div style="text-align:center;" ><img id="wppa-qr-img" src="' . $qrsrc . '" title="" alt="' . __('QR code', 'wp-photo-album-plus') . '" /></div>
		<div style="clear:both" ></div>';
        $widget_content .= '
		<script type="text/javascript">
			/*[CDATA[*/
			var wppaQRData = document.location.href;
			var wppaQRDataOld = "";
			var wppaQRSrc = "";
			var workData = "";

			wppaConsoleLog( "doc.loc.href = " + wppaQRData );

			function wppaQRUpdate( arg ) {
				if ( arg ) wppaQRData = arg;
				if ( wppaQRData != wppaQRDataOld ) {
					wppaQRDataOld 	= wppaQRData;
					workData 		= wppaQRData;
					wppaQRSrc 		= "http://api.qrserver.com/v1/create-qr-code/?data=" +
										encodeURIComponent( workData ) +
										"&size=' . wppa_opt('qr_size') . 'x' . wppa_opt('qr_size') . '&color=' . trim(wppa_opt('qr_color'), '#') . '&bgcolor=' . trim(wppa_opt('qr_bgcolor'), '#') . '";
					document.getElementById( "wppa-qr-img" ).src = wppaQRSrc;
					document.getElementById( "wppa-qr-img" ).title = workData;
				}
				return;
			}

			jQuery(document).ready(function(){
				wppaQRUpdate();
			});
			/*]]*/
		</script>';
        echo $before_widget . $before_title . $title . $after_title . $widget_content . $after_widget;
    }
开发者ID:msayagh,项目名称:Quercus-source-code-Maven,代码行数:49,代码来源:wppa-qr-widget.php


示例7: widget

 function widget($args, $instance)
 {
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => '', 'album' => '0'));
     $title = apply_filters('widget_title', $instance['title']);
     $album = $instance['album'];
     if (!$wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM `" . WPPA_ALBUMS . "` WHERE `id` = %d", $album))) {
         $album = '0';
         // Album vanished
     }
     wppa_user_upload();
     // Do the upload if required
     wppa('in_widget', 'upload');
     wppa_bump_mocc();
     $mocc = wppa('mocc');
     $is_responsive = wppa_opt('colwidth') == 'auto';
     if ($is_responsive) {
         // Responsive widgetwppaAutoColumnWidth[1] = true;
         $js = wppa_get_responsive_widget_js_html($mocc);
     } else {
         $js = '';
     }
     $create = wppa_get_user_create_html($album, wppa_opt('widget_width'), 'widget');
     $upload = wppa_get_user_upload_html($album, wppa_opt('widget_width'), 'widget', $is_responsive);
     if (!$create && !$upload) {
         return;
     }
     // Nothing to do
     $text = '<div id="wppa-container-' . $mocc . '" class="wppa-upload-widget" style="margin-top:2px; margin-left:2px;" >' . $js . $create . $upload . '</div>';
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     echo $text;
     echo '<div style="clear:both"></div>';
     echo $after_widget;
     wppa('in_widget', false);
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:46,代码来源:wppa-upload-widget.php


示例8: widget

 function widget($args, $instance)
 {
     global $wppa;
     global $wppa_opt;
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => '', 'album' => '0'));
     $title = apply_filters('widget_title', $instance['title']);
     $album = $instance['album'];
     if (!$wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM `" . WPPA_ALBUMS . "` WHERE `id` = %d", $album))) {
         $album = '0';
         // Album vanished
     }
     wppa_user_upload();
     // Do the upload if required
     $wppa['in_widget'] = 'upload';
     $wppa['mocc']++;
     $wppa['out'] = '';
     if (wppa_switch('wppa_user_upload_login') && !is_user_logged_in()) {
         return;
     }
     // Not logged in while login req'd for upload, no create also
     wppa_user_create_html($album, $wppa_opt['wppa_widget_width'], 'widget');
     wppa_user_upload_html($album, $wppa_opt['wppa_widget_width'], 'widget');
     if (!$wppa['out']) {
         return;
     }
     // No possibility to upload or create, skip the widget
     $text = '<div class="wppa-upload-widget" style="margin-top:2px; margin-left:2px;" >' . $wppa['out'] . '</div>';
     $wppa['out'] = '';
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     echo $text;
     echo '<div style="clear:both"></div>';
     echo $after_widget;
     $wppa['in_widget'] = false;
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:46,代码来源:wppa-upload-widget.php


示例9: wppa_restore_settings

function wppa_restore_settings($fname, $type = '')
{
    if (wppa('debug')) {
        wppa_dbg_msg('Restoring from: ' . $fname);
    }
    if ($type == 'skin') {
        $void_these = array('wppa_revision', 'wppa_resize_on_upload', 'wppa_allow_debug', 'wppa_thumb_linkpage', 'wppa_mphoto_linkpage', 'wppa_widget_linkpage', 'wppa_slideonly_widget_linkpage', 'wppa_topten_widget_linkpage', 'wppa_coverimg_linkpage', 'wppa_search_linkpage', 'permalink_structure', 'wppa_rating_max', 'wppa_file_system');
    } else {
        $void_these = array('wppa_revision', 'wppa_rating_max', 'wppa_file_system');
    }
    // Open file
    $file = fopen($fname, 'r');
    // Restore
    if ($file) {
        $buffer = fgets($file, 4096);
        while (!feof($file)) {
            $buflen = strlen($buffer);
            if ($buflen > '0' && substr($buffer, 0, 1) != '/') {
                // lines that start with '/' are comment
                $cpos = strpos($buffer, ':');
                $delta_l = $buflen - $cpos - 2;
                if ($cpos && $delta_l >= 0) {
                    $slug = substr($buffer, 0, $cpos);
                    $value = substr($buffer, $cpos + 1, $delta_l);
                    $value = str_replace('\\n', "\n", $value);
                    // Replace substr '\n' by nl char value
                    $value = stripslashes($value);
                    //wppa_dbg_msg( 'Doing|'.$slug.'|'.$value );
                    if (!in_array($slug, $void_these)) {
                        wppa_update_option($slug, $value);
                    } else {
                        wppa_dbg_msg($slug . ' skipped');
                    }
                }
            }
            $buffer = fgets($file, 4096);
        }
        fclose($file);
        wppa_initialize_runtime(true);
        return true;
    } else {
        wppa_error_message(__('Settings file not found', 'wp-photo-album-plus'));
        return false;
    }
}
开发者ID:msayagh,项目名称:Quercus-source-code-Maven,代码行数:45,代码来源:wppa-admin-functions.php


示例10: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     global $wppa;
     global $widget_content;
     global $thumb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     $wppa['in_widget'] = 'bestof';
     $wppa['mocc']++;
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => '', 'count' => '1', 'sortby' => 'maxratingcount', 'display' => 'photo', 'period' => 'thisweek', 'maxratings' => 'yes', 'meanrat' => 'yes', 'ratcount' => 'yes', 'linktype' => 'none'));
     $widget_title = apply_filters('widget_title', $instance['title']);
     $page = in_array($instance['linktype'], $wppa['links_no_page']) ? '' : wppa_get_the_landing_page('wppa_bestof_widget_linkpage', __a('Best Of Photos'));
     $count = $instance['count'];
     $sortby = $instance['sortby'];
     $display = $instance['display'];
     $period = $instance['period'];
     $maxratings = $instance['maxratings'];
     $meanrat = $instance['meanrat'];
     $ratcount = $instance['ratcount'];
     $linktype = $instance['linktype'];
     $size = wppa_opt('wppa_widget_width');
     //		$data 			= wppa_get_the_bestof( $count, $period, $sortby, $display );
     $lineheight = wppa_opt('wppa_fontsize_widget_thumb') * 1.5;
     $widget_content = "\n" . '<!-- WPPA+ BestOf Widget start -->';
     $widget_content .= wppa_bestof_html(array('page' => $page, 'count' => $count, 'sortby' => $sortby, 'display' => $display, 'period' => $period, 'maxratings' => $maxratings, 'meanrat' => $meanrat, 'ratcount' => $ratcount, 'linktype' => $linktype, 'size' => $size, 'lineheight' => $lineheight));
     $widget_content .= '<div style="clear:both"></div>';
     $widget_content .= "\n" . '<!-- WPPA+ BestOf Widget end -->';
     echo "\n" . $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo $widget_content . $after_widget;
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:41,代码来源:wppa-bestof-widget.php


示例11: widget

 function widget($args, $instance)
 {
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => __('WPPA+ Text', 'wp-photo-album-plus'), 'text' => '', 'loggedinonly' => false));
     if ($instance['loggedinonly'] && !is_user_logged_in()) {
         return;
     }
     $title = apply_filters('widget_title', $instance['title']);
     wppa('in_widget', 'gp');
     wppa_bump_mocc();
     // Open the widget
     echo $before_widget;
     // Title optional
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     // Body
     $text = $instance['text'];
     if ($instance['filter']) {
         // Do wpautop BEFORE do_shortcode
         $text = wpautop($text);
     }
     $text = do_shortcode($text);
     $text = apply_filters('widget_text', $text);
     // If shortcode at wppa filter priority, insert result. See wppa-filter.php
     echo '<div class="wppa-gp-widget" style="margin-top:2px; margin-left:2px;" >' . $text . '</div>';
     echo '<div style="clear:both"></div>';
     // Close widget
     echo $after_widget;
     wppa('in_widget', false);
     wppa('fullsize', '');
     // Reset to prevent inheritage of wrong size in case widget is rendered before main column
 }
开发者ID:msayagh,项目名称:Quercus-source-code-Maven,代码行数:40,代码来源:wppa-gp-widget.php


示例12: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     wppa('in_widget', 'albnav');
     wppa_bump_mocc();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => '', 'parent' => '0', 'skip' => 'yes'));
     $widget_title = apply_filters('widget_title', $instance['title']);
     $page = wppa_get_the_landing_page('album_navigator_widget_linkpage', __('Photo Albums', 'wp-photo-album-plus'));
     $parent = $instance['parent'];
     $skip = $instance['skip'];
     $widget_content = "\n" . '<!-- WPPA+ Album Navigator Widget start -->';
     $widget_content .= '<div style="width:100%; overflow:hidden; position:relative; left: -12px;" >';
     if ($parent == 'all') {
         $widget_content .= $this->do_album_navigator('0', $page, $skip, '');
         $widget_content .= $this->do_album_navigator('-1', $page, $skip, '');
     } elseif ($parent == 'owner') {
         $widget_content .= $this->do_album_navigator('0', $page, $skip, '', " AND ( `owner` = '--- public ---' OR `owner` = '" . wppa_get_user() . "' ) ");
         $widget_content .= $this->do_album_navigator('-1', $page, $skip, '', " AND ( `owner` = '--- public ---' OR `owner` = '" . wppa_get_user() . "' ) ");
     } else {
         $widget_content .= $this->do_album_navigator($parent, $page, $skip, '');
     }
     $widget_content .= '</div>';
     $widget_content .= '<div style="clear:both"></div>';
     $widget_content .= "\n" . '<!-- WPPA+ Album Navigator Widget end -->';
     echo "\n" . $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo $widget_content . $after_widget;
     wppa('in_widget', false);
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:40,代码来源:wppa-album-navigator-widget.php


示例13: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     global $widget_content;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => '', 'root' => '0', 'sort' => true));
     $widget_title = apply_filters('widget_title', $instance['title']);
     $album_root = $instance['root'];
     $sort = $instance['sort'];
     wppa('in_widget', 'superview');
     wppa_bump_mocc();
     $widget_content = wppa_get_superview_html($album_root, $sort);
     wppa('in_widget', false);
     echo $before_widget . $before_title . $widget_title . $after_title . $widget_content . $after_widget;
 }
开发者ID:msayagh,项目名称:Quercus-source-code-Maven,代码行数:23,代码来源:wppa-super-view-widget.php


示例14: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     wppa('in_widget', 'com');
     wppa_bump_mocc();
     // Hide widget if not logged in and login required to see comments
     if (wppa_switch('comment_view_login') && !is_user_logged_in()) {
         return;
     }
     extract($args);
     $page = in_array(wppa_opt('comment_widget_linktype'), wppa('links_no_page')) ? '' : wppa_get_the_landing_page('wppa_comment_widget_linkpage', __('Recently commented photos', 'wp-photo-album-plus'));
     $max = wppa_opt('comten_count');
     $widget_title = apply_filters('widget_title', $instance['title']);
     $photo_ids = wppa_get_comten_ids($max);
     $widget_content = "\n" . '<!-- WPPA+ Comment Widget start -->';
     $maxw = wppa_opt('comten_size');
     $maxh = $maxw + 18;
     if ($photo_ids) {
         foreach ($photo_ids as $id) {
             // Make the HTML for current comment
             $widget_content .= "\n" . '<div class="wppa-widget" style="width:' . $maxw . 'px; height:' . $maxh . 'px; margin:4px; display:inline; text-align:center; float:left;">';
             $image = wppa_cache_thumb($id);
             if ($image) {
                 $link = wppa_get_imglnk_a('comten', $id, '', '', true);
                 $file = wppa_get_thumb_path($id);
                 $imgstyle_a = wppa_get_imgstyle_a($id, $file, $maxw, 'center', 'comthumb');
                 $imgstyle = $imgstyle_a['style'];
                 $width = $imgstyle_a['width'];
                 $height = $imgstyle_a['height'];
                 $cursor = $imgstyle_a['cursor'];
                 $imgurl = wppa_get_thumb_url($id, '', $width, $height);
                 $imgevents = wppa_get_imgevents('thumb', $id, true);
                 $title = '';
                 $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM `" . WPPA_COMMENTS . "` WHERE `photo` = %s ORDER BY `timestamp` DESC", $id), ARRAY_A);
                 if ($comments) {
                     $first_comment = $comments['0'];
                     foreach ($comments as $comment) {
                         $title .= $comment['user'] . ' ' . __('wrote', 'wp-photo-album-plus') . ' ' . wppa_get_time_since($comment['timestamp']) . ":\n";
                         $title .= $comment['comment'] . "\n\n";
                     }
                 }
                 $title = esc_attr(strip_tags(trim($title)));
                 $album = '0';
                 $display = 'thumbs';
                 $widget_content .= wppa_get_the_widget_thumb('comten', $image, $album, $display, $link, $title, $imgurl, $imgstyle_a, $imgevents);
             } else {
                 $widget_content .= __('Photo not found.', 'wp-photo-album-plus');
             }
             $widget_content .= "\n\t" . '<span style="font-size:' . wppa_opt('fontsize_widget_thumb') . 'px; cursor:pointer;" title="' . esc_attr($first_comment['comment']) . '" >' . $first_comment['user'] . '</span>';
             $widget_content .= "\n" . '</div>';
         }
     } else {
         $widget_content .= 'There are no commented photos (yet).';
     }
     $widget_content .= '<div style="clear:both"></div>';
     $widget_content .= "\n" . '<!-- WPPA+ comment Widget end -->';
     echo "\n" . $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo $widget_content . $after_widget;
     wppa('in_widget', false);
 }
开发者ID:msayagh,项目名称:Quercus-source-code-Maven,代码行数:71,代码来源:wppa-comment-widget.php


示例15: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     global $wppa_opt;
     global $wppa;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => '', 'album' => ''));
     $widget_title = apply_filters('widget_title', $instance['title']);
     $page = in_array($wppa_opt['wppa_featen_widget_linktype'], $wppa['links_no_page']) ? '' : wppa_get_the_landing_page('wppa_featen_widget_linkpage', __a('Featured photos'));
     $max = $wppa_opt['wppa_featen_count'];
     $album = $instance['album'];
     $generic = $album == '-2';
     if ($generic) {
         $album = '0';
         $max += '1000';
     }
     if ($album) {
         $thumbs = $wpdb->get_results($wpdb->prepare("SELECT * FROM `" . WPPA_PHOTOS . "` WHERE `status`= 'featured' AND `album` = %s ORDER BY RAND(" . wppa_get_randseed() . ") DESC LIMIT " . $max, $album), ARRAY_A);
     } else {
         $thumbs = $wpdb->get_results("SELECT * FROM `" . WPPA_PHOTOS . "` WHERE `status` = 'featured' ORDER BY RAND(" . wppa_get_randseed() . ") DESC LIMIT " . $max, ARRAY_A);
     }
     $widget_content = "\n" . '<!-- WPPA+ FeaTen Widget start -->';
     $maxw = $wppa_opt['wppa_featen_size'];
     $maxh = $maxw;
     $lineheight = $wppa_opt['wppa_fontsize_widget_thumb'] * 1.5;
     $maxh += $lineheight;
     if (false) {
         $maxh += $lineheight;
     }
     $count = '0';
     if ($thumbs) {
         foreach ($thumbs as $image) {
             global $thumb;
             $thumb = $image;
             if ($generic && wppa_is_separate($thumb['album'])) {
                 continue;
             }
             // Make the HTML for current picture
             $widget_content .= "\n" . '<div class="wppa-widget" style="width:' . $maxw . 'px; height:' . $maxh . 'px; margin:4px; display:inline; text-align:center; float:left;">';
             if ($image) {
                 $no_album = !$album;
                 if ($no_album) {
                     $tit = __a('View the featured photos', 'wppa_theme');
                 } else {
                     $tit = esc_attr(wppa_qtrans(stripslashes($image['description'])));
                 }
                 $link = wppa_get_imglnk_a('featen', $image['id'], '', $tit, '', $no_album);
                 $file = wppa_get_thumb_path($image['id']);
                 $imgstyle_a = wppa_get_imgstyle_a($image['id'], $file, $maxw, 'center', 'ttthumb');
                 $imgstyle = $imgstyle_a['style'];
                 $width = $imgstyle_a['width'];
                 $height = $imgstyle_a['height'];
                 $cursor = $imgstyle_a['cursor'];
                 $imgurl = wppa_get_thumb_url($image['id'], '', $width, $height);
                 $imgevents = wppa_get_imgevents('thumb', $image['id'], true);
                 if ($link) {
                     $title = esc_attr(stripslashes($link['title']));
                 } else {
                     $title = '';
                 }
                 $album = '0';
                 $display = 'thumbs';
                 $widget_content .= wppa_get_the_widget_thumb('featen', $image, $album, $display, $link, $title, $imgurl, $imgstyle_a, $imgevents);
             } else {
                 // No image
                 $widget_content .= __a('Photo not found.', 'wppa_theme');
             }
             $widget_content .= "\n" . '</div>';
             $count++;
             if ($count == $wppa_opt['wppa_featen_count']) {
                 break;
             }
         }
     } else {
         $widget_content .= 'There are no featured photos (yet).';
     }
     $widget_content .= '<div style="clear:both"></div>';
     $widget_content .= "\n" . '<!-- WPPA+ FeaTen Widget end -->';
     echo "\n" . $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo $widget_content . $after_widget;
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:92,代码来源:wppa-featen-widget.php


示例16: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => '', 'album' => '', 'width' => wppa_opt('widget_width'), 'height' => round(wppa_opt('widget_width') * wppa_opt('maxheight') / wppa_opt('fullsize')), 'ponly' => 'no', 'linkurl' => '', 'linktitle' => '', 'subtext' => '', 'supertext' => '', 'valign' => 'center', 'timeout' => '4', 'film' => 'no', 'browse' => 'no', 'name' => 'no', 'numbar' => 'no', 'desc' => 'no'));
     $title = apply_filters('widget_title', $instance['title']);
     $album = $instance['album'];
     $width = $instance['width'];
     $height = $instance['height'];
     if ($height == '0') {
         $height = round($width * wppa_opt('maxheight') / wppa_opt('fullsize'));
     }
     $ponly = $instance['ponly'];
     $linkurl = $instance['linkurl'];
     $linktitle = $instance['linktitle'];
     $supertext = __($instance['supertext']);
     $subtext = __($instance['subtext']);
     $valign = $instance['valign'];
     $timeout = $instance['timeout'] * 1000;
     $film = $instance['film'];
     $browse = $instance['browse'];
     $name = $instance['name'];
     $numbar = $instance['numbar'];
     $desc = $instance['desc'];
     $page = in_array(wppa_opt('slideonly_widget_linktype'), wppa('links_no_page')) ? '' : wppa_get_the_landing_page('wppa_slideonly_widget_linkpage', __('Widget landing page', 'wp-photo-album-plus'));
     if (is_numeric($album)) {
         echo $before_widget;
         if (!empty($title)) {
             echo $before_title . $title . $after_title;
         }
         if ($linkurl != '' && wppa_opt('slideonly_widget_linktype') == 'widget') {
             wppa('in_widget_linkurl', $linkurl);
             wppa('in_widget_linktitle', __($linktitle));
         }
         if ($supertext != '') {
             echo '<div style="padding-top:2px; padding-bottom:4px; text-align:center">' . $supertext . '</div>';
         }
         echo '<div style="padding-top:2px; padding-bottom:4px;" >';
         wppa('auto_colwidth', false);
         wppa('in_widget', 'ss');
         wppa('in_widget_frame_height', $height);
         wppa('in_widget_frame_width', $width);
         wppa('in_widget_timeout', $timeout);
         wppa('portrait_only', $ponly == 'yes');
         wppa('ss_widget_valign', $valign);
         wppa('film_on', $film == 'yes');
         wppa('browse_on', $browse == 'yes');
         wppa('name_on', $name == 'yes');
         wppa('numbar_on', $numbar == 'yes');
         wppa('desc_on', $desc == 'yes');
         echo wppa_albums($album, 'slideonly', $width, 'center');
         wppa('desc_on', false);
         wppa('numbar_on', false);
         wppa('name_on', false);
         wppa('browse_on', false);
         wppa('film_on', false);
         wppa('ss_widget_valign', '');
         wppa('portrait_only', false);
         wppa('in_widget_timeout', '0');
         wppa('in_widget_frame_height', '');
         wppa('in_widget_frame_width', '');
         wppa('in_widget', false);
         wppa('fullsize', '');
         // Reset to prevent inheritage of wrong size in case widget is rendered before main column
         echo '</div>';
         if ($linkurl != '') {
             wppa('in_widget_linkurl', '');
             wppa('in_widget_linktitle', '');
         }
         if ($subtext != '') {
             echo '<div style="padding-top:2px; padding-bottom:0px; text-align:center">' . $subtext . '</div>';
         }
         echo $after_widget;
     } else {
         echo "\n" . $before_widget;
         if (!empty($widget_title)) {
             echo $before_title . $widget_title . $after_title;
         }
         echo __('No album defined (yet)', 'wp-photo-album-plus');
         echo $after_widget;
     }
 }
开发者ID:lchen01,项目名称:STEdwards,代码行数:90,代码来源:wppa-slideshow-widget.php


示例17: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $wpdb;
     global $wppa;
     $wppa['in_widget'] = 'potd';
     $wppa['mocc']++;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     extract($args);
     $widget_title = apply_filters('widget_title', $instance['title']);
     // get the photo  ($image)
     $image = wppa_get_potd();
     // Make the HTML for current picture
     $widget_content = "\n" . '<!-- WPPA+ Photo of the day Widget start -->';
     $ali = wppa_opt('wppa_potd_align');
     if ($ali != 'none') {
         $align = 'text-align:' . $ali . ';';
     } else {
         $align = '';
     }
     $widget_content .= "\n" . '<div class="wppa-widget-photo" style="' . $align . ' padding-top:2px; ">';
     if ($image) {
         $id = $image['id'];
         $w = wppa_opt('wppa_potd_widget_width');
         $ratio = wppa_get_photoy($id) / wppa_get_photox($id);
         $h = round($w * $ratio);
         $usethumb = wppa_use_thumb_file($id, wppa_opt('wppa_widget_width'), '0');
         $imgurl = wppa_fix_poster_ext($usethumb ? wppa_get_thumb_url($id, '', $w, $h) : wppa_get_photo_url($id, '', $w, $h), $id);
         $name = wppa_get_photo_name($id);
         $page = in_array(wppa_opt('wppa_widget_linktype'), $wppa['links_no_page']) ? '' : wppa_get_the_landing_page('wppa_widget_linkpage', __a('Photo of the day'));
         $link = wppa_get_imglnk_a('potdwidget', $id);
         $is_video = wppa_is_video($id);
         $has_audio = wppa_has_audio($id);
         if ($link['is_lightbox']) {
             $lightbox = ($is_video ? ' data-videohtml="' . esc_attr(wppa_get_video_body($id)) . '"' . ' data-videonatwidth="' . wppa_get_videox($id) . '"' . ' data-videonatheight="' . wppa_get_videoy($id) . '"' : '') . ($has_audio ? ' data-audiohtml="' . esc_attr(wppa_get_audio_body($id)) . '"' : '') . ' ' . wppa('rel') . '="' . wppa_opt('lightbox_name') . '"';
         } else {
             $lightbox = '';
         }
         if ($link) {
             if ($link['is_lightbox']) {
                 $cursor = ' cursor:url(' . wppa_get_imgdir() . wppa_opt('wppa_magnifier') . '),pointer;';
                 $title = wppa_zoom_in($id);
                 $ltitle = wppa_get_lbtitle('potd', $id);
             } else {
                 $cursor = ' cursor:pointer;';
                 $title = $link['title'];
                 $ltitle = $title;
             }
         } else {
             $cursor = ' cursor:default;';
             $title = esc_attr(stripslashes(__($image['name'])));
         }
         // The medal if on top
         $widget_content .= wppa_get_medal_html_a(array('id' => $id, 'size' => 'M', 'where' => 'top'));
         // The link, if any
         if ($link) {
             $widget_content .= "\n\t" . '<a href = "' . $link['url'] . '" target="' . $link['target'] . '" ' . $lightbox . ' ' . wppa('lbtitle') . '="' . $ltitle . '">';
         }
         // The image
         if (wppa_is_video($id)) {
             $widget_content .= "\n\t\t" . wppa_get_video_html(array('id' => $id, 'width' => wppa_opt('wppa_potd_widget_width'), 'title' => $title, 'controls' => wppa_opt('widget_linktype') == 'none', 'cursor' => $cursor));
         } else {
             $widget_content .= '<img' . ' src="' . $imgurl . '"' . ' style="width: ' . wppa_opt('wppa_potd_widget_width') . 'px;' . $cursor . '"' . ' ' . wppa_get_imgalt($id) . ($title ? 'title="' . $title . '"' : '') . '/ >';
         }
         // Close the link
         if ($link) {
             $widget_content .= "\n\t" . '</a>';
         }
         // The medal if at the bottom
         $widget_content .= wppa_get_medal_html_a(array('id' => $id, 'size' => 'M', 'where' => 'bot'));
         // Audio
         if (wppa_has_audio($id)) {
             $widget_content .= wppa_get_audio_html(array('id' => $id, 'width' => wppa_opt('wppa_potd_widget_width'), 'controls' => true));
         }
     } else {
         // No image
         $widget_content .= __a('Photo not found.', 'wppa_theme');
     }
     $widget_content .= "\n" . '</div>';
     // Add subtitle, if any
     switch (wppa_opt('wppa_widget_subtitle')) {
         case 'none':
             break;
         case 'name':
             if ($image && $image['name'] != '') {
                 $widget_content .= "\n" . '<div class="wppa-widget-text wppa-potd-text" style="' . $align . '">' . wppa_get_photo_name($id) . '</div>';
             }
             break;
         case 'desc':
             if ($image && $image['description'] != '') {
                 $widget_content .= "\n" . '<div class="wppa-widget-text wppa-potd-text" style="' . $align . '">' . wppa_get_photo_desc($id) 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wppa_is_int函数代码示例发布时间:2022-05-23
下一篇:
PHP wppa_has_audio函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap