コード例 #1
0
 function szgoogle_maps_get_widget($options = array())
 {
     if (!($object = new SZGoogleActionMaps())) {
         return false;
     } else {
         return $object->getHTMLCode($options);
     }
 }
コード例 #2
0
 /**
  * FORM display the widget in the management of 
  * sidebar in the administration panel of wordpress
  */
 function form($instance)
 {
     // Creating arrays for list fields that must be
     // present in the form before calling wp_parse_args()
     $array = array('title' => '', 'width' => '', 'height' => '', 'width_auto' => '', 'height_auto' => '', 'lat' => '', 'lng' => '', 'zoom' => '', 'view' => '', 'layer' => '', 'wheel' => '', 'marker' => '', 'lazyload' => '', 'action' => 'A');
     // Creating arrays for list of fields to be retrieved FORM
     // and loading the file with the HTML template to display
     $OBJC = new SZGoogleActionMaps();
     extract((array) $OBJC->checkOptions(wp_parse_args($instance, $array), EXTR_OVERWRITE));
     // Calling the template for displaying the part
     // that concerns the administration panel (admin)
     @(include dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/widgets/SZGoogleWidget.php');
     @(include dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/widgets/' . __CLASS__ . '.php');
 }
コード例 #3
0
ファイル: SZGoogleMaps.php プロジェクト: omaharry/stmaryomaha
<?php

/**
 * Script to implement the HTML code shared with widgets 
 * in the function pop-up insert shortcodes via GUI
 *
 * @package SZGoogle
 * @subpackage Admin
 * @author Massimo Della Rovere
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 */
if (!defined('SZ_PLUGIN_GOOGLE') or !SZ_PLUGIN_GOOGLE) {
    die;
}
// Creating array to list the fields that must be
// present in the form before calling wp_parse_args ()
$array = array('title' => '', 'width' => '', 'height' => '', 'width_auto' => '', 'height_auto' => '', 'lat' => '', 'lng' => '', 'zoom' => '', 'view' => '', 'layer' => '', 'wheel' => '', 'marker' => '', 'lazyload' => '', 'action' => 'A');
// Creating arrays to list of fields to be retrieved FORM
// and loading the file with the HTML template to display
$OBJC = new SZGoogleActionMaps();
extract((array) $OBJC->checkOptions(wp_parse_args($instance, $array), EXTR_OVERWRITE));
// Loading ADMIN template for composition using
// shortcodes in many cases the same code Widget
@(include dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/mce/shortcodes/SZGoogleBaseHeader.php');
@(include dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/widgets/SZGoogleWidgetMaps.php');
@(include dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/mce/shortcodes/SZGoogleBaseFooter.php');