nm = init_90min(); // main 90min instance add_action( 'admin_menu', array( $this, 'action_admin_menu' ) ); add_action( 'admin_init', array( $this, 'register_settings' ) ); } /** * Register the settings page * * @since 1.0 */ public function action_admin_menu() { $this->hook = add_options_page( __( '90min Settings', '90min' ), //
Once the plugin is activated, you will be able to select your desired content type and more.
', '90min' ) ) ); /* $screen->add_help_tab( array( 'title' => __( 'Additional Help', '90min' ), 'id' => '90min-additionalhelp', 'content' => __( 'OpenTracker runs several times faster than older tracker implementations and requires less memory. (For example, it runs fine with the limited resources of many embedded systems.) Several instances of the software may be run in a cluster, with all of them synchronizing with each other. Besides the Hypertext Transfer Protocol (HTTP) opentracker may also be connected to via User Datagram Protocol (UDP), which creates less than half of the tracker traffic HTTP creates.[1] It supports IPv6, gzip compression of full scrapes, and blacklists of torrents. Because there have already been cases of people being accused of copyright violation by the fact that their IP address was listed on a BitTorrent tracker,[2] opentracker may mix in random IP address numbers for the purpose of plausible deniability.
Amazing! screen provides access to the tickets (or ticket types) you have created. Each ticket is has various attributes like price and quantity. The total amount of available tickets determines the maximum capacity of the event. Please note that once the ticket has been published, editing things like price or questions can break data consistency, since attendees may have already bought the ticket with the old data. Also, once a ticket has been published, please keep it published. Do not revert to draft, pending or trash.
Use the Screen Options panel to show and hide the columns that matter most.
', '90min' ), ) ); */ $screen->set_help_sidebar( __( 'For more information:
', '90min' ) ); } private function add_settings_field( $section, $key, $field_type, $label, $description = '', $extra_args = array() ) { $args = wp_parse_args( $extra_args, array( 'id' => $key, 'page' => $this->slug, 'description' => $description, ) ); return add_settings_field( $key, $label, array( 'MC_90min_Settings_Controls', $field_type ), $this->slug, $section, $args ); } public function get_supported_languages() { if ( ! empty( $this->supported_languages ) ) return $this->supported_languages; $decoded = NM_Util::read_json('supported_languages.json'); if ( !$decoded ) return array(); return $this->supported_languages = $decoded; } public function get_supported_languages_iso() { $langs = array(); foreach ( (array) $this->get_supported_languages() as $language_code => $language ) { $langs[ $language_code ] = $language; } return $langs; } public function register_settings() { global $pagenow; // If no options exist, create them. if ( ! get_option( $this->slug ) ) { update_option( $this->slug, apply_filters( '90min_default_options', array( 'partner-id' => '', 'api-key' => '', 'post-type' => 'post', 'tagging-tax' => 'post_tag', 'post-status' => 'publish', 'language' => 'en', 'first-save-made' => false, 'is-authenticated' => false, 'update-featured-image' => true, ) ) ); } register_setting( '90min-options', $this->slug, array( $this, 'validate' ) ); // First, we register a section. This is necessary since all future options must belong to a add_settings_section( 'general_settings_section', __( 'Account Details', '90min' ), array( 'MC_90min_Settings_Controls', 'description' ), $this->slug ); $this->add_settings_field( 'general_settings_section', 'partner-id', 'text', __( 'Partner ID', '90min' ) ); $this->add_settings_field( 'general_settings_section', 'api-key', 'text', __( 'API Key', '90min' )/*, sprintf( '%s', '#', _x( 'Where can I find my API key?', 'settings page', '90min' ) )*/ ); $this->add_settings_field( 'general_settings_section', 'auth-button-area', 'auth_button', '' ); $this->add_settings_field( 'general_settings_section', 'ajax-auth-nonce', 'hidden', '', '', array( 'value' => wp_create_nonce( '90min-ajax-auth' ) ) ); // Post setting section add_settings_section( 'post_settings_section', __( 'Post Settings', '90min' ), array( 'MC_90min_Settings_Controls', 'description' ), $this->slug ); $this->add_settings_field( 'post_settings_section', 'display-post-title', 'checkbox', __( 'Post Title', '90min' ), '', array( 'label' => __( 'Do not show title in post body', '90min' ) ) ); $this->add_settings_field( 'post_settings_section', 'display-views-counter', 'checkbox', __( 'Views Counter', '90min' ), '', array( 'label' => __( 'Hide 90min number of views counter', '90min' ) ) ); $this->add_settings_field( 'post_settings_section', 'update-featured-image', 'checkbox', __( 'Featured Image', '90min' ), '', array( 'label' => __( 'Set the article’s main image as your ‘Featured Image’.', '90min' ) ) ); $_post_types_found = get_post_types( array( 'public' => true, 'show_ui' => true, ) ); // clear "attachment" post type if ( isset($_post_types_found['attachment']) ) unset( $_post_types_found['attachment'] ); $this->add_settings_field( 'post_settings_section', 'post-type', 'select', __( 'Post Type', '90min' ), '', array( 'options' => apply_filters( '90min_supported_post_types', $_post_types_found ) // post types ) ); $settings_saved_post_type = MC_90min_Settings_Controls::get_option( 'post-type' ); // "post" is default $selected_post_type = apply_filters( '90min_post_type', $settings_saved_post_type ? $settings_saved_post_type : 'post' ); $all_post_statuses = get_available_post_statuses( $selected_post_type ); $this->add_settings_field( 'post_settings_section', 'post-status', 'select', __( 'Post Status', '90min' ), '', array( 'options' => array_combine( $all_post_statuses, $all_post_statuses ) ) ); // tagging taxonomy $supported_taxos = get_object_taxonomies( $selected_post_type, 'objects' ); $supported_taxos_list = array(); foreach ( $supported_taxos as $supported_tax_key => $supported_tax ) { // if this is post_format, ignore if ( 'post_format' == $supported_tax_key ) continue; $supported_taxos_list[ $supported_tax_key ] = $supported_tax->labels->singular_name; } if ( ! empty($supported_taxos_list) ) { $this->add_settings_field( 'post_settings_section', 'tagging-tax', 'select', __( 'Tagging Taxonomy', '90min' ), '', array( 'options' => $supported_taxos_list ) ); } $authors = get_users(); $authors_option = array(); foreach ( $authors as $author ) { $authors_option[ $author->ID ] = $author->display_name; } $this->add_settings_field( 'post_settings_section', 'post-author', 'select', __( 'Post Author', '90min' ), __( 'The posts will be attributed to this author', '90min' ), array( 'options' => $authors_option, ) ); /*$this->add_settings_field( 'post_settings_section', 'hide-author-name', 'checkbox', __( 'Author', '90min' ), '', array( 'label' => __( 'Hide author name?', '90min' ) ) );*/ // Feed Selection section add_settings_section( 'feed_selection_settings_section', __( 'Feed Selection', '90min' ), array( 'MC_90min_Settings_Controls', 'description' ), $this->slug ); // $supported_languages = $this->get_supported_languages(); $supported_languages = $this->get_supported_languages_iso(); $this->add_settings_field( 'feed_selection_settings_section', 'language', 'select', __( 'Language', '90min' ), '', array( 'options' => $supported_languages ) ); $this->add_settings_field( 'feed_selection_settings_section', 'leagues', 'select_special', __( 'Leagues / Teams', '90min' ), '', array( 'options' => array('a' => 'b'), 'multi' => true ) ); $this->add_settings_field( 'feed_selection_settings_section', 'categories', 'checkbox_group', __( 'Categories', '90min' ), '', array( 'options' => array( 'a' => 'b'), 'multi' => true, ) ); // don't register this setting on all pages /* if ( 'options-general.php' == $pagenow && $user_info && isset( $user_info->type ) && 'free' != $user_info->type ) {} */ do_action( '90min_setup_settings_fields' ); } public function display_settings_page() { ?>90min plugin allows you to automatically integrated 90min content into WordPress posts and pages
90min.com/partners', 'WPsupport@90min.com' ); ?>