Exemplo n.º 1
0
<?php

require_once '../../../../../wp-config.php';
//require_once(ABSPATH . 'wp-admin/admin-functions.php');
//require_once(ABSPATH . 'wp-admin/admin-db.php');
K2SBM::direct_bootstrap();
Exemplo n.º 2
0
<?php

$modules = K2SBM::get_installed_modules();
$base_module = $k2sbm_registered_modules[$module->type];
?>

<div id="optionstab-content" class="tabcontent">
	<p id="type-container">
		<span><?php 
_e('Type:', 'k2_domain');
?>
</span>
		<?php 
echo $modules[$module->type]['name'];
?>
	</p>

	<p id="name-container">
		<label for="module-name" class="titlelabel"><?php 
_e('Title', 'k2_domain');
?>
</label>
		<input id="module-name" name="module_name" type="text" value="<?php 
echo attribute_escape($module->name);
?>
" />

		<input id="output-show-title" name="output[show_title]" type="checkbox"<?php 
if ($module->output['show_title']) {
    ?>
 checked="checked"<?php 
Exemplo n.º 3
0
function unregister_widget_control($name)
{
    K2SBM::unregister_sidebar_module_control($name);
}
Exemplo n.º 4
0
<?php

// Update Columns Number
if (isset($_POST['columns_number'])) {
    update_option('k2columns', $_POST['columns_number']);
}
$column_number = get_option('k2columns');
$column_options = array(1 => __('One Column', 'k2_domain'), __('Two Columns', 'k2_domain'), __('Three Columns', 'k2_domain'));
$modules = K2SBM::get_installed_modules();
$sidebars = K2SBM::get_sidebars();
$disabled = K2SBM::get_disabled();
?>

<?php 
include 'header.php';
?>

<div id="optionswindow">
	<a href="#" id="closelink" title="Close"></a>

	<div class="opttl"> </div>
	<div class="optt"> </div>
	<div class="opttr"> </div>

	<div class="optl"> </div>
	<div class="optr"> </div>

	<div class="optbl"> </div>
	<div class="optb"> </div>
	<div class="optbr"> </div>
Exemplo n.º 5
0
 function displayControl()
 {
     global $k2sbm_registered_modules, $k2sbm_current_module;
     // Handle the module name form
     if (isset($_POST['module_name']) and trim((string) $_POST['module_name']) != '') {
         $this->name = stripslashes((string) $_POST['module_name']);
     } else {
         K2SBM::set_error_text(__('You must specify a valid module name', 'k2_domain'));
     }
     // Handle the advanced output options form
     if (isset($_POST['output'])) {
         // Don't set anything...
         foreach ($this->output as $key => $value) {
             $this->output[$key] = false;
         }
         // ...unless given
         foreach ($_POST['output'] as $key => $value) {
             $this->output[$key] = $value;
         }
     }
     // Handle the module display form
     if (isset($_POST['display'])) {
         // Store the page and post IDs, AJAX mess
         $old_post_id = $this->display['post_id'];
         $old_page_id = $this->display['page_id'];
         // Don't display anything...
         foreach ($this->display as $page => $display) {
             $this->display[$page] = false;
         }
         // ...unless specified
         foreach ($_POST['display'] as $page => $display) {
             $this->display[$page] = $display;
         }
         // Add the exceptional circumstances, if required
         if (!isset($_POST['display']['post_id'])) {
             $this->display['post_id'] = $old_post_id;
         }
         if (!isset($_POST['display']['page_id'])) {
             $this->display['page_id'] = $old_page_id;
         }
     }
     $k2sbm_current_module = $this;
     // Display the generic edit form
     extract(array('module' => $this));
     include TEMPLATEPATH . '/app/display/sbm/edit-module-form.php';
     // Update options in any PHP < 5
     if (version_compare(PHP_VERSION, '5.0') < 0) {
         foreach ($k2sbm_current_module->options as $key => $value) {
             $this->update_option($key, $value);
         }
     }
     $k2sbm_current_module = false;
     // Get the base module details
     $base_module = $k2sbm_registered_modules[$this->type];
     if (function_exists($base_module['control_callback'])) {
         return true;
     } else {
         return false;
     }
 }