function mb_get_user_topic_subscriptions_title() { return apply_filters('mb_get_user_topic_subscriptions_title', sprintf(__('%s Subscriptions', 'message-board'), mb_get_topic_label('singular_name'))); }
/** * Adds the board home link to `$items` array. * * @since 1.0.0 * @access public * @return void */ public function mb_do_board_home_link() { if (mb_is_forum_front()) { return; } $show_on_front = mb_get_show_on_front(); if ('forums' === $show_on_front) { $object = get_post_type_object(mb_get_forum_post_type()); $label = mb_get_forum_label('archive_title'); } elseif ('topics' === $show_on_front) { $object = get_post_type_object(mb_get_topic_post_type()); $label = mb_get_topic_label('archive_title'); } $this->items[] = sprintf('<a href="%s">%s</a>', esc_url(get_post_type_archive_link($object->name)), $label); }
/** * Adds the placeholder text to the editor textarea. * * @since 1.0.0 * @access public * @param string $html * @return string */ function mb_topic_the_editor_filter($html) { remove_filter('the_editor', 'mb_topic_the_editor_filter'); return str_replace('<textarea', '<textarea placeholder="' . mb_get_topic_label('mb_form_content_placeholder') . '"', $html); }
function mb_get_edit_page_title() { $title = ''; if (mb_is_forum_edit()) { $title = sprintf(mb_get_forum_label('mb_form_edit_item'), mb_get_forum_title()); } elseif (mb_is_topic_edit()) { $title = sprintf(mb_get_topic_label('mb_form_edit_item'), mb_get_topic_title()); } elseif (mb_is_reply_edit()) { $title = sprintf(mb_get_reply_label('mb_form_edit_item'), mb_get_reply_title()); } elseif (mb_is_user_edit()) { $title = __('Edit User', 'message-board'); } return apply_filters('mb_get_edit_title', $title); }
<fieldset> <legend><?php mb_topic_label('add_new_item'); ?> </legend> <p class="mb-form-title"> <label for="mb_topic_title"><?php mb_topic_label('mb_form_title'); ?> </label> <input type="text" id="mb_topic_title" name="mb_topic_title" value="<?php echo esc_attr(mb_get_topic_title()); ?> " placeholder="<?php echo esc_attr(mb_get_topic_label('mb_form_title_placeholder')); ?> " /> </p><!-- .mb-form-title --> <?php if (!mb_is_single_forum()) { ?> <p class="mb-form-parent"> <label for="mb_forum_id"><?php mb_topic_label('parent_item_colon'); ?> </label> <?php mb_dropdown_forums(array('child_type' => mb_get_topic_post_type(), 'name' => 'mb_forum_id', 'id' => 'mb_forum_id', 'selected' => mb_get_topic_forum_id()));
function mb_topic_label($label) { echo mb_get_topic_label($label); }
/** * Custom "enter title here" text. * * @since 1.0.0 * @access public * @param string $title * @param object $post * @return string */ function mb_enter_title_here($title, $post) { if (mb_is_forum($post->ID)) { $title = mb_get_forum_label('mb_form_title_placeholder'); } elseif (mb_is_topic($post->ID)) { $title = mb_get_topic_label('mb_form_title_placeholder'); } return $title; }