コード例 #1
0
ファイル: wpl_ajax.php プロジェクト: gvh1993/project-vvvh
 /**
  * load activity options such a layout and options
  * @param string $activity_name Activity name
  * @param string $current_layout current selected layout for this activity
  */
 private function load_options($activity_name, $current_layout)
 {
     $current_activity = wpl_activity::get_activity("AND `activity`='" . wpl_db::escape($activity_name) . "'");
     $current_activity = wpl_activity::get_activity_name_layout($current_activity->activity);
     $returnData = array();
     $optionPath = wpl_activity::get_activity_option_form($activity_name);
     $returnData['layouts'] = wpl_activity::load_layouts_html($activity_name, $current_layout);
     if ($optionPath) {
         ob_start();
         include $optionPath;
         $returnData['options'] = ob_get_contents();
         ob_end_clean();
     } else {
         $returnData['options'] = __("This activity doesn't have options!", WPL_TEXTDOMAIN);
     }
     echo json_encode($returnData);
     exit;
 }
コード例 #2
0
ファイル: default.php プロジェクト: amankatoch/wp-plugin
</th>
                    <th scope="col" class="manage-column"><?php 
echo __('Position', WPL_TEXTDOMAIN);
?>
</th>
                    <th></th>
                    <th scope="col" class="manage-column wpl_actions_td"><?php 
echo __('Actions', WPL_TEXTDOMAIN);
?>
</th>
                </tr>
            </tfoot>
            <tbody class="sortable_activity">
                <?php 
foreach ($this->activities as $activity) {
    $activity_field_name = wpl_activity::get_activity_name_layout($activity->activity);
    /** Skip Backend Activity **/
    if (wpl_activity::check_activity($activity_field_name[0], wpl_activity::ACTIVITY_BACKEND)) {
        continue;
    }
    ?>
                    <tr id="<?php 
    echo $activity->id;
    ?>
">
                        <td class="size-1"><?php 
    echo $activity->id;
    ?>
</td>
                        <td class="wpl_activity_title"><?php 
    echo $activity->title;