fix advert, remove useless add_settings_field() calls

parent dd58c420
......@@ -25,7 +25,7 @@ if(!class_exists('SexhackAdvert')) {
echo $args['before_widget'];
$id=$instance['advid'];
if ( ! empty($id))
echo $args['before_advid'] . do_shortcode('[sexadv adv='.$id.']'). $args['after_advid'];
echo /*$args['before_advid'] . */ do_shortcode('[sexadv adv='.$id.']'); //. $args['after_advid'];
echo $args['after_widget'];
}
......
......@@ -124,8 +124,8 @@ if(!class_exists('SexHackVideoGallery')) {
{
add_settings_section('sexhackme-gallery-settings', ' ', array($this, 'settings_section'), 'sexhackme-gallery-settings');
register_setting('sexhackme-gallery-settings', 'sexhack_gallery_slug');
add_settings_field('sexhack_gallery_slug', 'sexhack_gallery_slug', 'sexhack_gallery_slug',
array($this, 'settings_field'), 'sexhackme-gallery-settings', 'sexhackme-gallery-settings', 'sexhack_gallery_slug' );
//add_settings_field('sexhack_gallery_slug', 'sexhack_gallery_slug', 'sexhack_gallery_slug',
// array($this, 'settings_field'), 'sexhackme-gallery-settings', 'sexhackme-gallery-settings' );
}
......@@ -134,10 +134,12 @@ if(!class_exists('SexHackVideoGallery')) {
echo "<h2>SexHackMe Gallery Settings</h2>";
}
/*
public function settings_field($name)
{
echo $name;
}
*/
public function check_rewrite($rules)
{
......
......@@ -50,7 +50,7 @@ if(count($slug) > 1) {
require_once dirname( __FILE__ ) . '/inc/class-tgm-plugin-activation.php';
add_action( 'tgmpa_register', 'sexhackme_register_required_plugins' );
add_action( 'tgmpa_register', 'wp_SexHackMe\sexhackme_register_required_plugins' );
function sexhackme_register_required_plugins() {
......@@ -147,10 +147,12 @@ if(!class_exists('SexHackMe')) {
echo "<h3>Enable following functionalities:</h3>";
}
/*
public function settings_field($name)
{
echo $name;
}
*/
public function checkbox($res)
{
......@@ -177,8 +179,8 @@ if(!class_exists('SexHackMe')) {
add_settings_section('sexhackme-settings', ' ', array($this, 'settings_section'), 'sexhackme-settings');
//register_setting('sexhackme-settings', 'need_rewrite_flush');
foreach($this->SECTIONS as $section) {
add_settings_field($section['name'], $section['name'], $section['name'],
array($this, 'settings_field'), 'sexhackme-settings', 'sexhackme-settings', $section['name'] );
//add_settings_field($section['name'], $section['name'], $section['name'],
// array($this, 'settings_field'), 'sexhackme-settings', 'sexhackme-settings', $section['name'] );
register_setting('sexhackme-settings', $section['name']);
if(array_key_exists('require-page', $section) && ($section['require-page']))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment