необходимо принять правила конфиденциальности'; endif; } /**/ add_action('comment_form', 'ats_privacy_policy_po_s'); // for the usual custom comment form add_action('mihalica_comment_form', 'ats_privacy_policy_po_s'); // for custom comment form function ats_privacy_policy_po_s($id) { $all_options = get_option('atss_options'); // this is the configuration array if (!is_user_logged_in()) : print ''. $all_options['atsy_textsssy_non'] . ''; endif; } /**/ add_action('comment_post', 'ats_privacy_policy_sytes'); function ats_privacy_policy_sytes($id) { if (!is_user_logged_in()) : if (!$_POST['submit-privacy']) : $updated_status = 'trash'; wp_set_comment_status($id, $updated_status); wp_die('Вы не приняли правила конфиденциальности: вернитесь и подтвердите согласие... Ваш набранный текст в форме замечательно сохранён! You did not accept the privacy rules: go back and accept... Your typed text in the form of a wonderfully saved!

←Назад | Back

'); endif; endif; } /** THE COMMENTING FORM - PRIVACY POLICY style="width:auto;margin:5px;" */ /* start added to the ADMIN bar menu * function add_miha_ats_admin_bar_link() { global $wp_admin_bar; if ( !is_super_admin() || !is_admin_bar_showing() ) return; $wp_admin_bar->add_menu( array( 'id' => 'add_my_atsy', // Can be any value and must be unique 'title' => __( 'МЕНЮ-КОНСОЛИ'), // The display title in the Menu 'href' => __('/wp-admin/'), )); // To add submenu links to similar $wp_admin_bar->add_menu( array( 'parent' => 'add_my_atsy', // Can be any value and must be unique 'id' => 'views_ats_plag', // Unique identifier of the parent menu 'title' => __( 'смотреть ATs плагины'), // The display title in the Menu 'href' => __('/wp-admin/plugin-install.php?s=+ATs.M&tab=search&type=term'), )); // To add submenu links to similar $wp_admin_bar->add_menu( array( 'parent' => 'add_my_atsy', // Can be any value and must be unique 'id' => 'views_ats_plagy', 'title' => __( 'плагины'), 'href' => __('/wp-admin/plugins.php'), )); $wp_admin_bar->add_menu( array( 'parent' => 'add_my_atsy', // Unique identifier of the parent menu 'id' => 'views_ats_ops', 'title' => __( 'ОПЦИИ WP'), 'href' => __('/wp-admin/options.php'), )); } add_action('admin_bar_menu', 'add_miha_ats_admin_bar_link',39); /* fin added to the ADMIN bar menu */