public static function init() { $dir = dirname(__FILE__) . '/'; require_once $dir . 'class-utils.php'; require_once $dir . 'class-diy-options.php'; require_once $dir . 'class-credits-options.php'; require_once $dir . 'class-credits.php'; require_once $dir . 'class-credits-widgets.php'; require_once $dir . 'class-trademarks-widgets.php'; Footer_Credits_Options::init(); Footer_Credits::init(); }
function save_credits() { check_admin_referer(__CLASS__); $page_options = explode(',', stripslashes($_POST['page_options'])); if ($page_options) { $options = Footer_Credits_Options::get_options(); foreach ($page_options as $option) { $val = array_key_exists($option, $_POST) ? trim(stripslashes($_POST[$option])) : ''; if (Footer_Credits_Options::is_terms_key($option)) { $options['terms'][$option] = $val; } else { switch ($option) { case 'footer_remove': $options[$option] = !empty($val); break; case 'footer_hook': case 'footer_filter_hook': $options[$option] = preg_replace('/\\W/', '', $val); break; default: $options[$option] = trim($val); } } } //end for ; $saved = Footer_Credits_Options::save_options($options); $message = $saved ? 'updated successfully' : 'have not been updated'; $is_error = false; } else { $message = 'not found!'; $is_error = true; } $this->add_admin_notice('Footer Settings ', $message, $is_error); return $saved; }
public static function init() { self::theme_specific_defaults(); self::$options = new Footer_Putter_DIY_Options(self::OPTIONS_NAME, self::$defaults); }
public static function add_terms_footer($content) { $terms = Footer_Credits_Options::get_terms(); $disputes = <<<DISPUTES <h2>Dispute Resolution</h2> <p>These terms, and any dispute arising from the use of this site, will be governed by {$terms['courts']} without regard to its conflicts of laws provisions.</p> DISPUTES; $feedback = <<<FEEDBACK <h2>Feedback And Information</h2> <p>Any feedback you provide at this site shall be deemed to be non-confidential. {$terms['owner']} shall be free to use such information on an unrestricted basis.</p> <p>The terms and conditions for this web site are subject to change without notice.<p> <p>{$terms['copyright']} {$terms['owner']} All rights reserved.<br/> {$terms['owner']}, {$terms['address']} {$terms['country']}</p> <p>Updated by The {$terms['owner']} Legal Team on {$terms['updated']}</p> FEEDBACK; if (strpos($content, '%%') == FALSE) { $content .= $terms['courts'] ? $disputes : ''; $content .= $terms['address'] ? $feedback : ''; } return $content; }