Changeset 3306743
- Timestamp:
- 06/04/2025 09:51:27 PM (10 months ago)
- Location:
- forumwp
- Files:
-
- 6 deleted
- 33 edited
- 1 copied
-
assets/blueprints/blueprint.json (modified) (1 diff)
-
tags/2.1.4 (copied) (copied from forumwp/trunk)
-
tags/2.1.4/.distignore (deleted)
-
tags/2.1.4/.git (deleted)
-
tags/2.1.4/assets/front/js/topic-popup.js (modified) (1 diff)
-
tags/2.1.4/assets/front/js/topic-popup.min.js (modified) (1 diff)
-
tags/2.1.4/forumwp.php (modified) (1 diff)
-
tags/2.1.4/includes/ajax/class-forum.php (modified) (2 diffs)
-
tags/2.1.4/includes/ajax/class-reply.php (modified) (3 diffs)
-
tags/2.1.4/includes/class-fmwp-functions.php (modified) (1 diff)
-
tags/2.1.4/includes/class-modules.php (modified) (1 diff)
-
tags/2.1.4/includes/common/class-common.php (modified) (2 diffs)
-
tags/2.1.4/includes/common/class-forum.php (modified) (3 diffs)
-
tags/2.1.4/includes/common/class-options.php (modified) (3 diffs)
-
tags/2.1.4/includes/common/class-reply.php (modified) (4 diffs)
-
tags/2.1.4/includes/common/class-topic.php (modified) (2 diffs)
-
tags/2.1.4/includes/frontend/class-shortcodes.php (modified) (3 diffs)
-
tags/2.1.4/languages/forumwp.pot (modified) (65 diffs)
-
tags/2.1.4/package-lock.json (deleted)
-
tags/2.1.4/readme.txt (modified) (2 diffs)
-
tags/2.1.4/templates/js/forum-row.php (modified) (2 diffs)
-
trunk/.distignore (deleted)
-
trunk/.git (deleted)
-
trunk/assets/front/js/topic-popup.js (modified) (1 diff)
-
trunk/assets/front/js/topic-popup.min.js (modified) (1 diff)
-
trunk/forumwp.php (modified) (1 diff)
-
trunk/includes/ajax/class-forum.php (modified) (2 diffs)
-
trunk/includes/ajax/class-reply.php (modified) (3 diffs)
-
trunk/includes/class-fmwp-functions.php (modified) (1 diff)
-
trunk/includes/class-modules.php (modified) (1 diff)
-
trunk/includes/common/class-common.php (modified) (2 diffs)
-
trunk/includes/common/class-forum.php (modified) (3 diffs)
-
trunk/includes/common/class-options.php (modified) (3 diffs)
-
trunk/includes/common/class-reply.php (modified) (4 diffs)
-
trunk/includes/common/class-topic.php (modified) (2 diffs)
-
trunk/includes/frontend/class-shortcodes.php (modified) (3 diffs)
-
trunk/languages/forumwp.pot (modified) (65 diffs)
-
trunk/package-lock.json (deleted)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/js/forum-row.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
forumwp/assets/blueprints/blueprint.json
r3205107 r3306743 16 16 "pluginZipFile": { 17 17 "resource": "url", 18 "url": "https:\/\/downloads.wordpress.org\/plugin\/forumwp.2.1. 3.zip"18 "url": "https:\/\/downloads.wordpress.org\/plugin\/forumwp.2.1.4.zip" 19 19 }, 20 20 "options": { -
forumwp/tags/2.1.4/assets/front/js/topic-popup.js
r3205107 r3306743 77 77 78 78 form.find('input, #wp-fmwptopiccontent-wrap').removeClass('fmwp-error-field').removeAttr('title'); 79 80 data = wp.hooks.applyFilters( 'fmwp_topic_popup_submitted_data', data, form ); 79 81 80 82 fmwp_set_busy( 'topic_popup', true ); -
forumwp/tags/2.1.4/assets/front/js/topic-popup.min.js
r3205107 r3306743 1 jQuery(document).ready(function(r){var i,e,o;r(document.body).on("click","#fmwp-topic-popup-preview-action",function(){var p=r(this).parents("#fmwp-topic-popup-editors");p.hasClass("fmwp-topic-popup-preview-hidden")?(p.removeClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("hide_label")),r("#fmwptopiccontent-preview").html(r("#fmwptopiccontent").val())):(p.addClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("show_label"))),fmwp_resize_popup()}),r(document.body).on("click",".fmwp-topic-popup-discard",function(){var t;fmwp_is_busy("topic_popup")||(t=r(this).parents("#fmwp-topic-popup-wrapper")).hide(1,function(){t.find("form")[0].reset(),r("#fmwptopiccontent").val(""),r("#fmwptopiccontent-preview").html(""),t.removeClass("fmwp-fullsize");var p=t.find("#fmwp-topic-popup-preview-action");p.html(p.data("hide_label")),t.find("#fmwp-topic-popup-editors").removeClass("fmwp-topic-popup-preview-hidden")})}),r(document.body).on("click",".fmwp-topic-popup-submit",function(p){var s,n,t,i,e,a,c,f;p.preventDefault(),fmwp_is_busy("topic_popup")||((s=r(this)).siblings(".fmwp-ajax-loading").css("visibility","visible").show(),s.css("visibility","hidden"),n=r("#fmwp-topic-popup-wrapper"),p=r(this).parents("form"),t=p.serializeArray(),i="undefined"!=typeof tinymce?tinyMCE.get("fmwptopiccontent").getContent({format:"raw"}):r("#fmwptopiccontent").val(),e={},r.each(t,function(p){"fmwp-topic[content]"===t[p].name?e[t[p].name]=i:e[t[p].name]=t[p].value}),a=e["fmwp-topic[forum_id]"],c=e["fmwp-topic[topic_id]"],f="edit-topic"===e["fmwp-action"]?"fmwp_edit_topic":"fmwp_create_topic",p.find("input, #wp-fmwptopiccontent-wrap").removeClass("fmwp-error-field").removeAttr("title"), fmwp_set_busy("topic_popup",!0),wp.ajax.send(f,{data:e,success:function(t){if("fmwp_edit_topic"==f){var i=n.data("fmwp-target"),p=t,e=c;"forum-page"===i||"topics-page"===i?(o=wp.template("fmwp-topic")(p),r(".fmwp-topics-wrapper").find('.fmwp-topic-row[data-topic_id="'+e+'"]').replaceWith(o)):"topic-page"===i&&(r(".fmwp-topic-title").html(p.title),r(".fmwp-topic-data-content").html(p.content),r(".fmwp-topic-stats.fmwp-tags-stats").length&&(e=wp.template("fmwp-topic-tags-line")(p.tags),r(".fmwp-topic-stats.fmwp-tags-stats").html(e)),wp.hooks.doAction("fmwp_after_edit_topic",p))}else{var o=t,i=a;o=wp.template("fmwp-topic")(o);let p=(i=r('.fmwp-topics-wrapper[data-fmwp_forum_id="'+i+'"]')).find(".fmwp-forum-sort:visible").val();i.length||(i=r(".fmwp-archive-topics-wrapper .fmwp-topics-wrapper"),p=r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible").val()),"date_desc"===p?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").length?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-pinned:last").length?i.find(".fmwp-topic-row.fmwp-topic-pinned:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-global:last").length?i.find(".fmwp-topic-row.fmwp-topic-global:last").after(o):i.prepend(o):"date_asc"===p&&i.append(o),i.find(".fmwp-forum-no-topics").length&&i.find(".fmwp-forum-no-topics").remove(),i.find(".fmwp-topic-actions-dropdown").length?i.siblings(".fmwp-topics-wrapper-heading").removeClass("fmwp-no-actions-heading"):i.siblings(".fmwp-topics-wrapper-heading").addClass("fmwp-no-actions-heading")}fmwp_set_busy("topic_popup",!1),r(".fmwp-topic-popup-discard:first").trigger("click"),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible");e=r('.fmwp-forum-head[data-fmwp_forum_id="'+a+'"]');(e.length?e.find(".fmwp-forum-sort:visible"):r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible")).trigger("change")},error:function(t){t.errors?r.each(t.errors,function(p){jQuery("#"+t.errors[p].field).addClass("fmwp-error-field").attr("title",t.errors[p].message)}):(console.log(t),r(this).fmwp_notice({message:t,type:"error"})),fmwp_set_busy("topic_popup",!1),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible")}}))}),r(document.body).on("keyup","#fmwptopiccontent",(i=function(p){var t;r(this).parents("#fmwp-topic-popup-editors").hasClass("fmwp-topic-popup-preview-hidden")||fmwp_is_busy("topic_popup_preview")||(t=fmwp_stringToHash(this.value))!=r(this).data("content-hash")&&(r(this).data("content-hash",t),fmwp_set_busy("topic_popup_preview",!0),wp.ajax.send("fmwp_topic_build_preview",{data:{content:this.value,nonce:fmwp_front_data.nonce},success:function(p){r("#fmwptopiccontent-preview").html(p),fmwp_set_busy("topic_popup_preview",!1)},error:function(p){console.log(p),r(this).fmwp_notice({message:p,type:"error"}),fmwp_set_busy("topic_popup_preview",!1)}}))},e=1e3,o=0,function(){var p=this,t=arguments;clearTimeout(o),o=setTimeout(function(){i.apply(p,t)},e||0)}))});1 jQuery(document).ready(function(r){var i,e,o;r(document.body).on("click","#fmwp-topic-popup-preview-action",function(){var p=r(this).parents("#fmwp-topic-popup-editors");p.hasClass("fmwp-topic-popup-preview-hidden")?(p.removeClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("hide_label")),r("#fmwptopiccontent-preview").html(r("#fmwptopiccontent").val())):(p.addClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("show_label"))),fmwp_resize_popup()}),r(document.body).on("click",".fmwp-topic-popup-discard",function(){var t;fmwp_is_busy("topic_popup")||(t=r(this).parents("#fmwp-topic-popup-wrapper")).hide(1,function(){t.find("form")[0].reset(),r("#fmwptopiccontent").val(""),r("#fmwptopiccontent-preview").html(""),t.removeClass("fmwp-fullsize");var p=t.find("#fmwp-topic-popup-preview-action");p.html(p.data("hide_label")),t.find("#fmwp-topic-popup-editors").removeClass("fmwp-topic-popup-preview-hidden")})}),r(document.body).on("click",".fmwp-topic-popup-submit",function(p){var s,n,t,i,e,a,c,f;p.preventDefault(),fmwp_is_busy("topic_popup")||((s=r(this)).siblings(".fmwp-ajax-loading").css("visibility","visible").show(),s.css("visibility","hidden"),n=r("#fmwp-topic-popup-wrapper"),p=r(this).parents("form"),t=p.serializeArray(),i="undefined"!=typeof tinymce?tinyMCE.get("fmwptopiccontent").getContent({format:"raw"}):r("#fmwptopiccontent").val(),e={},r.each(t,function(p){"fmwp-topic[content]"===t[p].name?e[t[p].name]=i:e[t[p].name]=t[p].value}),a=e["fmwp-topic[forum_id]"],c=e["fmwp-topic[topic_id]"],f="edit-topic"===e["fmwp-action"]?"fmwp_edit_topic":"fmwp_create_topic",p.find("input, #wp-fmwptopiccontent-wrap").removeClass("fmwp-error-field").removeAttr("title"),e=wp.hooks.applyFilters("fmwp_topic_popup_submitted_data",e,p),fmwp_set_busy("topic_popup",!0),wp.ajax.send(f,{data:e,success:function(t){if("fmwp_edit_topic"==f){var i=n.data("fmwp-target"),p=t,e=c;"forum-page"===i||"topics-page"===i?(o=wp.template("fmwp-topic")(p),r(".fmwp-topics-wrapper").find('.fmwp-topic-row[data-topic_id="'+e+'"]').replaceWith(o)):"topic-page"===i&&(r(".fmwp-topic-title").html(p.title),r(".fmwp-topic-data-content").html(p.content),r(".fmwp-topic-stats.fmwp-tags-stats").length&&(e=wp.template("fmwp-topic-tags-line")(p.tags),r(".fmwp-topic-stats.fmwp-tags-stats").html(e)),wp.hooks.doAction("fmwp_after_edit_topic",p))}else{var o=t,i=a;o=wp.template("fmwp-topic")(o);let p=(i=r('.fmwp-topics-wrapper[data-fmwp_forum_id="'+i+'"]')).find(".fmwp-forum-sort:visible").val();i.length||(i=r(".fmwp-archive-topics-wrapper .fmwp-topics-wrapper"),p=r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible").val()),"date_desc"===p?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").length?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-pinned:last").length?i.find(".fmwp-topic-row.fmwp-topic-pinned:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-global:last").length?i.find(".fmwp-topic-row.fmwp-topic-global:last").after(o):i.prepend(o):"date_asc"===p&&i.append(o),i.find(".fmwp-forum-no-topics").length&&i.find(".fmwp-forum-no-topics").remove(),i.find(".fmwp-topic-actions-dropdown").length?i.siblings(".fmwp-topics-wrapper-heading").removeClass("fmwp-no-actions-heading"):i.siblings(".fmwp-topics-wrapper-heading").addClass("fmwp-no-actions-heading")}fmwp_set_busy("topic_popup",!1),r(".fmwp-topic-popup-discard:first").trigger("click"),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible");e=r('.fmwp-forum-head[data-fmwp_forum_id="'+a+'"]');(e.length?e.find(".fmwp-forum-sort:visible"):r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible")).trigger("change")},error:function(t){t.errors?r.each(t.errors,function(p){jQuery("#"+t.errors[p].field).addClass("fmwp-error-field").attr("title",t.errors[p].message)}):(console.log(t),r(this).fmwp_notice({message:t,type:"error"})),fmwp_set_busy("topic_popup",!1),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible")}}))}),r(document.body).on("keyup","#fmwptopiccontent",(i=function(p){var t;r(this).parents("#fmwp-topic-popup-editors").hasClass("fmwp-topic-popup-preview-hidden")||fmwp_is_busy("topic_popup_preview")||(t=fmwp_stringToHash(this.value))!=r(this).data("content-hash")&&(r(this).data("content-hash",t),fmwp_set_busy("topic_popup_preview",!0),wp.ajax.send("fmwp_topic_build_preview",{data:{content:this.value,nonce:fmwp_front_data.nonce},success:function(p){r("#fmwptopiccontent-preview").html(p),fmwp_set_busy("topic_popup_preview",!1)},error:function(p){console.log(p),r(this).fmwp_notice({message:p,type:"error"}),fmwp_set_busy("topic_popup_preview",!1)}}))},e=1e3,o=0,function(){var p=this,t=arguments;clearTimeout(o),o=setTimeout(function(){i.apply(p,t)},e||0)}))}); -
forumwp/tags/2.1.4/forumwp.php
r3205107 r3306743 4 4 * Plugin URI: https://forumwpplugin.com/ 5 5 * Description: A full-featured, powerful forum plugin for WordPress 6 * Version: 2.1. 36 * Version: 2.1.4 7 7 * Author: ForumWP 8 * License: GPLv3 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt 8 10 * Text Domain: forumwp 9 11 * Domain Path: /languages -
forumwp/tags/2.1.4/includes/ajax/class-forum.php
r3205107 r3306743 76 76 'title' => $forum->post_title, 77 77 'permalink' => get_permalink( $forum->ID ), 78 'author' => FMWP()->user()->display_name( $author ),79 'author_url' => FMWP()->user()->get_profile_link( $author->ID ),80 'author_avatar' => FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ),78 'author' => $author ? FMWP()->user()->display_name( $author ) : '', 79 'author_url' => $author ? FMWP()->user()->get_profile_link( $author->ID ) : '', 80 'author_avatar' => $author ? FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ) : '', 81 81 'last_upgrade' => $last_upgrade, 82 82 'strip_content' => $strip_content, … … 92 92 'is_locked' => FMWP()->common()->forum()->is_locked( $forum->ID ), 93 93 'is_trashed' => FMWP()->common()->forum()->is_trashed( $forum->ID ), 94 'extra_classes' => '', 94 95 ); 95 96 -
forumwp/tags/2.1.4/includes/ajax/class-reply.php
r3182324 r3306743 50 50 $dropdown_actions = FMWP()->common()->reply()->actions_list( $reply ); 51 51 52 $author_url = FMWP()->user()->get_profile_link( $author->ID );53 54 $slug = FMWP()->user()->maybe_get_slug( $author->ID );55 56 52 $beauty_date = ''; 57 53 if ( ! FMWP()->common()->reply()->is_pending( $reply->ID ) ) { … … 69 65 'content' => nl2br( $reply->post_content ), 70 66 'permalink' => FMWP()->common()->reply()->get_link( $reply->ID ), 71 'author' => FMWP()->user()->display_name( $author ),72 'author_url' => $author _url,73 'author_avatar' => FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ),67 'author' => $author ? FMWP()->user()->display_name( $author ) : '', 68 'author_url' => $author ? FMWP()->user()->get_profile_link( $author->ID ) : '', 69 'author_avatar' => $author ? FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ) : '', 74 70 'date' => $date, 75 71 'beauty_date' => $beauty_date, … … 80 76 'more_answers' => count( $child ) > 2, 81 77 'total_replies' => $total_child, 82 'mention' => '@' . $slug,78 'mention' => $author ? '@' . FMWP()->user()->maybe_get_slug( $author->ID ) : '', 83 79 'is_trashed' => FMWP()->common()->reply()->is_trashed( $reply->ID ), 84 80 'can_edit' => $can_edit, 85 81 'author_tags' => FMWP()->common()->reply()->get_author_tags( $reply ), 86 'author_card' => FMWP()->user()->generate_card( $author->ID ),82 'author_card' => $author ? FMWP()->user()->generate_card( $author->ID ) : '', 87 83 'is_locked' => FMWP()->common()->reply()->is_locked( $reply ), 88 'is_author' => ( is_user_logged_in() && get_current_user_id() === $author->ID ),84 'is_author' => is_user_logged_in() && $author && get_current_user_id() === $author->ID, 89 85 'dropdown_actions' => $dropdown_actions, 90 86 'can_actions' => count( $dropdown_actions ), -
forumwp/tags/2.1.4/includes/class-fmwp-functions.php
r3205107 r3306743 534 534 public function get_template_part( $slug, $args = array(), $module = '' ) { 535 535 global $wp_query; 536 /** 537 * Fires just before the algorithm for getting ForumWP custom templates. 538 * 539 * Note: Allow 3rd party plugins or modules filter template file, arguments, module name from their side. 540 * 541 * @since 2.1.4 542 * @hook fmwp_change_template_part 543 * 544 * @param {string} $slug Template name passed by reference. 545 * @param {array} $args Arguments passed for the template by reference. 546 * @param {string} $module Module slug passed by reference. (default: ''). 547 */ 548 do_action_ref_array( 'fmwp_change_template_part', array( &$slug, &$args, &$module ) ); 536 549 537 550 $query_title = $this->undash( sanitize_title( $slug ) ); -
forumwp/tags/2.1.4/includes/class-modules.php
r3161123 r3306743 26 26 */ 27 27 public function __construct() { 28 add_action( 'forumwp_loaded', array( &$this, 'predefined_modules' ), 0 ); 28 // Register modules here on the early priority and then loading them on the `0` priority in common class. 29 add_action( 'forumwp_init', array( &$this, 'predefined_modules' ), -1 ); 29 30 } 30 31 -
forumwp/tags/2.1.4/includes/common/class-common.php
r3205107 r3306743 29 29 add_action( 'plugins_loaded', array( &$this, 'on_plugins_loaded' ), -19 ); 30 30 31 add_action( 'init', array( $this, 'init' ), 0 ); 31 32 // loading modules when forumwp is loaded 32 add_action( 'forumwp_loaded', array( FMWP()->modules(), 'load_modules' ), 1 ); 33 34 add_action( 'init', array( $this, 'init' ), 0 ); 33 add_action( 'forumwp_init', array( FMWP()->modules(), 'load_modules' ), 0 ); 35 34 36 35 add_action( 'admin_bar_menu', array( &$this, 'toolbar_links' ), 999 ); … … 549 548 } 550 549 551 552 550 /** 553 551 * -
forumwp/tags/2.1.4/includes/common/class-forum.php
r3205107 r3306743 37 37 */ 38 38 public function __construct() { 39 add_action( 'forumwp_init', array( &$this, 'init_variables' ), 9 ); 40 41 add_action( 'save_post_fmwp_forum', array( &$this, 'save_post' ), 999997 ); 42 43 add_filter( 'the_posts', array( &$this, 'filter_private_forums' ), 99 ); 44 add_filter( 'posts_where', array( &$this, 'filter_trashed_for_author' ), 10, 2 ); 45 46 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 47 } 48 49 /** 50 * Initialize variables for the class. 51 */ 52 public function init_variables() { 53 // Set visibilities. 39 54 $this->visibilities = array( 40 55 'public' => __( 'Public', 'forumwp' ), … … 43 58 ); 44 59 45 add_action( 'init', array( &$this, 'init_statuses' ) ); 46 47 add_action( 'save_post_fmwp_forum', array( &$this, 'save_post' ), 999997 ); 48 49 add_filter( 'the_posts', array( &$this, 'filter_private_forums' ), 99 ); 50 add_filter( 'posts_where', array( &$this, 'filter_trashed_for_author' ), 10, 2 ); 51 52 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 60 // Set statuses. 61 $this->post_status = array( 'publish' ); 62 if ( is_user_logged_in() ) { 63 $this->post_status[] = 'trash'; // will be visible for trash author or `manage_fmwp_forums_all`. See `$this->filter_trashed_for_author()`. 64 if ( current_user_can( 'manage_fmwp_forums_all' ) ) { 65 $this->post_status[] = 'private'; 66 $this->post_status[] = 'pending'; 67 } 68 } 53 69 } 54 70 … … 129 145 if ( $upgrade_last_update ) { 130 146 update_post_meta( $post_ID, 'fmwp_last_update', time() ); 131 }132 }133 134 /**135 * Set statuses136 */137 public function init_statuses() {138 $this->post_status = array( 'publish' );139 140 if ( is_user_logged_in() ) {141 $this->post_status[] = 'trash'; // will be visible for trash author or `manage_fmwp_forums_all`. See `$this->filter_trashed_for_author()`.142 if ( current_user_can( 'manage_fmwp_forums_all' ) ) {143 $this->post_status[] = 'private';144 $this->post_status[] = 'pending';145 }146 147 } 147 148 } -
forumwp/tags/2.1.4/includes/common/class-options.php
r3161123 r3306743 18 18 * @var array 19 19 */ 20 private $options = array();20 private $options; 21 21 22 22 /** … … 29 29 */ 30 30 public function __construct() { 31 $this-> init();32 $this->init_pages();31 $this->options = get_option( 'fmwp_options', array() ); // Force setting options variable here for getting them everywhere even on early hooks. 32 add_action( 'forumwp_init', array( $this, 'init_variables' ), 0 ); 33 33 } 34 34 … … 36 36 * Set variables 37 37 */ 38 public function init() { 39 $this->options = get_option( 'fmwp_options', array() ); 40 } 41 42 /** 43 * Set variables 44 */ 45 public function init_pages() { 38 public function init_variables() { 46 39 $core_pages = array_keys( FMWP()->config()->get( 'core_pages' ) ); 47 40 if ( ! empty( $core_pages ) ) { -
forumwp/tags/2.1.4/includes/common/class-reply.php
r3205107 r3306743 32 32 33 33 add_action( 'save_post_fmwp_reply', array( &$this, 'save_post' ), 999997, 3 ); 34 add_action( 'init', array( &$this, 'init_statuses' ), 10 );35 34 36 35 add_filter( 'posts_where', array( &$this, 'filter_pending_for_author' ), 10, 2 ); … … 40 39 41 40 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 41 } 42 43 /** 44 * Initialize variables for the forum replies. 45 */ 46 public function init_variables() { 47 // Set soring types. 48 $this->sort_by = apply_filters( 49 'fmwp_replies_sorting', 50 array( 51 'date_asc' => __( 'Oldest to Newest', 'forumwp' ), 52 'date_desc' => __( 'Newest to Oldest', 'forumwp' ), 53 ) 54 ); 55 // Set statuses. 56 $this->post_status = array( 'publish' ); 57 if ( is_user_logged_in() ) { 58 $this->post_status[] = 'pending'; 59 $this->post_status[] = 'trash'; 60 } 42 61 } 43 62 … … 113 132 } 114 133 115 public function init_variables() {116 $this->sort_by = apply_filters(117 'fmwp_replies_sorting',118 array(119 'date_asc' => __( 'Oldest to Newest', 'forumwp' ),120 'date_desc' => __( 'Newest to Oldest', 'forumwp' ),121 )122 );123 }124 125 134 /** 126 135 * @param int $reply_id … … 238 247 239 248 return $spam; 240 }241 242 /**243 * Set statuses244 */245 public function init_statuses() {246 $this->post_status = array( 'publish' );247 if ( is_user_logged_in() ) {248 $this->post_status[] = 'pending';249 $this->post_status[] = 'trash';250 }251 249 } 252 250 -
forumwp/tags/2.1.4/includes/common/class-topic.php
r3205107 r3306743 54 54 add_filter( 'posts_where', array( &$this, 'filter_pending_for_author' ), 10, 2 ); 55 55 56 add_action( 'init', array( &$this, 'init_statuses' ), 10 );57 58 56 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 59 57 } 60 58 61 62 /** 63 * Set statuses 64 */ 65 public function init_statuses() { 66 $this->post_status = array( 'publish' ); 67 if ( is_user_logged_in() ) { 68 $this->post_status[] = 'trash'; 69 $this->post_status[] = 'pending'; //pending can be visible for author 70 if ( current_user_can( 'manage_fmwp_topics_all' ) ) { 71 $this->post_status[] = 'private'; 72 } 73 } 74 } 75 76 77 /** 78 * @param $where 79 * @param $wp_query 80 * 81 * @return mixed 82 */ 83 public function filter_pending_for_author( $where, $wp_query ) { 84 if ( isset( $wp_query->query['post_type'] ) && 'fmwp_topic' === $wp_query->query['post_type'] ) { 85 if ( isset( $wp_query->query['post_status'] ) && ( 'pending' === $wp_query->query['post_status'] || ( is_array( $wp_query->query['post_status'] ) && in_array( 'pending', $wp_query->query['post_status'], true ) ) ) ) { 86 global $wpdb; 87 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 88 $current_user_id = get_current_user_id(); 89 90 $where = str_replace( "{$wpdb->posts}.post_status = 'pending'", "( {$wpdb->posts}.post_status = 'pending' AND {$wpdb->posts}.post_author = '" . $current_user_id . "' )", $where ); 91 $where = str_replace( 92 "{$wpdb->posts}.post_status = 'trash'", 93 "( {$wpdb->posts}.post_status = 'trash' AND {$wpdb->posts}.post_author = '$current_user_id' )", 94 $where 95 ); 96 } 97 } 98 } 99 100 return $where; 101 } 102 103 104 /** 105 * Make invisible topics from trashed forums 106 * 107 * @param $posts 108 * @param $query 109 * 110 * @return array 111 */ 112 public function filter_topics_from_hidden_forums( $posts, $query ) { 113 if ( FMWP()->is_request( 'admin' ) && ! FMWP()->is_request( 'ajax' ) ) { 114 return $posts; 115 } 116 117 $filtered_posts = array(); 118 119 //if empty 120 if ( empty( $posts ) ) { 121 return $posts; 122 } 123 124 foreach ( $posts as $post ) { 125 126 if ( 'fmwp_topic' !== $post->post_type ) { 127 $filtered_posts[] = $post; 128 continue; 129 } 130 131 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 132 if ( $this->is_spam( $post ) ) { 133 continue; 134 } 135 } 136 137 $forum_id = $this->get_forum_id( $post->ID ); 138 $forum = get_post( $forum_id ); 139 140 if ( in_array( $forum->post_status, array( 'private', 'pending' ), true ) && current_user_can( 'manage_fmwp_forums_all' ) ) { 141 $filtered_posts[] = $post; 142 continue; 143 } 144 145 if ( 'publish' === $forum->post_status ) { 146 if ( current_user_can( 'manage_fmwp_forums_all' ) ) { 147 $filtered_posts[] = $post; 148 continue; 149 } 150 151 $visibility = get_post_meta( $forum_id, 'fmwp_visibility', true ); 152 if ( 'public' === $visibility ) { 153 $filtered_posts[] = $post; 154 } 155 } 156 } 157 return $filtered_posts; 158 } 159 160 /** 161 * @param int|WP_Post|array $post 162 * 163 * @return bool 164 */ 165 public function is_locked( $post ) { 166 $locked = false; 167 if ( is_numeric( $post ) ) { 168 $post = get_post( $post ); 169 170 if ( empty( $post ) || is_wp_error( $post ) ) { 171 return false; 172 } 173 } 174 175 if ( 'fmwp_topic' === $post->post_type ) { 176 $is_locked = get_post_meta( $post->ID, 'fmwp_locked', true ); 177 $locked = ! empty( $is_locked ); 178 } 179 180 return $locked; 181 } 182 183 /** 184 * @param int|WP_Post|array $post 185 * 186 * @return bool 187 */ 188 public function is_spam( $post ) { 189 $spam = false; 190 if ( is_numeric( $post ) ) { 191 $post = get_post( $post ); 192 193 if ( empty( $post ) || is_wp_error( $post ) ) { 194 return false; 195 } 196 } 197 198 if ( 'fmwp_topic' === $post->post_type ) { 199 $is_spam = get_post_meta( $post->ID, 'fmwp_spam', true ); 200 $spam = ! empty( $is_spam ); 201 } 202 203 return $spam; 204 } 205 206 207 /** 208 * 59 /** 60 * Initializes variables including statuses, types, status markers, and sorting criteria. 209 61 */ 210 62 public function init_variables() { … … 268 120 ) 269 121 ); 122 // Set statuses. 123 $this->post_status = array( 'publish' ); 124 if ( is_user_logged_in() ) { 125 $this->post_status[] = 'trash'; 126 $this->post_status[] = 'pending'; //pending can be visible for author 127 if ( current_user_can( 'manage_fmwp_topics_all' ) ) { 128 $this->post_status[] = 'private'; 129 } 130 } 131 } 132 133 /** 134 * @param $where 135 * @param $wp_query 136 * 137 * @return mixed 138 */ 139 public function filter_pending_for_author( $where, $wp_query ) { 140 if ( isset( $wp_query->query['post_type'] ) && 'fmwp_topic' === $wp_query->query['post_type'] ) { 141 if ( isset( $wp_query->query['post_status'] ) && ( 'pending' === $wp_query->query['post_status'] || ( is_array( $wp_query->query['post_status'] ) && in_array( 'pending', $wp_query->query['post_status'], true ) ) ) ) { 142 global $wpdb; 143 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 144 $current_user_id = get_current_user_id(); 145 146 $where = str_replace( "{$wpdb->posts}.post_status = 'pending'", "( {$wpdb->posts}.post_status = 'pending' AND {$wpdb->posts}.post_author = '" . $current_user_id . "' )", $where ); 147 $where = str_replace( 148 "{$wpdb->posts}.post_status = 'trash'", 149 "( {$wpdb->posts}.post_status = 'trash' AND {$wpdb->posts}.post_author = '$current_user_id' )", 150 $where 151 ); 152 } 153 } 154 } 155 156 return $where; 157 } 158 159 /** 160 * Make invisible topics from trashed forums 161 * 162 * @param $posts 163 * @param $query 164 * 165 * @return array 166 */ 167 public function filter_topics_from_hidden_forums( $posts, $query ) { 168 if ( FMWP()->is_request( 'admin' ) && ! FMWP()->is_request( 'ajax' ) ) { 169 return $posts; 170 } 171 172 $filtered_posts = array(); 173 174 //if empty 175 if ( empty( $posts ) ) { 176 return $posts; 177 } 178 179 foreach ( $posts as $post ) { 180 181 if ( 'fmwp_topic' !== $post->post_type ) { 182 $filtered_posts[] = $post; 183 continue; 184 } 185 186 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 187 if ( $this->is_spam( $post ) ) { 188 continue; 189 } 190 } 191 192 $forum_id = $this->get_forum_id( $post->ID ); 193 $forum = get_post( $forum_id ); 194 195 if ( in_array( $forum->post_status, array( 'private', 'pending' ), true ) && current_user_can( 'manage_fmwp_forums_all' ) ) { 196 $filtered_posts[] = $post; 197 continue; 198 } 199 200 if ( 'publish' === $forum->post_status ) { 201 if ( current_user_can( 'manage_fmwp_forums_all' ) ) { 202 $filtered_posts[] = $post; 203 continue; 204 } 205 206 $visibility = get_post_meta( $forum_id, 'fmwp_visibility', true ); 207 if ( 'public' === $visibility ) { 208 $filtered_posts[] = $post; 209 } 210 } 211 } 212 return $filtered_posts; 213 } 214 215 /** 216 * @param int|WP_Post|array $post 217 * 218 * @return bool 219 */ 220 public function is_locked( $post ) { 221 $locked = false; 222 if ( is_numeric( $post ) ) { 223 $post = get_post( $post ); 224 225 if ( empty( $post ) || is_wp_error( $post ) ) { 226 return false; 227 } 228 } 229 230 if ( 'fmwp_topic' === $post->post_type ) { 231 $is_locked = get_post_meta( $post->ID, 'fmwp_locked', true ); 232 $locked = ! empty( $is_locked ); 233 } 234 235 return $locked; 236 } 237 238 /** 239 * @param int|WP_Post|array $post 240 * 241 * @return bool 242 */ 243 public function is_spam( $post ) { 244 $spam = false; 245 if ( is_numeric( $post ) ) { 246 $post = get_post( $post ); 247 248 if ( empty( $post ) || is_wp_error( $post ) ) { 249 return false; 250 } 251 } 252 253 if ( 'fmwp_topic' === $post->post_type ) { 254 $is_spam = get_post_meta( $post->ID, 'fmwp_spam', true ); 255 $spam = ! empty( $is_spam ); 256 } 257 258 return $spam; 270 259 } 271 260 -
forumwp/tags/2.1.4/includes/frontend/class-shortcodes.php
r3205107 r3306743 619 619 add_action( 'wp_footer', array( &$this, 'login_popup' ), -1 ); 620 620 } elseif ( FMWP()->user()->can_create_topic( $args['id'] ) ) { 621 // pre-init ajax loader styles622 FMWP()->ajax_loader_styles( 25 );623 624 add_action( 'wp_footer', array( &$this, 'topic_popup' ), -1 );621 // pre-init ajax loader styles 622 FMWP()->ajax_loader_styles( 25 ); 623 624 add_action( 'wp_footer', array( &$this, 'topic_popup' ), -1 ); 625 625 } 626 626 … … 967 967 $args = shortcode_atts( $default_args, $args ); 968 968 969 /** 970 * Fires before render User Topics List shortcode. 971 * 972 * @since 2.1.4 973 * @hook fmwp_before_user_topics_shortcode 974 * 975 * @param {array} $args Arguments passed into shortcode. 976 */ 977 do_action( 'fmwp_before_user_topics_shortcode', $args ); 978 969 979 ob_start(); 970 980 … … 993 1003 994 1004 $args = shortcode_atts( $default_args, $args ); 1005 1006 /** 1007 * Fires before render User Replies List shortcode. 1008 * 1009 * @since 2.1.4 1010 * @hook fmwp_before_user_replies_shortcode 1011 * 1012 * @param {array} $args Arguments passed into shortcode. 1013 */ 1014 do_action( 'fmwp_before_user_replies_shortcode', $args ); 995 1015 996 1016 ob_start(); -
forumwp/tags/2.1.4/languages/forumwp.pot
r3205107 r3306743 1 # Copyright (C) 202 4ForumWP2 # This file is distributed under the same license as the ForumWP plugin.1 # Copyright (C) 2025 ForumWP 2 # This file is distributed under the GPLv3. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ForumWP 2.1. 3\n"5 "Project-Id-Version: ForumWP 2.1.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/forumwp\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-12-09T20:24:35+00:00\n"12 "POT-Creation-Date: 2025-05-30T14:15:01+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: forumwp\n" 16 16 … … 40 40 #: includes/admin/class-columns.php:409 41 41 #: includes/admin/class-columns.php:419 42 #: includes/common/class-reply.php:76 343 #: includes/common/class-topic.php:5 1542 #: includes/common/class-reply.php:761 43 #: includes/common/class-topic.php:504 44 44 msgid "Reported" 45 45 msgstr "" … … 50 50 #: includes/admin/class-columns.php:400 51 51 #: includes/admin/class-columns.php:484 52 #: includes/common/class-topic.php: 24452 #: includes/common/class-topic.php:96 53 53 #: templates/js/forum-row.php:41 54 54 #: templates/single-forum-info.php:88 … … 63 63 #: includes/admin/class-columns.php:404 64 64 #: includes/admin/class-columns.php:414 65 #: includes/common/class-reply.php:75 866 #: includes/common/class-topic.php:5 1365 #: includes/common/class-reply.php:756 66 #: includes/common/class-topic.php:502 67 67 #: blocks-src/fmwp-topics-list/src/index.js:78 68 68 #: includes/blocks/fmwp-topics-list/src/index.js:1 … … 87 87 #: includes/class-config.php:566 88 88 #: includes/class-fmwp-functions.php:185 89 #: includes/class-fmwp-functions.php:6 7890 #: includes/class-fmwp-functions.php: 69689 #: includes/class-fmwp-functions.php:691 90 #: includes/class-fmwp-functions.php:709 91 91 #: includes/frontend/class-profile.php:62 92 92 #: templates/archive-forum-header.php:15 … … 145 145 #: includes/admin/templates/topic/attributes.php:81 146 146 #: includes/class-fmwp-functions.php:140 147 #: includes/common/class-common.php:9 71147 #: includes/common/class-common.php:969 148 148 #: templates/archive-forum-header.php:21 149 149 msgid "Forum" … … 158 158 159 159 #: includes/admin/class-columns.php:577 160 #: includes/class-fmwp-functions.php:6 82160 #: includes/class-fmwp-functions.php:695 161 161 msgid "Tags" 162 162 msgstr "" … … 203 203 #: includes/class-config.php:563 204 204 #: includes/class-fmwp-functions.php:139 205 #: includes/class-fmwp-functions.php:6 41206 #: includes/class-fmwp-functions.php:6 60207 #: includes/class-fmwp-functions.php:7 07208 #: includes/class-fmwp-functions.php:7 24205 #: includes/class-fmwp-functions.php:654 206 #: includes/class-fmwp-functions.php:673 207 #: includes/class-fmwp-functions.php:720 208 #: includes/class-fmwp-functions.php:737 209 209 #: templates/js/forum-category-list.php:20 210 210 msgid "Forums" … … 262 262 #. translators: %s is a plugin name. 263 263 #: includes/admin/class-notices.php:204 264 #, php-format 264 265 msgid "To add forum functionality to your website %s needs to create several front-end pages (Forums, Topics, Profile, Registration & Login)." 265 266 msgstr "" … … 279 280 #. translators: %1$s,%3$s is a plugin name; %2$s,%4$s is a plugin version; %5$s is a upgrade page URL. 280 281 #: includes/admin/class-notices.php:277 282 #, php-format 281 283 msgid "<strong>%1$s version %2$s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%3$s %4$s</strong>.<br />Please visit \"<a href=\"%5$s\">Upgrade</a>\" page and run the upgrade process." 282 284 msgstr "" … … 288 290 #. translators: %1$s is a plugin name; %2$s is a plugin version. 289 291 #: includes/admin/class-notices.php:302 292 #, php-format 290 293 msgid "<strong>%1$s %2$s</strong> Successfully Upgraded" 291 294 msgstr "" … … 293 296 #. translators: %1$s is a post title; %2$s is a post name (slug). 294 297 #: includes/admin/class-notices.php:352 298 #, php-format 295 299 msgid "Permalink Conflict! Please change permalink for the <strong>\"%1$s\"</strong> post, the <strong>\"%2$s\"</strong> slug is reserved." 296 300 msgstr "" … … 306 310 #. translators: %s override templates page link. 307 311 #: includes/admin/class-notices.php:417 312 #, php-format 308 313 msgid "Your templates are out of date. Please visit <a href=\"%s\">override templates status page</a> and update templates." 309 314 msgstr "" … … 331 336 #. translators: %s is a page title. 332 337 #: includes/admin/class-settings.php:216 338 #, php-format 333 339 msgid "%s page" 334 340 msgstr "" … … 404 410 405 411 #: includes/admin/class-settings.php:334 406 #: includes/common/class-reply.php: 120407 #: includes/common/class-topic.php: 265412 #: includes/common/class-reply.php:52 413 #: includes/common/class-topic.php:117 408 414 #: blocks-src/fmwp-forum/src/index.js:46 409 415 #: blocks-src/fmwp-forums-list/src/index.js:62 … … 418 424 419 425 #: includes/admin/class-settings.php:335 420 #: includes/common/class-reply.php: 119421 #: includes/common/class-topic.php: 264426 #: includes/common/class-reply.php:51 427 #: includes/common/class-topic.php:116 422 428 #: blocks-src/fmwp-forum/src/index.js:47 423 429 #: blocks-src/fmwp-forums-list/src/index.js:63 … … 577 583 #. translators: %s is a plan data. 578 584 #: includes/admin/class-settings.php:500 585 #, php-format 579 586 msgid "%s modules" 580 587 msgstr "" … … 634 641 #. translators: %s: Last checking templates time. 635 642 #: includes/admin/class-settings.php:844 643 #, php-format 636 644 msgid "Last update: %s. You could re-check changes manually." 637 645 msgstr "" … … 643 651 #. translators: %s: Link to the docs article. 644 652 #: includes/admin/class-settings.php:853 653 #, php-format 645 654 msgid "You may get more details about overriding templates <a href=\"%s\" target=\"_blank\">here</a>." 646 655 msgstr "" … … 660 669 #. translators: %s is a new plugins version 661 670 #: includes/admin/class-upgrade.php:122 671 #, php-format 662 672 msgid "%s is a major update, and we highly recommend creating a full backup of your site before updating." 663 673 msgstr "" … … 673 683 #. translators: %s is the plugin name. 674 684 #: includes/admin/class-upgrade.php:227 685 #, php-format 675 686 msgid "%s - Upgrade Process" 676 687 msgstr "" … … 678 689 #. translators: %1$s is the installed version. %2$s is the DB version. 679 690 #: includes/admin/class-upgrade.php:233 691 #, php-format 680 692 msgid "You have installed <strong>%1$s</strong> version. Your latest DB version is <strong>%2$s</strong>. We recommend creating a backup of your site before running the update process. Do not exit the page before the update process has complete." 681 693 msgstr "" … … 720 732 #. translators: %s is a count. 721 733 #: includes/admin/packages/2.0.1/spam.php:15 734 #, php-format 722 735 msgid "Spam <span class=\"count\">(%s)</span>" 723 736 msgid_plural "Spam <span class=\"count\">(%s)</span>" … … 756 769 #. translators: %s is a count 757 770 #: includes/admin/packages/2.0/locked.php:15 771 #, php-format 758 772 msgid "Locked <span class=\"count\">(%s)</span>" 759 773 msgid_plural "Locked <span class=\"count\">(%s)</span>" … … 768 782 #. translators: %s is a count. 769 783 #: includes/admin/packages/2.0/solved.php:15 784 #, php-format 770 785 msgid "Solved <span class=\"count\">(%s)</span>" 771 786 msgid_plural "Solved <span class=\"count\">(%s)</span>" … … 854 869 #. translators: %s is a plugin name. 855 870 #: includes/admin/templates/settings/settings.php:12 871 #, php-format 856 872 msgid "%s - Settings" 857 873 msgstr "" … … 889 905 msgstr "" 890 906 891 #: includes/ajax/class-forum.php:21 1892 #: includes/ajax/class-forum.php:24 5893 #: includes/ajax/class-forum.php:28 0894 #: includes/ajax/class-forum.php:31 0895 #: includes/ajax/class-forum.php:33 7896 #: includes/ajax/class-reply.php:44 4897 #: includes/ajax/class-reply.php:5 62898 #: includes/ajax/class-reply.php:6 23899 #: includes/ajax/class-reply.php:65 9900 #: includes/ajax/class-reply.php:69 6901 #: includes/ajax/class-reply.php:80 6902 #: includes/ajax/class-reply.php:8 40907 #: includes/ajax/class-forum.php:212 908 #: includes/ajax/class-forum.php:246 909 #: includes/ajax/class-forum.php:281 910 #: includes/ajax/class-forum.php:311 911 #: includes/ajax/class-forum.php:338 912 #: includes/ajax/class-reply.php:440 913 #: includes/ajax/class-reply.php:558 914 #: includes/ajax/class-reply.php:619 915 #: includes/ajax/class-reply.php:655 916 #: includes/ajax/class-reply.php:692 917 #: includes/ajax/class-reply.php:802 918 #: includes/ajax/class-reply.php:836 903 919 #: includes/ajax/class-topic.php:495 904 920 #: includes/ajax/class-topic.php:616 … … 915 931 msgstr "" 916 932 917 #: includes/ajax/class-forum.php:21 8918 #: includes/ajax/class-forum.php:25 2919 #: includes/ajax/class-forum.php:28 7920 #: includes/ajax/class-forum.php:31 7921 #: includes/ajax/class-forum.php:34 4933 #: includes/ajax/class-forum.php:219 934 #: includes/ajax/class-forum.php:253 935 #: includes/ajax/class-forum.php:288 936 #: includes/ajax/class-forum.php:318 937 #: includes/ajax/class-forum.php:345 922 938 msgid "Forum ID is invalid" 923 939 msgstr "" 924 940 925 #: includes/ajax/class-forum.php:22 2941 #: includes/ajax/class-forum.php:223 926 942 msgid "You do not have the ability to move this forum to trash" 927 943 msgstr "" 928 944 929 #: includes/ajax/class-forum.php:25 6945 #: includes/ajax/class-forum.php:257 930 946 msgid "You do not have the ability to restore this forum" 931 947 msgstr "" 932 948 933 #: includes/ajax/class-forum.php:29 1949 #: includes/ajax/class-forum.php:292 934 950 #: includes/ajax/class-topic.php:812 935 951 msgid "You do not have the ability to delete this topic" 936 952 msgstr "" 937 953 938 #: includes/ajax/class-forum.php:29 8954 #: includes/ajax/class-forum.php:299 939 955 msgid "Forum was deleted successfully." 940 956 msgstr "" … … 962 978 msgstr "" 963 979 964 #: includes/ajax/class-reply.php:3 51965 #: includes/ajax/class-reply.php:35 7966 #: includes/ajax/class-reply.php:5 31980 #: includes/ajax/class-reply.php:347 981 #: includes/ajax/class-reply.php:353 982 #: includes/ajax/class-reply.php:527 967 983 msgid "Invalid reply" 968 984 msgstr "" 969 985 970 #: includes/ajax/class-reply.php:4 51986 #: includes/ajax/class-reply.php:447 971 987 #: includes/ajax/class-topic.php:906 972 988 #: includes/ajax/class-topic.php:934 … … 975 991 msgstr "" 976 992 977 #: includes/ajax/class-reply.php:45 7993 #: includes/ajax/class-reply.php:453 978 994 msgid "You haven't capabilities to make this action" 979 995 msgstr "" 980 996 981 #: includes/ajax/class-reply.php:46 4997 #: includes/ajax/class-reply.php:460 982 998 msgid "Empty or Invalid Topic ID." 983 999 msgstr "" 984 1000 985 #: includes/ajax/class-reply.php:4 71986 #: includes/ajax/class-reply.php:5 821001 #: includes/ajax/class-reply.php:467 1002 #: includes/ajax/class-reply.php:578 987 1003 #: includes/ajax/class-topic.php:440 988 1004 #: includes/ajax/class-topic.php:523 … … 991 1007 992 1008 #. translators: %s is a reply creation delay 993 #: includes/ajax/class-reply.php:483 1009 #: includes/ajax/class-reply.php:479 1010 #, php-format 994 1011 msgid "You cannot leave replies faster than %s seconds" 995 1012 msgstr "" 996 1013 997 #: includes/ajax/class-reply.php:52 51014 #: includes/ajax/class-reply.php:521 998 1015 msgid "Invalid reply ID" 999 1016 msgstr "" 1000 1017 1001 #: includes/ajax/class-reply.php:53 51002 #: includes/ajax/class-reply.php:57 51018 #: includes/ajax/class-reply.php:531 1019 #: includes/ajax/class-reply.php:571 1003 1020 msgid "You do not have the ability to edit this reply" 1004 1021 msgstr "" 1005 1022 1006 #: includes/ajax/class-reply.php:56 91007 #: includes/ajax/class-reply.php:6 301008 #: includes/ajax/class-reply.php:66 61009 #: includes/ajax/class-reply.php: 7031010 #: includes/ajax/class-reply.php:8 131011 #: includes/ajax/class-reply.php:84 71023 #: includes/ajax/class-reply.php:565 1024 #: includes/ajax/class-reply.php:626 1025 #: includes/ajax/class-reply.php:662 1026 #: includes/ajax/class-reply.php:699 1027 #: includes/ajax/class-reply.php:809 1028 #: includes/ajax/class-reply.php:843 1012 1029 msgid "Reply ID is invalid" 1013 1030 msgstr "" 1014 1031 1015 #: includes/ajax/class-reply.php:60 41032 #: includes/ajax/class-reply.php:600 1016 1033 #: includes/ajax/class-topic.php:552 1017 1034 msgid "Something is wrong with the data" 1018 1035 msgstr "" 1019 1036 1020 #: includes/ajax/class-reply.php:63 41037 #: includes/ajax/class-reply.php:630 1021 1038 msgid "You do not have the ability to move this reply to trash" 1022 1039 msgstr "" 1023 1040 1024 #: includes/ajax/class-reply.php:6 701041 #: includes/ajax/class-reply.php:666 1025 1042 msgid "You do not have the ability to restore this reply" 1026 1043 msgstr "" 1027 1044 1028 #: includes/ajax/class-reply.php:70 71045 #: includes/ajax/class-reply.php:703 1029 1046 msgid "You do not have the ability to delete this reply" 1030 1047 msgstr "" 1031 1048 1032 #: includes/ajax/class-reply.php:81 71049 #: includes/ajax/class-reply.php:813 1033 1050 msgid "You do not have the ability to mark this reply as spam" 1034 1051 msgstr "" 1035 1052 1036 #: includes/ajax/class-reply.php:8 511053 #: includes/ajax/class-reply.php:847 1037 1054 msgid "You do not have the ability to restore this reply from spam" 1038 1055 msgstr "" 1039 1056 1040 #: includes/ajax/class-reply.php:87 41041 #: includes/ajax/class-reply.php: 9021042 #: includes/ajax/class-reply.php:92 91057 #: includes/ajax/class-reply.php:870 1058 #: includes/ajax/class-reply.php:898 1059 #: includes/ajax/class-reply.php:925 1043 1060 msgid "Empty Reply ID" 1044 1061 msgstr "" 1045 1062 1046 #: includes/ajax/class-reply.php:8 821063 #: includes/ajax/class-reply.php:878 1047 1064 #: includes/ajax/class-topic.php:921 1048 1065 msgid "Something wrong with reports" 1049 1066 msgstr "" 1050 1067 1051 #: includes/ajax/class-reply.php:90 91052 #: includes/ajax/class-reply.php:94 41068 #: includes/ajax/class-reply.php:905 1069 #: includes/ajax/class-reply.php:940 1053 1070 #: includes/ajax/class-topic.php:949 1054 1071 #: includes/ajax/class-topic.php:977 … … 1058 1075 #. translators: %s is an author display name 1059 1076 #: includes/ajax/class-topic.php:84 1077 #, php-format 1060 1078 msgid "Created by %s" 1061 1079 msgstr "" … … 1063 1081 #. translators: %s is a last replies author display name 1064 1082 #: includes/ajax/class-topic.php:103 1083 #, php-format 1065 1084 msgid "Last reply by %s" 1066 1085 msgstr "" … … 1089 1108 #. translators: %s is a topic delay time 1090 1109 #: includes/ajax/class-topic.php:452 1110 #, php-format 1091 1111 msgid "You cannot create topics faster than %s seconds" 1092 1112 msgstr "" … … 1139 1159 1140 1160 #: includes/ajax/class-user.php:41 1141 #: includes/common/class-common.php:31 81161 #: includes/common/class-common.php:317 1142 1162 msgid "Everyone" 1143 1163 msgstr "" 1144 1164 1145 1165 #: includes/ajax/class-user.php:46 1146 #: includes/common/class-common.php:31 51166 #: includes/common/class-common.php:314 1147 1167 msgid "All" 1148 1168 msgstr "" … … 1192 1212 #. translators: %s is a plugin name. 1193 1213 #: includes/class-dependencies.php:75 1214 #, php-format 1194 1215 msgid "Please check <strong>\"%s\"</strong> plugin's folder name. Correct folder name is <strong>\"forumwp\"</strong>" 1195 1216 msgstr "" … … 1212 1233 1213 1234 #: includes/class-fmwp-functions.php:145 1214 #: includes/common/class-common.php:101 21235 #: includes/common/class-common.php:1010 1215 1236 msgid "Edit Forum" 1216 1237 msgstr "" … … 1263 1284 1264 1285 #: includes/class-fmwp-functions.php:186 1265 #: includes/common/class-common.php:98 21286 #: includes/common/class-common.php:980 1266 1287 #: templates/archive-topic-header.php:26 1267 1288 msgid "Topic" … … 1282 1303 1283 1304 #: includes/class-fmwp-functions.php:191 1284 #: includes/common/class-common.php:102 41305 #: includes/common/class-common.php:1022 1285 1306 msgid "Edit Topic" 1286 1307 msgstr "" … … 1312 1333 1313 1334 #: includes/class-fmwp-functions.php:225 1314 #: includes/common/class-topic.php:11 451315 #: includes/common/class-topic.php:11 521335 #: includes/common/class-topic.php:1134 1336 #: includes/common/class-topic.php:1141 1316 1337 #: templates/js/reply-row.php:117 1317 1338 #: templates/js/reply-row.php:132 … … 1467 1488 msgstr "" 1468 1489 1469 #: includes/class-fmwp-functions.php:6 121490 #: includes/class-fmwp-functions.php:625 1470 1491 msgid "Home" 1471 1492 msgstr "" 1472 1493 1473 #: includes/class-fmwp-functions.php:6 451494 #: includes/class-fmwp-functions.php:658 1474 1495 #: templates/new-forum.php:47 1475 1496 msgid "Categories" … … 1481 1502 msgstr "" 1482 1503 1483 #: includes/class-modules.php:3 81504 #: includes/class-modules.php:39 1484 1505 msgid "Basic" 1485 1506 msgstr "" 1486 1507 1487 #: includes/class-modules.php:4 11508 #: includes/class-modules.php:42 1488 1509 msgid "Migration" 1489 1510 msgstr "" 1490 1511 1491 #: includes/class-modules.php:4 21512 #: includes/class-modules.php:43 1492 1513 msgid "Ability to migration forums, topics and replies from bbPress" 1493 1514 msgstr "" 1494 1515 1495 #: includes/common/class-forum.php: 401516 #: includes/common/class-forum.php:55 1496 1517 msgid "Public" 1497 1518 msgstr "" 1498 1519 1499 #: includes/common/class-forum.php: 411520 #: includes/common/class-forum.php:56 1500 1521 msgid "Private" 1501 1522 msgstr "" 1502 1523 1503 #: includes/common/class-forum.php: 421524 #: includes/common/class-forum.php:57 1504 1525 msgid "Hidden" 1505 1526 msgstr "" 1506 1527 1507 #: includes/common/class-forum.php:17 21528 #: includes/common/class-forum.php:173 1508 1529 msgid "Unlock forum" 1509 1530 msgstr "" 1510 1531 1511 #: includes/common/class-forum.php:1 791532 #: includes/common/class-forum.php:180 1512 1533 msgid "Lock forum" 1513 1534 msgstr "" 1514 1535 1515 #: includes/common/class-forum.php:1 891516 #: includes/common/class-reply.php:83 51517 #: includes/common/class-topic.php:5 901536 #: includes/common/class-forum.php:190 1537 #: includes/common/class-reply.php:833 1538 #: includes/common/class-topic.php:579 1518 1539 msgid "Move to trash" 1519 1540 msgstr "" 1520 1541 1521 #: includes/common/class-forum.php:20 51542 #: includes/common/class-forum.php:206 1522 1543 msgid "Restore forum" 1523 1544 msgstr "" 1524 1545 1525 #: includes/common/class-forum.php:21 41546 #: includes/common/class-forum.php:215 1526 1547 msgid "Remove forum" 1527 1548 msgstr "" … … 1534 1555 #: includes/common/class-mail.php:103 1535 1556 #: includes/common/class-mail.php:221 1557 #, php-format 1536 1558 msgid "<code>%s</code> does not exist." 1537 1559 msgstr "" … … 1539 1561 #. translators: %s is a topic title 1540 1562 #. translators: %s is a topic title. 1541 #: includes/common/class-reply.php:40 61563 #: includes/common/class-reply.php:404 1542 1564 #: modules/migration/class-init.php:909 1565 #, php-format 1543 1566 msgid "Reply To: %s" 1544 1567 msgstr "" 1545 1568 1546 #: includes/common/class-reply.php:74 91547 #: includes/common/class-topic.php: 2151548 #: includes/common/class-topic.php:5 161569 #: includes/common/class-reply.php:747 1570 #: includes/common/class-topic.php:67 1571 #: includes/common/class-topic.php:505 1549 1572 #: blocks-src/fmwp-topics-list/src/index.js:76 1550 1573 #: includes/blocks/fmwp-topics-list/src/index.js:1 … … 1552 1575 msgstr "" 1553 1576 1554 #: includes/common/class-reply.php:75 31555 #: includes/common/class-topic.php:5 111577 #: includes/common/class-reply.php:751 1578 #: includes/common/class-topic.php:500 1556 1579 #: templates/js/forum-row.php:55 1557 1580 msgid "Trashed" 1558 1581 msgstr "" 1559 1582 1560 #: includes/common/class-reply.php:82 61583 #: includes/common/class-reply.php:824 1561 1584 msgid "Edit reply" 1562 1585 msgstr "" 1563 1586 1564 #: includes/common/class-reply.php:84 41565 #: includes/common/class-topic.php:5 991587 #: includes/common/class-reply.php:842 1588 #: includes/common/class-topic.php:588 1566 1589 msgid "Mark as spam" 1567 1590 msgstr "" 1568 1591 1569 #: includes/common/class-reply.php:85 31570 #: includes/common/class-topic.php: 6081592 #: includes/common/class-reply.php:851 1593 #: includes/common/class-topic.php:597 1571 1594 msgid "Isn't spam" 1572 1595 msgstr "" 1573 1596 1574 #: includes/common/class-reply.php:86 41597 #: includes/common/class-reply.php:862 1575 1598 msgid "Report reply" 1576 1599 msgstr "" 1577 1600 1578 #: includes/common/class-reply.php:8 711601 #: includes/common/class-reply.php:869 1579 1602 msgid "Un-report reply" 1580 1603 msgstr "" 1581 1604 1582 #: includes/common/class-reply.php:8 811605 #: includes/common/class-reply.php:879 1583 1606 msgid "Clear reply's reports" 1584 1607 msgstr "" 1585 1608 1586 #: includes/common/class-reply.php:8 911609 #: includes/common/class-reply.php:889 1587 1610 msgid "Restore reply" 1588 1611 msgstr "" 1589 1612 1590 #: includes/common/class-reply.php: 9001613 #: includes/common/class-reply.php:898 1591 1614 msgid "Remove reply" 1592 1615 msgstr "" 1593 1616 1594 #: includes/common/class-topic.php: 2141617 #: includes/common/class-topic.php:66 1595 1618 msgid "Open" 1596 1619 msgstr "" 1597 1620 1598 #: includes/common/class-topic.php: 2161621 #: includes/common/class-topic.php:68 1599 1622 #: blocks-src/fmwp-topics-list/src/index.js:77 1600 1623 #: includes/blocks/fmwp-topics-list/src/index.js:1 … … 1602 1625 msgstr "" 1603 1626 1604 #: includes/common/class-topic.php: 2221627 #: includes/common/class-topic.php:74 1605 1628 msgid "Normal" 1606 1629 msgstr "" 1607 1630 1608 #: includes/common/class-topic.php: 2261609 #: includes/common/class-topic.php: 2481631 #: includes/common/class-topic.php:78 1632 #: includes/common/class-topic.php:100 1610 1633 msgid "Pinned" 1611 1634 msgstr "" 1612 1635 1613 #: includes/common/class-topic.php: 2301614 #: includes/common/class-topic.php: 2521636 #: includes/common/class-topic.php:82 1637 #: includes/common/class-topic.php:104 1615 1638 msgid "Announcement" 1616 1639 msgstr "" 1617 1640 1618 #: includes/common/class-topic.php: 2341619 #: includes/common/class-topic.php: 2561641 #: includes/common/class-topic.php:86 1642 #: includes/common/class-topic.php:108 1620 1643 msgid "Global" 1621 1644 msgstr "" 1622 1645 1623 #: includes/common/class-topic.php: 2661646 #: includes/common/class-topic.php:118 1624 1647 #: blocks-src/fmwp-forum/src/index.js:48 1625 1648 #: blocks-src/fmwp-topics-list/src/index.js:101 … … 1629 1652 msgstr "" 1630 1653 1631 #: includes/common/class-topic.php: 2671654 #: includes/common/class-topic.php:119 1632 1655 #: blocks-src/fmwp-forum/src/index.js:49 1633 1656 #: blocks-src/fmwp-topics-list/src/index.js:102 … … 1637 1660 msgstr "" 1638 1661 1639 #: includes/common/class-topic.php:5 451662 #: includes/common/class-topic.php:534 1640 1663 msgid "Edit topic" 1641 1664 msgstr "" 1642 1665 1643 #: includes/common/class-topic.php:5 541666 #: includes/common/class-topic.php:543 1644 1667 msgid "Pin topic" 1645 1668 msgstr "" 1646 1669 1647 #: includes/common/class-topic.php:5 631670 #: includes/common/class-topic.php:552 1648 1671 msgid "Unpin topic" 1649 1672 msgstr "" 1650 1673 1651 #: includes/common/class-topic.php:5 721674 #: includes/common/class-topic.php:561 1652 1675 msgid "Lock topic" 1653 1676 msgstr "" 1654 1677 1655 #: includes/common/class-topic.php:5 811678 #: includes/common/class-topic.php:570 1656 1679 msgid "Unlock topic" 1657 1680 msgstr "" 1658 1681 1659 #: includes/common/class-topic.php:6 181682 #: includes/common/class-topic.php:607 1660 1683 msgid "Report topic" 1661 1684 msgstr "" 1662 1685 1663 #: includes/common/class-topic.php:6 251686 #: includes/common/class-topic.php:614 1664 1687 msgid "Un-report topic" 1665 1688 msgstr "" 1666 1689 1667 #: includes/common/class-topic.php:6 351690 #: includes/common/class-topic.php:624 1668 1691 msgid "Clear topic's reports" 1669 1692 msgstr "" 1670 1693 1671 #: includes/common/class-topic.php:6 511694 #: includes/common/class-topic.php:640 1672 1695 msgid "Restore topic" 1673 1696 msgstr "" 1674 1697 1675 #: includes/common/class-topic.php:6 601698 #: includes/common/class-topic.php:649 1676 1699 msgid "Remove topic" 1677 1700 msgstr "" 1678 1701 1679 #: includes/common/class-topic.php:11 521702 #: includes/common/class-topic.php:1141 1680 1703 #: templates/js/reply-row.php:120 1681 1704 #: templates/js/reply-row.php:135 … … 1685 1708 msgstr "" 1686 1709 1687 #: includes/common/class-topic.php:11 561710 #: includes/common/class-topic.php:1145 1688 1711 #: templates/topic.php:288 1689 1712 #: templates/topic.php:291 … … 1783 1806 #. translators: %s is a forum category name 1784 1807 #: includes/frontend/class-shortcodes.php:339 1808 #, php-format 1785 1809 msgid "Forum Category: %s" 1786 1810 msgstr "" … … 1788 1812 #. translators: %s is a topic tag name 1789 1813 #: includes/frontend/class-shortcodes.php:345 1814 #, php-format 1790 1815 msgid "Topic Tag: %s" 1791 1816 msgstr "" … … 1834 1859 #. translators: %1$d and %2$d are from-to migrated forums numbers. 1835 1860 #: modules/migration/class-init.php:431 1861 #, php-format 1836 1862 msgid "Forums from %1$d to %2$d are migrated" 1837 1863 msgstr "" … … 1839 1865 #. translators: %1$d and %2$d are from-to migrated topics numbers. 1840 1866 #: modules/migration/class-init.php:595 1867 #, php-format 1841 1868 msgid "Topics from %1$d to %2$d are migrated" 1842 1869 msgstr "" … … 1844 1871 #. translators: %1$d and %2$d are from-to migrated topic tabs numbers. 1845 1872 #: modules/migration/class-init.php:749 1873 #, php-format 1846 1874 msgid "Topic tags from %1$d to %2$d are migrated" 1847 1875 msgstr "" … … 1849 1877 #. translators: %1$d and %2$d are from-to migrated replies numbers. 1850 1878 #: modules/migration/class-init.php:817 1879 #, php-format 1851 1880 msgid "Replies from %1$d to %2$d are migrated" 1852 1881 msgstr "" … … 1912 1941 #. translators: %s is the class attribute 1913 1942 #: templates/forum.php:70 1943 #, php-format 1914 1944 msgid "Please <a href=\"#\" class=\"%s\" title=\"Login to view\" data-fmwp_popup_title=\"Login to view forum\">login</a> to view this forum" 1915 1945 msgstr "" … … 2089 2119 #: templates/profile/main.php:85 2090 2120 #: templates/user-card.php:66 2121 #, php-format 2091 2122 msgid "%s topic" 2092 2123 msgid_plural "%s topics" … … 2098 2129 #: templates/profile/main.php:92 2099 2130 #: templates/user-card.php:75 2131 #, php-format 2100 2132 msgid "%s reply" 2101 2133 msgid_plural "%s replies" … … 2106 2138 #: templates/profile/main-mobile.php:64 2107 2139 #: templates/profile/main.php:100 2140 #, php-format 2108 2141 msgid "Joined: %s" 2109 2142 msgstr "" … … 2137 2170 #. translators: %s is a topic title 2138 2171 #: templates/reply-popup.php:52 2172 #, php-format 2139 2173 msgid "Replying to: \"%s\"" 2140 2174 msgstr "" … … 2170 2204 #. translators: %s is the class attribute 2171 2205 #: templates/topic.php:124 2206 #, php-format 2172 2207 msgid "Please <a href=\"#\" class=\"%s\" title=\"Login to view\" data-fmwp_popup_title=\"Login to view topic\">login</a> to view this topic" 2173 2208 msgstr "" … … 2175 2210 #. translators: %s is a total replies count 2176 2211 #: templates/topic.php:160 2212 #, php-format 2177 2213 msgid "<span id=\"fmwp-replies-total\">%s</span> reply" 2178 2214 msgid_plural "<span id=\"fmwp-replies-total\">%s</span> replies" … … 2182 2218 #. translators: %s is a total topics count 2183 2219 #: templates/topic.php:170 2220 #, php-format 2184 2221 msgid "<span id=\"fmwp-views-total\">%s</span> view" 2185 2222 msgid_plural "<span id=\"fmwp-views-total\">%s</span> views" … … 2189 2226 #. translators: %s is the user display name. 2190 2227 #: templates/topic.php:221 2228 #, php-format 2191 2229 msgid "%s Profile" 2192 2230 msgstr "" -
forumwp/tags/2.1.4/readme.txt
r3205107 r3306743 6 6 Requires PHP: 7.0 7 7 Requires at least: 5.5 8 Tested up to: 6. 79 Stable tag: 2.1. 38 Tested up to: 6.8 9 Stable tag: 2.1.4 10 10 License: GPLv3 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 61 61 62 62 == Changelog == 63 64 = 2.1.4: June 04, 2025 = 65 66 * Added: Action hooks 'fmwp_change_template_part', 'fmwp_before_user_topics_shortcode', 'fmwp_before_user_replies_shortcode' for 3rd-party integrations. 67 * Fixed: Loading textdomain for compatibility with WordPress 6.7 and 6.8. 68 69 * Templates required update: 70 - js/forum-row.php 63 71 64 72 = 2.1.3: December 09, 2024 = -
forumwp/tags/2.1.4/templates/js/forum-row.php
r3205107 r3306743 5 5 * This template can be overridden by copying it to your-theme/forumwp/js/forum-row.php 6 6 * 7 * @version 2.1. 37 * @version 2.1.4 8 8 * 9 9 * @var array $fmwp_js_forum_row … … 17 17 ?> 18 18 19 <div class="fmwp-forum-row<# if ( <?php echo esc_js( $item ); ?>.is_locked ) { #> fmwp-forum-locked<# } #><# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #> fmwp-forum-trashed<# } #><# if ( Object.keys( <?php echo esc_js( $item ); ?>.dropdown_actions ).length === 0 ) { #> fmwp-forum-no-actions<# } #> " data-forum_id="{{{<?php echo esc_js( $item ); ?>.forum_id}}}" data-trashed="<# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #>1<# } #>">19 <div class="fmwp-forum-row<# if ( <?php echo esc_js( $item ); ?>.is_locked ) { #> fmwp-forum-locked<# } #><# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #> fmwp-forum-trashed<# } #><# if ( Object.keys( <?php echo esc_js( $item ); ?>.dropdown_actions ).length === 0 ) { #> fmwp-forum-no-actions<# } #> {{{<?php echo esc_js( $item ); ?>.extra_classes}}}" data-forum_id="{{{<?php echo esc_js( $item ); ?>.forum_id}}}" data-trashed="<# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #>1<# } #>"> 20 20 <div class="fmwp-forum-row-lines"> 21 21 -
forumwp/trunk/assets/front/js/topic-popup.js
r3205107 r3306743 77 77 78 78 form.find('input, #wp-fmwptopiccontent-wrap').removeClass('fmwp-error-field').removeAttr('title'); 79 80 data = wp.hooks.applyFilters( 'fmwp_topic_popup_submitted_data', data, form ); 79 81 80 82 fmwp_set_busy( 'topic_popup', true ); -
forumwp/trunk/assets/front/js/topic-popup.min.js
r3205107 r3306743 1 jQuery(document).ready(function(r){var i,e,o;r(document.body).on("click","#fmwp-topic-popup-preview-action",function(){var p=r(this).parents("#fmwp-topic-popup-editors");p.hasClass("fmwp-topic-popup-preview-hidden")?(p.removeClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("hide_label")),r("#fmwptopiccontent-preview").html(r("#fmwptopiccontent").val())):(p.addClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("show_label"))),fmwp_resize_popup()}),r(document.body).on("click",".fmwp-topic-popup-discard",function(){var t;fmwp_is_busy("topic_popup")||(t=r(this).parents("#fmwp-topic-popup-wrapper")).hide(1,function(){t.find("form")[0].reset(),r("#fmwptopiccontent").val(""),r("#fmwptopiccontent-preview").html(""),t.removeClass("fmwp-fullsize");var p=t.find("#fmwp-topic-popup-preview-action");p.html(p.data("hide_label")),t.find("#fmwp-topic-popup-editors").removeClass("fmwp-topic-popup-preview-hidden")})}),r(document.body).on("click",".fmwp-topic-popup-submit",function(p){var s,n,t,i,e,a,c,f;p.preventDefault(),fmwp_is_busy("topic_popup")||((s=r(this)).siblings(".fmwp-ajax-loading").css("visibility","visible").show(),s.css("visibility","hidden"),n=r("#fmwp-topic-popup-wrapper"),p=r(this).parents("form"),t=p.serializeArray(),i="undefined"!=typeof tinymce?tinyMCE.get("fmwptopiccontent").getContent({format:"raw"}):r("#fmwptopiccontent").val(),e={},r.each(t,function(p){"fmwp-topic[content]"===t[p].name?e[t[p].name]=i:e[t[p].name]=t[p].value}),a=e["fmwp-topic[forum_id]"],c=e["fmwp-topic[topic_id]"],f="edit-topic"===e["fmwp-action"]?"fmwp_edit_topic":"fmwp_create_topic",p.find("input, #wp-fmwptopiccontent-wrap").removeClass("fmwp-error-field").removeAttr("title"), fmwp_set_busy("topic_popup",!0),wp.ajax.send(f,{data:e,success:function(t){if("fmwp_edit_topic"==f){var i=n.data("fmwp-target"),p=t,e=c;"forum-page"===i||"topics-page"===i?(o=wp.template("fmwp-topic")(p),r(".fmwp-topics-wrapper").find('.fmwp-topic-row[data-topic_id="'+e+'"]').replaceWith(o)):"topic-page"===i&&(r(".fmwp-topic-title").html(p.title),r(".fmwp-topic-data-content").html(p.content),r(".fmwp-topic-stats.fmwp-tags-stats").length&&(e=wp.template("fmwp-topic-tags-line")(p.tags),r(".fmwp-topic-stats.fmwp-tags-stats").html(e)),wp.hooks.doAction("fmwp_after_edit_topic",p))}else{var o=t,i=a;o=wp.template("fmwp-topic")(o);let p=(i=r('.fmwp-topics-wrapper[data-fmwp_forum_id="'+i+'"]')).find(".fmwp-forum-sort:visible").val();i.length||(i=r(".fmwp-archive-topics-wrapper .fmwp-topics-wrapper"),p=r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible").val()),"date_desc"===p?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").length?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-pinned:last").length?i.find(".fmwp-topic-row.fmwp-topic-pinned:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-global:last").length?i.find(".fmwp-topic-row.fmwp-topic-global:last").after(o):i.prepend(o):"date_asc"===p&&i.append(o),i.find(".fmwp-forum-no-topics").length&&i.find(".fmwp-forum-no-topics").remove(),i.find(".fmwp-topic-actions-dropdown").length?i.siblings(".fmwp-topics-wrapper-heading").removeClass("fmwp-no-actions-heading"):i.siblings(".fmwp-topics-wrapper-heading").addClass("fmwp-no-actions-heading")}fmwp_set_busy("topic_popup",!1),r(".fmwp-topic-popup-discard:first").trigger("click"),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible");e=r('.fmwp-forum-head[data-fmwp_forum_id="'+a+'"]');(e.length?e.find(".fmwp-forum-sort:visible"):r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible")).trigger("change")},error:function(t){t.errors?r.each(t.errors,function(p){jQuery("#"+t.errors[p].field).addClass("fmwp-error-field").attr("title",t.errors[p].message)}):(console.log(t),r(this).fmwp_notice({message:t,type:"error"})),fmwp_set_busy("topic_popup",!1),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible")}}))}),r(document.body).on("keyup","#fmwptopiccontent",(i=function(p){var t;r(this).parents("#fmwp-topic-popup-editors").hasClass("fmwp-topic-popup-preview-hidden")||fmwp_is_busy("topic_popup_preview")||(t=fmwp_stringToHash(this.value))!=r(this).data("content-hash")&&(r(this).data("content-hash",t),fmwp_set_busy("topic_popup_preview",!0),wp.ajax.send("fmwp_topic_build_preview",{data:{content:this.value,nonce:fmwp_front_data.nonce},success:function(p){r("#fmwptopiccontent-preview").html(p),fmwp_set_busy("topic_popup_preview",!1)},error:function(p){console.log(p),r(this).fmwp_notice({message:p,type:"error"}),fmwp_set_busy("topic_popup_preview",!1)}}))},e=1e3,o=0,function(){var p=this,t=arguments;clearTimeout(o),o=setTimeout(function(){i.apply(p,t)},e||0)}))});1 jQuery(document).ready(function(r){var i,e,o;r(document.body).on("click","#fmwp-topic-popup-preview-action",function(){var p=r(this).parents("#fmwp-topic-popup-editors");p.hasClass("fmwp-topic-popup-preview-hidden")?(p.removeClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("hide_label")),r("#fmwptopiccontent-preview").html(r("#fmwptopiccontent").val())):(p.addClass("fmwp-topic-popup-preview-hidden"),r(this).html(r(this).data("show_label"))),fmwp_resize_popup()}),r(document.body).on("click",".fmwp-topic-popup-discard",function(){var t;fmwp_is_busy("topic_popup")||(t=r(this).parents("#fmwp-topic-popup-wrapper")).hide(1,function(){t.find("form")[0].reset(),r("#fmwptopiccontent").val(""),r("#fmwptopiccontent-preview").html(""),t.removeClass("fmwp-fullsize");var p=t.find("#fmwp-topic-popup-preview-action");p.html(p.data("hide_label")),t.find("#fmwp-topic-popup-editors").removeClass("fmwp-topic-popup-preview-hidden")})}),r(document.body).on("click",".fmwp-topic-popup-submit",function(p){var s,n,t,i,e,a,c,f;p.preventDefault(),fmwp_is_busy("topic_popup")||((s=r(this)).siblings(".fmwp-ajax-loading").css("visibility","visible").show(),s.css("visibility","hidden"),n=r("#fmwp-topic-popup-wrapper"),p=r(this).parents("form"),t=p.serializeArray(),i="undefined"!=typeof tinymce?tinyMCE.get("fmwptopiccontent").getContent({format:"raw"}):r("#fmwptopiccontent").val(),e={},r.each(t,function(p){"fmwp-topic[content]"===t[p].name?e[t[p].name]=i:e[t[p].name]=t[p].value}),a=e["fmwp-topic[forum_id]"],c=e["fmwp-topic[topic_id]"],f="edit-topic"===e["fmwp-action"]?"fmwp_edit_topic":"fmwp_create_topic",p.find("input, #wp-fmwptopiccontent-wrap").removeClass("fmwp-error-field").removeAttr("title"),e=wp.hooks.applyFilters("fmwp_topic_popup_submitted_data",e,p),fmwp_set_busy("topic_popup",!0),wp.ajax.send(f,{data:e,success:function(t){if("fmwp_edit_topic"==f){var i=n.data("fmwp-target"),p=t,e=c;"forum-page"===i||"topics-page"===i?(o=wp.template("fmwp-topic")(p),r(".fmwp-topics-wrapper").find('.fmwp-topic-row[data-topic_id="'+e+'"]').replaceWith(o)):"topic-page"===i&&(r(".fmwp-topic-title").html(p.title),r(".fmwp-topic-data-content").html(p.content),r(".fmwp-topic-stats.fmwp-tags-stats").length&&(e=wp.template("fmwp-topic-tags-line")(p.tags),r(".fmwp-topic-stats.fmwp-tags-stats").html(e)),wp.hooks.doAction("fmwp_after_edit_topic",p))}else{var o=t,i=a;o=wp.template("fmwp-topic")(o);let p=(i=r('.fmwp-topics-wrapper[data-fmwp_forum_id="'+i+'"]')).find(".fmwp-forum-sort:visible").val();i.length||(i=r(".fmwp-archive-topics-wrapper .fmwp-topics-wrapper"),p=r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible").val()),"date_desc"===p?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").length?i.find(".fmwp-topic-row.fmwp-topic-announcement:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-pinned:last").length?i.find(".fmwp-topic-row.fmwp-topic-pinned:last").after(o):i.find(".fmwp-topic-row.fmwp-topic-global:last").length?i.find(".fmwp-topic-row.fmwp-topic-global:last").after(o):i.prepend(o):"date_asc"===p&&i.append(o),i.find(".fmwp-forum-no-topics").length&&i.find(".fmwp-forum-no-topics").remove(),i.find(".fmwp-topic-actions-dropdown").length?i.siblings(".fmwp-topics-wrapper-heading").removeClass("fmwp-no-actions-heading"):i.siblings(".fmwp-topics-wrapper-heading").addClass("fmwp-no-actions-heading")}fmwp_set_busy("topic_popup",!1),r(".fmwp-topic-popup-discard:first").trigger("click"),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible");e=r('.fmwp-forum-head[data-fmwp_forum_id="'+a+'"]');(e.length?e.find(".fmwp-forum-sort:visible"):r(".fmwp-archive-topics-wrapper").find(".fmwp-topics-sort:visible")).trigger("change")},error:function(t){t.errors?r.each(t.errors,function(p){jQuery("#"+t.errors[p].field).addClass("fmwp-error-field").attr("title",t.errors[p].message)}):(console.log(t),r(this).fmwp_notice({message:t,type:"error"})),fmwp_set_busy("topic_popup",!1),s.siblings(".fmwp-ajax-loading").css("visibility","hidden").hide(),s.css("visibility","visible")}}))}),r(document.body).on("keyup","#fmwptopiccontent",(i=function(p){var t;r(this).parents("#fmwp-topic-popup-editors").hasClass("fmwp-topic-popup-preview-hidden")||fmwp_is_busy("topic_popup_preview")||(t=fmwp_stringToHash(this.value))!=r(this).data("content-hash")&&(r(this).data("content-hash",t),fmwp_set_busy("topic_popup_preview",!0),wp.ajax.send("fmwp_topic_build_preview",{data:{content:this.value,nonce:fmwp_front_data.nonce},success:function(p){r("#fmwptopiccontent-preview").html(p),fmwp_set_busy("topic_popup_preview",!1)},error:function(p){console.log(p),r(this).fmwp_notice({message:p,type:"error"}),fmwp_set_busy("topic_popup_preview",!1)}}))},e=1e3,o=0,function(){var p=this,t=arguments;clearTimeout(o),o=setTimeout(function(){i.apply(p,t)},e||0)}))}); -
forumwp/trunk/forumwp.php
r3205107 r3306743 4 4 * Plugin URI: https://forumwpplugin.com/ 5 5 * Description: A full-featured, powerful forum plugin for WordPress 6 * Version: 2.1. 36 * Version: 2.1.4 7 7 * Author: ForumWP 8 * License: GPLv3 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt 8 10 * Text Domain: forumwp 9 11 * Domain Path: /languages -
forumwp/trunk/includes/ajax/class-forum.php
r3205107 r3306743 76 76 'title' => $forum->post_title, 77 77 'permalink' => get_permalink( $forum->ID ), 78 'author' => FMWP()->user()->display_name( $author ),79 'author_url' => FMWP()->user()->get_profile_link( $author->ID ),80 'author_avatar' => FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ),78 'author' => $author ? FMWP()->user()->display_name( $author ) : '', 79 'author_url' => $author ? FMWP()->user()->get_profile_link( $author->ID ) : '', 80 'author_avatar' => $author ? FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ) : '', 81 81 'last_upgrade' => $last_upgrade, 82 82 'strip_content' => $strip_content, … … 92 92 'is_locked' => FMWP()->common()->forum()->is_locked( $forum->ID ), 93 93 'is_trashed' => FMWP()->common()->forum()->is_trashed( $forum->ID ), 94 'extra_classes' => '', 94 95 ); 95 96 -
forumwp/trunk/includes/ajax/class-reply.php
r3182324 r3306743 50 50 $dropdown_actions = FMWP()->common()->reply()->actions_list( $reply ); 51 51 52 $author_url = FMWP()->user()->get_profile_link( $author->ID );53 54 $slug = FMWP()->user()->maybe_get_slug( $author->ID );55 56 52 $beauty_date = ''; 57 53 if ( ! FMWP()->common()->reply()->is_pending( $reply->ID ) ) { … … 69 65 'content' => nl2br( $reply->post_content ), 70 66 'permalink' => FMWP()->common()->reply()->get_link( $reply->ID ), 71 'author' => FMWP()->user()->display_name( $author ),72 'author_url' => $author _url,73 'author_avatar' => FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ),67 'author' => $author ? FMWP()->user()->display_name( $author ) : '', 68 'author_url' => $author ? FMWP()->user()->get_profile_link( $author->ID ) : '', 69 'author_avatar' => $author ? FMWP()->user()->get_avatar( $author->ID, 'inline', 60 ) : '', 74 70 'date' => $date, 75 71 'beauty_date' => $beauty_date, … … 80 76 'more_answers' => count( $child ) > 2, 81 77 'total_replies' => $total_child, 82 'mention' => '@' . $slug,78 'mention' => $author ? '@' . FMWP()->user()->maybe_get_slug( $author->ID ) : '', 83 79 'is_trashed' => FMWP()->common()->reply()->is_trashed( $reply->ID ), 84 80 'can_edit' => $can_edit, 85 81 'author_tags' => FMWP()->common()->reply()->get_author_tags( $reply ), 86 'author_card' => FMWP()->user()->generate_card( $author->ID ),82 'author_card' => $author ? FMWP()->user()->generate_card( $author->ID ) : '', 87 83 'is_locked' => FMWP()->common()->reply()->is_locked( $reply ), 88 'is_author' => ( is_user_logged_in() && get_current_user_id() === $author->ID ),84 'is_author' => is_user_logged_in() && $author && get_current_user_id() === $author->ID, 89 85 'dropdown_actions' => $dropdown_actions, 90 86 'can_actions' => count( $dropdown_actions ), -
forumwp/trunk/includes/class-fmwp-functions.php
r3205107 r3306743 534 534 public function get_template_part( $slug, $args = array(), $module = '' ) { 535 535 global $wp_query; 536 /** 537 * Fires just before the algorithm for getting ForumWP custom templates. 538 * 539 * Note: Allow 3rd party plugins or modules filter template file, arguments, module name from their side. 540 * 541 * @since 2.1.4 542 * @hook fmwp_change_template_part 543 * 544 * @param {string} $slug Template name passed by reference. 545 * @param {array} $args Arguments passed for the template by reference. 546 * @param {string} $module Module slug passed by reference. (default: ''). 547 */ 548 do_action_ref_array( 'fmwp_change_template_part', array( &$slug, &$args, &$module ) ); 536 549 537 550 $query_title = $this->undash( sanitize_title( $slug ) ); -
forumwp/trunk/includes/class-modules.php
r3161123 r3306743 26 26 */ 27 27 public function __construct() { 28 add_action( 'forumwp_loaded', array( &$this, 'predefined_modules' ), 0 ); 28 // Register modules here on the early priority and then loading them on the `0` priority in common class. 29 add_action( 'forumwp_init', array( &$this, 'predefined_modules' ), -1 ); 29 30 } 30 31 -
forumwp/trunk/includes/common/class-common.php
r3205107 r3306743 29 29 add_action( 'plugins_loaded', array( &$this, 'on_plugins_loaded' ), -19 ); 30 30 31 add_action( 'init', array( $this, 'init' ), 0 ); 31 32 // loading modules when forumwp is loaded 32 add_action( 'forumwp_loaded', array( FMWP()->modules(), 'load_modules' ), 1 ); 33 34 add_action( 'init', array( $this, 'init' ), 0 ); 33 add_action( 'forumwp_init', array( FMWP()->modules(), 'load_modules' ), 0 ); 35 34 36 35 add_action( 'admin_bar_menu', array( &$this, 'toolbar_links' ), 999 ); … … 549 548 } 550 549 551 552 550 /** 553 551 * -
forumwp/trunk/includes/common/class-forum.php
r3205107 r3306743 37 37 */ 38 38 public function __construct() { 39 add_action( 'forumwp_init', array( &$this, 'init_variables' ), 9 ); 40 41 add_action( 'save_post_fmwp_forum', array( &$this, 'save_post' ), 999997 ); 42 43 add_filter( 'the_posts', array( &$this, 'filter_private_forums' ), 99 ); 44 add_filter( 'posts_where', array( &$this, 'filter_trashed_for_author' ), 10, 2 ); 45 46 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 47 } 48 49 /** 50 * Initialize variables for the class. 51 */ 52 public function init_variables() { 53 // Set visibilities. 39 54 $this->visibilities = array( 40 55 'public' => __( 'Public', 'forumwp' ), … … 43 58 ); 44 59 45 add_action( 'init', array( &$this, 'init_statuses' ) ); 46 47 add_action( 'save_post_fmwp_forum', array( &$this, 'save_post' ), 999997 ); 48 49 add_filter( 'the_posts', array( &$this, 'filter_private_forums' ), 99 ); 50 add_filter( 'posts_where', array( &$this, 'filter_trashed_for_author' ), 10, 2 ); 51 52 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 60 // Set statuses. 61 $this->post_status = array( 'publish' ); 62 if ( is_user_logged_in() ) { 63 $this->post_status[] = 'trash'; // will be visible for trash author or `manage_fmwp_forums_all`. See `$this->filter_trashed_for_author()`. 64 if ( current_user_can( 'manage_fmwp_forums_all' ) ) { 65 $this->post_status[] = 'private'; 66 $this->post_status[] = 'pending'; 67 } 68 } 53 69 } 54 70 … … 129 145 if ( $upgrade_last_update ) { 130 146 update_post_meta( $post_ID, 'fmwp_last_update', time() ); 131 }132 }133 134 /**135 * Set statuses136 */137 public function init_statuses() {138 $this->post_status = array( 'publish' );139 140 if ( is_user_logged_in() ) {141 $this->post_status[] = 'trash'; // will be visible for trash author or `manage_fmwp_forums_all`. See `$this->filter_trashed_for_author()`.142 if ( current_user_can( 'manage_fmwp_forums_all' ) ) {143 $this->post_status[] = 'private';144 $this->post_status[] = 'pending';145 }146 147 } 147 148 } -
forumwp/trunk/includes/common/class-options.php
r3161123 r3306743 18 18 * @var array 19 19 */ 20 private $options = array();20 private $options; 21 21 22 22 /** … … 29 29 */ 30 30 public function __construct() { 31 $this-> init();32 $this->init_pages();31 $this->options = get_option( 'fmwp_options', array() ); // Force setting options variable here for getting them everywhere even on early hooks. 32 add_action( 'forumwp_init', array( $this, 'init_variables' ), 0 ); 33 33 } 34 34 … … 36 36 * Set variables 37 37 */ 38 public function init() { 39 $this->options = get_option( 'fmwp_options', array() ); 40 } 41 42 /** 43 * Set variables 44 */ 45 public function init_pages() { 38 public function init_variables() { 46 39 $core_pages = array_keys( FMWP()->config()->get( 'core_pages' ) ); 47 40 if ( ! empty( $core_pages ) ) { -
forumwp/trunk/includes/common/class-reply.php
r3205107 r3306743 32 32 33 33 add_action( 'save_post_fmwp_reply', array( &$this, 'save_post' ), 999997, 3 ); 34 add_action( 'init', array( &$this, 'init_statuses' ), 10 );35 34 36 35 add_filter( 'posts_where', array( &$this, 'filter_pending_for_author' ), 10, 2 ); … … 40 39 41 40 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 41 } 42 43 /** 44 * Initialize variables for the forum replies. 45 */ 46 public function init_variables() { 47 // Set soring types. 48 $this->sort_by = apply_filters( 49 'fmwp_replies_sorting', 50 array( 51 'date_asc' => __( 'Oldest to Newest', 'forumwp' ), 52 'date_desc' => __( 'Newest to Oldest', 'forumwp' ), 53 ) 54 ); 55 // Set statuses. 56 $this->post_status = array( 'publish' ); 57 if ( is_user_logged_in() ) { 58 $this->post_status[] = 'pending'; 59 $this->post_status[] = 'trash'; 60 } 42 61 } 43 62 … … 113 132 } 114 133 115 public function init_variables() {116 $this->sort_by = apply_filters(117 'fmwp_replies_sorting',118 array(119 'date_asc' => __( 'Oldest to Newest', 'forumwp' ),120 'date_desc' => __( 'Newest to Oldest', 'forumwp' ),121 )122 );123 }124 125 134 /** 126 135 * @param int $reply_id … … 238 247 239 248 return $spam; 240 }241 242 /**243 * Set statuses244 */245 public function init_statuses() {246 $this->post_status = array( 'publish' );247 if ( is_user_logged_in() ) {248 $this->post_status[] = 'pending';249 $this->post_status[] = 'trash';250 }251 249 } 252 250 -
forumwp/trunk/includes/common/class-topic.php
r3205107 r3306743 54 54 add_filter( 'posts_where', array( &$this, 'filter_pending_for_author' ), 10, 2 ); 55 55 56 add_action( 'init', array( &$this, 'init_statuses' ), 10 );57 58 56 add_action( 'transition_post_status', array( &$this, 'trash' ), 10, 3 ); 59 57 } 60 58 61 62 /** 63 * Set statuses 64 */ 65 public function init_statuses() { 66 $this->post_status = array( 'publish' ); 67 if ( is_user_logged_in() ) { 68 $this->post_status[] = 'trash'; 69 $this->post_status[] = 'pending'; //pending can be visible for author 70 if ( current_user_can( 'manage_fmwp_topics_all' ) ) { 71 $this->post_status[] = 'private'; 72 } 73 } 74 } 75 76 77 /** 78 * @param $where 79 * @param $wp_query 80 * 81 * @return mixed 82 */ 83 public function filter_pending_for_author( $where, $wp_query ) { 84 if ( isset( $wp_query->query['post_type'] ) && 'fmwp_topic' === $wp_query->query['post_type'] ) { 85 if ( isset( $wp_query->query['post_status'] ) && ( 'pending' === $wp_query->query['post_status'] || ( is_array( $wp_query->query['post_status'] ) && in_array( 'pending', $wp_query->query['post_status'], true ) ) ) ) { 86 global $wpdb; 87 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 88 $current_user_id = get_current_user_id(); 89 90 $where = str_replace( "{$wpdb->posts}.post_status = 'pending'", "( {$wpdb->posts}.post_status = 'pending' AND {$wpdb->posts}.post_author = '" . $current_user_id . "' )", $where ); 91 $where = str_replace( 92 "{$wpdb->posts}.post_status = 'trash'", 93 "( {$wpdb->posts}.post_status = 'trash' AND {$wpdb->posts}.post_author = '$current_user_id' )", 94 $where 95 ); 96 } 97 } 98 } 99 100 return $where; 101 } 102 103 104 /** 105 * Make invisible topics from trashed forums 106 * 107 * @param $posts 108 * @param $query 109 * 110 * @return array 111 */ 112 public function filter_topics_from_hidden_forums( $posts, $query ) { 113 if ( FMWP()->is_request( 'admin' ) && ! FMWP()->is_request( 'ajax' ) ) { 114 return $posts; 115 } 116 117 $filtered_posts = array(); 118 119 //if empty 120 if ( empty( $posts ) ) { 121 return $posts; 122 } 123 124 foreach ( $posts as $post ) { 125 126 if ( 'fmwp_topic' !== $post->post_type ) { 127 $filtered_posts[] = $post; 128 continue; 129 } 130 131 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 132 if ( $this->is_spam( $post ) ) { 133 continue; 134 } 135 } 136 137 $forum_id = $this->get_forum_id( $post->ID ); 138 $forum = get_post( $forum_id ); 139 140 if ( in_array( $forum->post_status, array( 'private', 'pending' ), true ) && current_user_can( 'manage_fmwp_forums_all' ) ) { 141 $filtered_posts[] = $post; 142 continue; 143 } 144 145 if ( 'publish' === $forum->post_status ) { 146 if ( current_user_can( 'manage_fmwp_forums_all' ) ) { 147 $filtered_posts[] = $post; 148 continue; 149 } 150 151 $visibility = get_post_meta( $forum_id, 'fmwp_visibility', true ); 152 if ( 'public' === $visibility ) { 153 $filtered_posts[] = $post; 154 } 155 } 156 } 157 return $filtered_posts; 158 } 159 160 /** 161 * @param int|WP_Post|array $post 162 * 163 * @return bool 164 */ 165 public function is_locked( $post ) { 166 $locked = false; 167 if ( is_numeric( $post ) ) { 168 $post = get_post( $post ); 169 170 if ( empty( $post ) || is_wp_error( $post ) ) { 171 return false; 172 } 173 } 174 175 if ( 'fmwp_topic' === $post->post_type ) { 176 $is_locked = get_post_meta( $post->ID, 'fmwp_locked', true ); 177 $locked = ! empty( $is_locked ); 178 } 179 180 return $locked; 181 } 182 183 /** 184 * @param int|WP_Post|array $post 185 * 186 * @return bool 187 */ 188 public function is_spam( $post ) { 189 $spam = false; 190 if ( is_numeric( $post ) ) { 191 $post = get_post( $post ); 192 193 if ( empty( $post ) || is_wp_error( $post ) ) { 194 return false; 195 } 196 } 197 198 if ( 'fmwp_topic' === $post->post_type ) { 199 $is_spam = get_post_meta( $post->ID, 'fmwp_spam', true ); 200 $spam = ! empty( $is_spam ); 201 } 202 203 return $spam; 204 } 205 206 207 /** 208 * 59 /** 60 * Initializes variables including statuses, types, status markers, and sorting criteria. 209 61 */ 210 62 public function init_variables() { … … 268 120 ) 269 121 ); 122 // Set statuses. 123 $this->post_status = array( 'publish' ); 124 if ( is_user_logged_in() ) { 125 $this->post_status[] = 'trash'; 126 $this->post_status[] = 'pending'; //pending can be visible for author 127 if ( current_user_can( 'manage_fmwp_topics_all' ) ) { 128 $this->post_status[] = 'private'; 129 } 130 } 131 } 132 133 /** 134 * @param $where 135 * @param $wp_query 136 * 137 * @return mixed 138 */ 139 public function filter_pending_for_author( $where, $wp_query ) { 140 if ( isset( $wp_query->query['post_type'] ) && 'fmwp_topic' === $wp_query->query['post_type'] ) { 141 if ( isset( $wp_query->query['post_status'] ) && ( 'pending' === $wp_query->query['post_status'] || ( is_array( $wp_query->query['post_status'] ) && in_array( 'pending', $wp_query->query['post_status'], true ) ) ) ) { 142 global $wpdb; 143 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 144 $current_user_id = get_current_user_id(); 145 146 $where = str_replace( "{$wpdb->posts}.post_status = 'pending'", "( {$wpdb->posts}.post_status = 'pending' AND {$wpdb->posts}.post_author = '" . $current_user_id . "' )", $where ); 147 $where = str_replace( 148 "{$wpdb->posts}.post_status = 'trash'", 149 "( {$wpdb->posts}.post_status = 'trash' AND {$wpdb->posts}.post_author = '$current_user_id' )", 150 $where 151 ); 152 } 153 } 154 } 155 156 return $where; 157 } 158 159 /** 160 * Make invisible topics from trashed forums 161 * 162 * @param $posts 163 * @param $query 164 * 165 * @return array 166 */ 167 public function filter_topics_from_hidden_forums( $posts, $query ) { 168 if ( FMWP()->is_request( 'admin' ) && ! FMWP()->is_request( 'ajax' ) ) { 169 return $posts; 170 } 171 172 $filtered_posts = array(); 173 174 //if empty 175 if ( empty( $posts ) ) { 176 return $posts; 177 } 178 179 foreach ( $posts as $post ) { 180 181 if ( 'fmwp_topic' !== $post->post_type ) { 182 $filtered_posts[] = $post; 183 continue; 184 } 185 186 if ( ! current_user_can( 'manage_fmwp_topics_all' ) ) { 187 if ( $this->is_spam( $post ) ) { 188 continue; 189 } 190 } 191 192 $forum_id = $this->get_forum_id( $post->ID ); 193 $forum = get_post( $forum_id ); 194 195 if ( in_array( $forum->post_status, array( 'private', 'pending' ), true ) && current_user_can( 'manage_fmwp_forums_all' ) ) { 196 $filtered_posts[] = $post; 197 continue; 198 } 199 200 if ( 'publish' === $forum->post_status ) { 201 if ( current_user_can( 'manage_fmwp_forums_all' ) ) { 202 $filtered_posts[] = $post; 203 continue; 204 } 205 206 $visibility = get_post_meta( $forum_id, 'fmwp_visibility', true ); 207 if ( 'public' === $visibility ) { 208 $filtered_posts[] = $post; 209 } 210 } 211 } 212 return $filtered_posts; 213 } 214 215 /** 216 * @param int|WP_Post|array $post 217 * 218 * @return bool 219 */ 220 public function is_locked( $post ) { 221 $locked = false; 222 if ( is_numeric( $post ) ) { 223 $post = get_post( $post ); 224 225 if ( empty( $post ) || is_wp_error( $post ) ) { 226 return false; 227 } 228 } 229 230 if ( 'fmwp_topic' === $post->post_type ) { 231 $is_locked = get_post_meta( $post->ID, 'fmwp_locked', true ); 232 $locked = ! empty( $is_locked ); 233 } 234 235 return $locked; 236 } 237 238 /** 239 * @param int|WP_Post|array $post 240 * 241 * @return bool 242 */ 243 public function is_spam( $post ) { 244 $spam = false; 245 if ( is_numeric( $post ) ) { 246 $post = get_post( $post ); 247 248 if ( empty( $post ) || is_wp_error( $post ) ) { 249 return false; 250 } 251 } 252 253 if ( 'fmwp_topic' === $post->post_type ) { 254 $is_spam = get_post_meta( $post->ID, 'fmwp_spam', true ); 255 $spam = ! empty( $is_spam ); 256 } 257 258 return $spam; 270 259 } 271 260 -
forumwp/trunk/includes/frontend/class-shortcodes.php
r3205107 r3306743 619 619 add_action( 'wp_footer', array( &$this, 'login_popup' ), -1 ); 620 620 } elseif ( FMWP()->user()->can_create_topic( $args['id'] ) ) { 621 // pre-init ajax loader styles622 FMWP()->ajax_loader_styles( 25 );623 624 add_action( 'wp_footer', array( &$this, 'topic_popup' ), -1 );621 // pre-init ajax loader styles 622 FMWP()->ajax_loader_styles( 25 ); 623 624 add_action( 'wp_footer', array( &$this, 'topic_popup' ), -1 ); 625 625 } 626 626 … … 967 967 $args = shortcode_atts( $default_args, $args ); 968 968 969 /** 970 * Fires before render User Topics List shortcode. 971 * 972 * @since 2.1.4 973 * @hook fmwp_before_user_topics_shortcode 974 * 975 * @param {array} $args Arguments passed into shortcode. 976 */ 977 do_action( 'fmwp_before_user_topics_shortcode', $args ); 978 969 979 ob_start(); 970 980 … … 993 1003 994 1004 $args = shortcode_atts( $default_args, $args ); 1005 1006 /** 1007 * Fires before render User Replies List shortcode. 1008 * 1009 * @since 2.1.4 1010 * @hook fmwp_before_user_replies_shortcode 1011 * 1012 * @param {array} $args Arguments passed into shortcode. 1013 */ 1014 do_action( 'fmwp_before_user_replies_shortcode', $args ); 995 1015 996 1016 ob_start(); -
forumwp/trunk/languages/forumwp.pot
r3205107 r3306743 1 # Copyright (C) 202 4ForumWP2 # This file is distributed under the same license as the ForumWP plugin.1 # Copyright (C) 2025 ForumWP 2 # This file is distributed under the GPLv3. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ForumWP 2.1. 3\n"5 "Project-Id-Version: ForumWP 2.1.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/forumwp\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-12-09T20:24:35+00:00\n"12 "POT-Creation-Date: 2025-05-30T14:15:01+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: forumwp\n" 16 16 … … 40 40 #: includes/admin/class-columns.php:409 41 41 #: includes/admin/class-columns.php:419 42 #: includes/common/class-reply.php:76 343 #: includes/common/class-topic.php:5 1542 #: includes/common/class-reply.php:761 43 #: includes/common/class-topic.php:504 44 44 msgid "Reported" 45 45 msgstr "" … … 50 50 #: includes/admin/class-columns.php:400 51 51 #: includes/admin/class-columns.php:484 52 #: includes/common/class-topic.php: 24452 #: includes/common/class-topic.php:96 53 53 #: templates/js/forum-row.php:41 54 54 #: templates/single-forum-info.php:88 … … 63 63 #: includes/admin/class-columns.php:404 64 64 #: includes/admin/class-columns.php:414 65 #: includes/common/class-reply.php:75 866 #: includes/common/class-topic.php:5 1365 #: includes/common/class-reply.php:756 66 #: includes/common/class-topic.php:502 67 67 #: blocks-src/fmwp-topics-list/src/index.js:78 68 68 #: includes/blocks/fmwp-topics-list/src/index.js:1 … … 87 87 #: includes/class-config.php:566 88 88 #: includes/class-fmwp-functions.php:185 89 #: includes/class-fmwp-functions.php:6 7890 #: includes/class-fmwp-functions.php: 69689 #: includes/class-fmwp-functions.php:691 90 #: includes/class-fmwp-functions.php:709 91 91 #: includes/frontend/class-profile.php:62 92 92 #: templates/archive-forum-header.php:15 … … 145 145 #: includes/admin/templates/topic/attributes.php:81 146 146 #: includes/class-fmwp-functions.php:140 147 #: includes/common/class-common.php:9 71147 #: includes/common/class-common.php:969 148 148 #: templates/archive-forum-header.php:21 149 149 msgid "Forum" … … 158 158 159 159 #: includes/admin/class-columns.php:577 160 #: includes/class-fmwp-functions.php:6 82160 #: includes/class-fmwp-functions.php:695 161 161 msgid "Tags" 162 162 msgstr "" … … 203 203 #: includes/class-config.php:563 204 204 #: includes/class-fmwp-functions.php:139 205 #: includes/class-fmwp-functions.php:6 41206 #: includes/class-fmwp-functions.php:6 60207 #: includes/class-fmwp-functions.php:7 07208 #: includes/class-fmwp-functions.php:7 24205 #: includes/class-fmwp-functions.php:654 206 #: includes/class-fmwp-functions.php:673 207 #: includes/class-fmwp-functions.php:720 208 #: includes/class-fmwp-functions.php:737 209 209 #: templates/js/forum-category-list.php:20 210 210 msgid "Forums" … … 262 262 #. translators: %s is a plugin name. 263 263 #: includes/admin/class-notices.php:204 264 #, php-format 264 265 msgid "To add forum functionality to your website %s needs to create several front-end pages (Forums, Topics, Profile, Registration & Login)." 265 266 msgstr "" … … 279 280 #. translators: %1$s,%3$s is a plugin name; %2$s,%4$s is a plugin version; %5$s is a upgrade page URL. 280 281 #: includes/admin/class-notices.php:277 282 #, php-format 281 283 msgid "<strong>%1$s version %2$s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%3$s %4$s</strong>.<br />Please visit \"<a href=\"%5$s\">Upgrade</a>\" page and run the upgrade process." 282 284 msgstr "" … … 288 290 #. translators: %1$s is a plugin name; %2$s is a plugin version. 289 291 #: includes/admin/class-notices.php:302 292 #, php-format 290 293 msgid "<strong>%1$s %2$s</strong> Successfully Upgraded" 291 294 msgstr "" … … 293 296 #. translators: %1$s is a post title; %2$s is a post name (slug). 294 297 #: includes/admin/class-notices.php:352 298 #, php-format 295 299 msgid "Permalink Conflict! Please change permalink for the <strong>\"%1$s\"</strong> post, the <strong>\"%2$s\"</strong> slug is reserved." 296 300 msgstr "" … … 306 310 #. translators: %s override templates page link. 307 311 #: includes/admin/class-notices.php:417 312 #, php-format 308 313 msgid "Your templates are out of date. Please visit <a href=\"%s\">override templates status page</a> and update templates." 309 314 msgstr "" … … 331 336 #. translators: %s is a page title. 332 337 #: includes/admin/class-settings.php:216 338 #, php-format 333 339 msgid "%s page" 334 340 msgstr "" … … 404 410 405 411 #: includes/admin/class-settings.php:334 406 #: includes/common/class-reply.php: 120407 #: includes/common/class-topic.php: 265412 #: includes/common/class-reply.php:52 413 #: includes/common/class-topic.php:117 408 414 #: blocks-src/fmwp-forum/src/index.js:46 409 415 #: blocks-src/fmwp-forums-list/src/index.js:62 … … 418 424 419 425 #: includes/admin/class-settings.php:335 420 #: includes/common/class-reply.php: 119421 #: includes/common/class-topic.php: 264426 #: includes/common/class-reply.php:51 427 #: includes/common/class-topic.php:116 422 428 #: blocks-src/fmwp-forum/src/index.js:47 423 429 #: blocks-src/fmwp-forums-list/src/index.js:63 … … 577 583 #. translators: %s is a plan data. 578 584 #: includes/admin/class-settings.php:500 585 #, php-format 579 586 msgid "%s modules" 580 587 msgstr "" … … 634 641 #. translators: %s: Last checking templates time. 635 642 #: includes/admin/class-settings.php:844 643 #, php-format 636 644 msgid "Last update: %s. You could re-check changes manually." 637 645 msgstr "" … … 643 651 #. translators: %s: Link to the docs article. 644 652 #: includes/admin/class-settings.php:853 653 #, php-format 645 654 msgid "You may get more details about overriding templates <a href=\"%s\" target=\"_blank\">here</a>." 646 655 msgstr "" … … 660 669 #. translators: %s is a new plugins version 661 670 #: includes/admin/class-upgrade.php:122 671 #, php-format 662 672 msgid "%s is a major update, and we highly recommend creating a full backup of your site before updating." 663 673 msgstr "" … … 673 683 #. translators: %s is the plugin name. 674 684 #: includes/admin/class-upgrade.php:227 685 #, php-format 675 686 msgid "%s - Upgrade Process" 676 687 msgstr "" … … 678 689 #. translators: %1$s is the installed version. %2$s is the DB version. 679 690 #: includes/admin/class-upgrade.php:233 691 #, php-format 680 692 msgid "You have installed <strong>%1$s</strong> version. Your latest DB version is <strong>%2$s</strong>. We recommend creating a backup of your site before running the update process. Do not exit the page before the update process has complete." 681 693 msgstr "" … … 720 732 #. translators: %s is a count. 721 733 #: includes/admin/packages/2.0.1/spam.php:15 734 #, php-format 722 735 msgid "Spam <span class=\"count\">(%s)</span>" 723 736 msgid_plural "Spam <span class=\"count\">(%s)</span>" … … 756 769 #. translators: %s is a count 757 770 #: includes/admin/packages/2.0/locked.php:15 771 #, php-format 758 772 msgid "Locked <span class=\"count\">(%s)</span>" 759 773 msgid_plural "Locked <span class=\"count\">(%s)</span>" … … 768 782 #. translators: %s is a count. 769 783 #: includes/admin/packages/2.0/solved.php:15 784 #, php-format 770 785 msgid "Solved <span class=\"count\">(%s)</span>" 771 786 msgid_plural "Solved <span class=\"count\">(%s)</span>" … … 854 869 #. translators: %s is a plugin name. 855 870 #: includes/admin/templates/settings/settings.php:12 871 #, php-format 856 872 msgid "%s - Settings" 857 873 msgstr "" … … 889 905 msgstr "" 890 906 891 #: includes/ajax/class-forum.php:21 1892 #: includes/ajax/class-forum.php:24 5893 #: includes/ajax/class-forum.php:28 0894 #: includes/ajax/class-forum.php:31 0895 #: includes/ajax/class-forum.php:33 7896 #: includes/ajax/class-reply.php:44 4897 #: includes/ajax/class-reply.php:5 62898 #: includes/ajax/class-reply.php:6 23899 #: includes/ajax/class-reply.php:65 9900 #: includes/ajax/class-reply.php:69 6901 #: includes/ajax/class-reply.php:80 6902 #: includes/ajax/class-reply.php:8 40907 #: includes/ajax/class-forum.php:212 908 #: includes/ajax/class-forum.php:246 909 #: includes/ajax/class-forum.php:281 910 #: includes/ajax/class-forum.php:311 911 #: includes/ajax/class-forum.php:338 912 #: includes/ajax/class-reply.php:440 913 #: includes/ajax/class-reply.php:558 914 #: includes/ajax/class-reply.php:619 915 #: includes/ajax/class-reply.php:655 916 #: includes/ajax/class-reply.php:692 917 #: includes/ajax/class-reply.php:802 918 #: includes/ajax/class-reply.php:836 903 919 #: includes/ajax/class-topic.php:495 904 920 #: includes/ajax/class-topic.php:616 … … 915 931 msgstr "" 916 932 917 #: includes/ajax/class-forum.php:21 8918 #: includes/ajax/class-forum.php:25 2919 #: includes/ajax/class-forum.php:28 7920 #: includes/ajax/class-forum.php:31 7921 #: includes/ajax/class-forum.php:34 4933 #: includes/ajax/class-forum.php:219 934 #: includes/ajax/class-forum.php:253 935 #: includes/ajax/class-forum.php:288 936 #: includes/ajax/class-forum.php:318 937 #: includes/ajax/class-forum.php:345 922 938 msgid "Forum ID is invalid" 923 939 msgstr "" 924 940 925 #: includes/ajax/class-forum.php:22 2941 #: includes/ajax/class-forum.php:223 926 942 msgid "You do not have the ability to move this forum to trash" 927 943 msgstr "" 928 944 929 #: includes/ajax/class-forum.php:25 6945 #: includes/ajax/class-forum.php:257 930 946 msgid "You do not have the ability to restore this forum" 931 947 msgstr "" 932 948 933 #: includes/ajax/class-forum.php:29 1949 #: includes/ajax/class-forum.php:292 934 950 #: includes/ajax/class-topic.php:812 935 951 msgid "You do not have the ability to delete this topic" 936 952 msgstr "" 937 953 938 #: includes/ajax/class-forum.php:29 8954 #: includes/ajax/class-forum.php:299 939 955 msgid "Forum was deleted successfully." 940 956 msgstr "" … … 962 978 msgstr "" 963 979 964 #: includes/ajax/class-reply.php:3 51965 #: includes/ajax/class-reply.php:35 7966 #: includes/ajax/class-reply.php:5 31980 #: includes/ajax/class-reply.php:347 981 #: includes/ajax/class-reply.php:353 982 #: includes/ajax/class-reply.php:527 967 983 msgid "Invalid reply" 968 984 msgstr "" 969 985 970 #: includes/ajax/class-reply.php:4 51986 #: includes/ajax/class-reply.php:447 971 987 #: includes/ajax/class-topic.php:906 972 988 #: includes/ajax/class-topic.php:934 … … 975 991 msgstr "" 976 992 977 #: includes/ajax/class-reply.php:45 7993 #: includes/ajax/class-reply.php:453 978 994 msgid "You haven't capabilities to make this action" 979 995 msgstr "" 980 996 981 #: includes/ajax/class-reply.php:46 4997 #: includes/ajax/class-reply.php:460 982 998 msgid "Empty or Invalid Topic ID." 983 999 msgstr "" 984 1000 985 #: includes/ajax/class-reply.php:4 71986 #: includes/ajax/class-reply.php:5 821001 #: includes/ajax/class-reply.php:467 1002 #: includes/ajax/class-reply.php:578 987 1003 #: includes/ajax/class-topic.php:440 988 1004 #: includes/ajax/class-topic.php:523 … … 991 1007 992 1008 #. translators: %s is a reply creation delay 993 #: includes/ajax/class-reply.php:483 1009 #: includes/ajax/class-reply.php:479 1010 #, php-format 994 1011 msgid "You cannot leave replies faster than %s seconds" 995 1012 msgstr "" 996 1013 997 #: includes/ajax/class-reply.php:52 51014 #: includes/ajax/class-reply.php:521 998 1015 msgid "Invalid reply ID" 999 1016 msgstr "" 1000 1017 1001 #: includes/ajax/class-reply.php:53 51002 #: includes/ajax/class-reply.php:57 51018 #: includes/ajax/class-reply.php:531 1019 #: includes/ajax/class-reply.php:571 1003 1020 msgid "You do not have the ability to edit this reply" 1004 1021 msgstr "" 1005 1022 1006 #: includes/ajax/class-reply.php:56 91007 #: includes/ajax/class-reply.php:6 301008 #: includes/ajax/class-reply.php:66 61009 #: includes/ajax/class-reply.php: 7031010 #: includes/ajax/class-reply.php:8 131011 #: includes/ajax/class-reply.php:84 71023 #: includes/ajax/class-reply.php:565 1024 #: includes/ajax/class-reply.php:626 1025 #: includes/ajax/class-reply.php:662 1026 #: includes/ajax/class-reply.php:699 1027 #: includes/ajax/class-reply.php:809 1028 #: includes/ajax/class-reply.php:843 1012 1029 msgid "Reply ID is invalid" 1013 1030 msgstr "" 1014 1031 1015 #: includes/ajax/class-reply.php:60 41032 #: includes/ajax/class-reply.php:600 1016 1033 #: includes/ajax/class-topic.php:552 1017 1034 msgid "Something is wrong with the data" 1018 1035 msgstr "" 1019 1036 1020 #: includes/ajax/class-reply.php:63 41037 #: includes/ajax/class-reply.php:630 1021 1038 msgid "You do not have the ability to move this reply to trash" 1022 1039 msgstr "" 1023 1040 1024 #: includes/ajax/class-reply.php:6 701041 #: includes/ajax/class-reply.php:666 1025 1042 msgid "You do not have the ability to restore this reply" 1026 1043 msgstr "" 1027 1044 1028 #: includes/ajax/class-reply.php:70 71045 #: includes/ajax/class-reply.php:703 1029 1046 msgid "You do not have the ability to delete this reply" 1030 1047 msgstr "" 1031 1048 1032 #: includes/ajax/class-reply.php:81 71049 #: includes/ajax/class-reply.php:813 1033 1050 msgid "You do not have the ability to mark this reply as spam" 1034 1051 msgstr "" 1035 1052 1036 #: includes/ajax/class-reply.php:8 511053 #: includes/ajax/class-reply.php:847 1037 1054 msgid "You do not have the ability to restore this reply from spam" 1038 1055 msgstr "" 1039 1056 1040 #: includes/ajax/class-reply.php:87 41041 #: includes/ajax/class-reply.php: 9021042 #: includes/ajax/class-reply.php:92 91057 #: includes/ajax/class-reply.php:870 1058 #: includes/ajax/class-reply.php:898 1059 #: includes/ajax/class-reply.php:925 1043 1060 msgid "Empty Reply ID" 1044 1061 msgstr "" 1045 1062 1046 #: includes/ajax/class-reply.php:8 821063 #: includes/ajax/class-reply.php:878 1047 1064 #: includes/ajax/class-topic.php:921 1048 1065 msgid "Something wrong with reports" 1049 1066 msgstr "" 1050 1067 1051 #: includes/ajax/class-reply.php:90 91052 #: includes/ajax/class-reply.php:94 41068 #: includes/ajax/class-reply.php:905 1069 #: includes/ajax/class-reply.php:940 1053 1070 #: includes/ajax/class-topic.php:949 1054 1071 #: includes/ajax/class-topic.php:977 … … 1058 1075 #. translators: %s is an author display name 1059 1076 #: includes/ajax/class-topic.php:84 1077 #, php-format 1060 1078 msgid "Created by %s" 1061 1079 msgstr "" … … 1063 1081 #. translators: %s is a last replies author display name 1064 1082 #: includes/ajax/class-topic.php:103 1083 #, php-format 1065 1084 msgid "Last reply by %s" 1066 1085 msgstr "" … … 1089 1108 #. translators: %s is a topic delay time 1090 1109 #: includes/ajax/class-topic.php:452 1110 #, php-format 1091 1111 msgid "You cannot create topics faster than %s seconds" 1092 1112 msgstr "" … … 1139 1159 1140 1160 #: includes/ajax/class-user.php:41 1141 #: includes/common/class-common.php:31 81161 #: includes/common/class-common.php:317 1142 1162 msgid "Everyone" 1143 1163 msgstr "" 1144 1164 1145 1165 #: includes/ajax/class-user.php:46 1146 #: includes/common/class-common.php:31 51166 #: includes/common/class-common.php:314 1147 1167 msgid "All" 1148 1168 msgstr "" … … 1192 1212 #. translators: %s is a plugin name. 1193 1213 #: includes/class-dependencies.php:75 1214 #, php-format 1194 1215 msgid "Please check <strong>\"%s\"</strong> plugin's folder name. Correct folder name is <strong>\"forumwp\"</strong>" 1195 1216 msgstr "" … … 1212 1233 1213 1234 #: includes/class-fmwp-functions.php:145 1214 #: includes/common/class-common.php:101 21235 #: includes/common/class-common.php:1010 1215 1236 msgid "Edit Forum" 1216 1237 msgstr "" … … 1263 1284 1264 1285 #: includes/class-fmwp-functions.php:186 1265 #: includes/common/class-common.php:98 21286 #: includes/common/class-common.php:980 1266 1287 #: templates/archive-topic-header.php:26 1267 1288 msgid "Topic" … … 1282 1303 1283 1304 #: includes/class-fmwp-functions.php:191 1284 #: includes/common/class-common.php:102 41305 #: includes/common/class-common.php:1022 1285 1306 msgid "Edit Topic" 1286 1307 msgstr "" … … 1312 1333 1313 1334 #: includes/class-fmwp-functions.php:225 1314 #: includes/common/class-topic.php:11 451315 #: includes/common/class-topic.php:11 521335 #: includes/common/class-topic.php:1134 1336 #: includes/common/class-topic.php:1141 1316 1337 #: templates/js/reply-row.php:117 1317 1338 #: templates/js/reply-row.php:132 … … 1467 1488 msgstr "" 1468 1489 1469 #: includes/class-fmwp-functions.php:6 121490 #: includes/class-fmwp-functions.php:625 1470 1491 msgid "Home" 1471 1492 msgstr "" 1472 1493 1473 #: includes/class-fmwp-functions.php:6 451494 #: includes/class-fmwp-functions.php:658 1474 1495 #: templates/new-forum.php:47 1475 1496 msgid "Categories" … … 1481 1502 msgstr "" 1482 1503 1483 #: includes/class-modules.php:3 81504 #: includes/class-modules.php:39 1484 1505 msgid "Basic" 1485 1506 msgstr "" 1486 1507 1487 #: includes/class-modules.php:4 11508 #: includes/class-modules.php:42 1488 1509 msgid "Migration" 1489 1510 msgstr "" 1490 1511 1491 #: includes/class-modules.php:4 21512 #: includes/class-modules.php:43 1492 1513 msgid "Ability to migration forums, topics and replies from bbPress" 1493 1514 msgstr "" 1494 1515 1495 #: includes/common/class-forum.php: 401516 #: includes/common/class-forum.php:55 1496 1517 msgid "Public" 1497 1518 msgstr "" 1498 1519 1499 #: includes/common/class-forum.php: 411520 #: includes/common/class-forum.php:56 1500 1521 msgid "Private" 1501 1522 msgstr "" 1502 1523 1503 #: includes/common/class-forum.php: 421524 #: includes/common/class-forum.php:57 1504 1525 msgid "Hidden" 1505 1526 msgstr "" 1506 1527 1507 #: includes/common/class-forum.php:17 21528 #: includes/common/class-forum.php:173 1508 1529 msgid "Unlock forum" 1509 1530 msgstr "" 1510 1531 1511 #: includes/common/class-forum.php:1 791532 #: includes/common/class-forum.php:180 1512 1533 msgid "Lock forum" 1513 1534 msgstr "" 1514 1535 1515 #: includes/common/class-forum.php:1 891516 #: includes/common/class-reply.php:83 51517 #: includes/common/class-topic.php:5 901536 #: includes/common/class-forum.php:190 1537 #: includes/common/class-reply.php:833 1538 #: includes/common/class-topic.php:579 1518 1539 msgid "Move to trash" 1519 1540 msgstr "" 1520 1541 1521 #: includes/common/class-forum.php:20 51542 #: includes/common/class-forum.php:206 1522 1543 msgid "Restore forum" 1523 1544 msgstr "" 1524 1545 1525 #: includes/common/class-forum.php:21 41546 #: includes/common/class-forum.php:215 1526 1547 msgid "Remove forum" 1527 1548 msgstr "" … … 1534 1555 #: includes/common/class-mail.php:103 1535 1556 #: includes/common/class-mail.php:221 1557 #, php-format 1536 1558 msgid "<code>%s</code> does not exist." 1537 1559 msgstr "" … … 1539 1561 #. translators: %s is a topic title 1540 1562 #. translators: %s is a topic title. 1541 #: includes/common/class-reply.php:40 61563 #: includes/common/class-reply.php:404 1542 1564 #: modules/migration/class-init.php:909 1565 #, php-format 1543 1566 msgid "Reply To: %s" 1544 1567 msgstr "" 1545 1568 1546 #: includes/common/class-reply.php:74 91547 #: includes/common/class-topic.php: 2151548 #: includes/common/class-topic.php:5 161569 #: includes/common/class-reply.php:747 1570 #: includes/common/class-topic.php:67 1571 #: includes/common/class-topic.php:505 1549 1572 #: blocks-src/fmwp-topics-list/src/index.js:76 1550 1573 #: includes/blocks/fmwp-topics-list/src/index.js:1 … … 1552 1575 msgstr "" 1553 1576 1554 #: includes/common/class-reply.php:75 31555 #: includes/common/class-topic.php:5 111577 #: includes/common/class-reply.php:751 1578 #: includes/common/class-topic.php:500 1556 1579 #: templates/js/forum-row.php:55 1557 1580 msgid "Trashed" 1558 1581 msgstr "" 1559 1582 1560 #: includes/common/class-reply.php:82 61583 #: includes/common/class-reply.php:824 1561 1584 msgid "Edit reply" 1562 1585 msgstr "" 1563 1586 1564 #: includes/common/class-reply.php:84 41565 #: includes/common/class-topic.php:5 991587 #: includes/common/class-reply.php:842 1588 #: includes/common/class-topic.php:588 1566 1589 msgid "Mark as spam" 1567 1590 msgstr "" 1568 1591 1569 #: includes/common/class-reply.php:85 31570 #: includes/common/class-topic.php: 6081592 #: includes/common/class-reply.php:851 1593 #: includes/common/class-topic.php:597 1571 1594 msgid "Isn't spam" 1572 1595 msgstr "" 1573 1596 1574 #: includes/common/class-reply.php:86 41597 #: includes/common/class-reply.php:862 1575 1598 msgid "Report reply" 1576 1599 msgstr "" 1577 1600 1578 #: includes/common/class-reply.php:8 711601 #: includes/common/class-reply.php:869 1579 1602 msgid "Un-report reply" 1580 1603 msgstr "" 1581 1604 1582 #: includes/common/class-reply.php:8 811605 #: includes/common/class-reply.php:879 1583 1606 msgid "Clear reply's reports" 1584 1607 msgstr "" 1585 1608 1586 #: includes/common/class-reply.php:8 911609 #: includes/common/class-reply.php:889 1587 1610 msgid "Restore reply" 1588 1611 msgstr "" 1589 1612 1590 #: includes/common/class-reply.php: 9001613 #: includes/common/class-reply.php:898 1591 1614 msgid "Remove reply" 1592 1615 msgstr "" 1593 1616 1594 #: includes/common/class-topic.php: 2141617 #: includes/common/class-topic.php:66 1595 1618 msgid "Open" 1596 1619 msgstr "" 1597 1620 1598 #: includes/common/class-topic.php: 2161621 #: includes/common/class-topic.php:68 1599 1622 #: blocks-src/fmwp-topics-list/src/index.js:77 1600 1623 #: includes/blocks/fmwp-topics-list/src/index.js:1 … … 1602 1625 msgstr "" 1603 1626 1604 #: includes/common/class-topic.php: 2221627 #: includes/common/class-topic.php:74 1605 1628 msgid "Normal" 1606 1629 msgstr "" 1607 1630 1608 #: includes/common/class-topic.php: 2261609 #: includes/common/class-topic.php: 2481631 #: includes/common/class-topic.php:78 1632 #: includes/common/class-topic.php:100 1610 1633 msgid "Pinned" 1611 1634 msgstr "" 1612 1635 1613 #: includes/common/class-topic.php: 2301614 #: includes/common/class-topic.php: 2521636 #: includes/common/class-topic.php:82 1637 #: includes/common/class-topic.php:104 1615 1638 msgid "Announcement" 1616 1639 msgstr "" 1617 1640 1618 #: includes/common/class-topic.php: 2341619 #: includes/common/class-topic.php: 2561641 #: includes/common/class-topic.php:86 1642 #: includes/common/class-topic.php:108 1620 1643 msgid "Global" 1621 1644 msgstr "" 1622 1645 1623 #: includes/common/class-topic.php: 2661646 #: includes/common/class-topic.php:118 1624 1647 #: blocks-src/fmwp-forum/src/index.js:48 1625 1648 #: blocks-src/fmwp-topics-list/src/index.js:101 … … 1629 1652 msgstr "" 1630 1653 1631 #: includes/common/class-topic.php: 2671654 #: includes/common/class-topic.php:119 1632 1655 #: blocks-src/fmwp-forum/src/index.js:49 1633 1656 #: blocks-src/fmwp-topics-list/src/index.js:102 … … 1637 1660 msgstr "" 1638 1661 1639 #: includes/common/class-topic.php:5 451662 #: includes/common/class-topic.php:534 1640 1663 msgid "Edit topic" 1641 1664 msgstr "" 1642 1665 1643 #: includes/common/class-topic.php:5 541666 #: includes/common/class-topic.php:543 1644 1667 msgid "Pin topic" 1645 1668 msgstr "" 1646 1669 1647 #: includes/common/class-topic.php:5 631670 #: includes/common/class-topic.php:552 1648 1671 msgid "Unpin topic" 1649 1672 msgstr "" 1650 1673 1651 #: includes/common/class-topic.php:5 721674 #: includes/common/class-topic.php:561 1652 1675 msgid "Lock topic" 1653 1676 msgstr "" 1654 1677 1655 #: includes/common/class-topic.php:5 811678 #: includes/common/class-topic.php:570 1656 1679 msgid "Unlock topic" 1657 1680 msgstr "" 1658 1681 1659 #: includes/common/class-topic.php:6 181682 #: includes/common/class-topic.php:607 1660 1683 msgid "Report topic" 1661 1684 msgstr "" 1662 1685 1663 #: includes/common/class-topic.php:6 251686 #: includes/common/class-topic.php:614 1664 1687 msgid "Un-report topic" 1665 1688 msgstr "" 1666 1689 1667 #: includes/common/class-topic.php:6 351690 #: includes/common/class-topic.php:624 1668 1691 msgid "Clear topic's reports" 1669 1692 msgstr "" 1670 1693 1671 #: includes/common/class-topic.php:6 511694 #: includes/common/class-topic.php:640 1672 1695 msgid "Restore topic" 1673 1696 msgstr "" 1674 1697 1675 #: includes/common/class-topic.php:6 601698 #: includes/common/class-topic.php:649 1676 1699 msgid "Remove topic" 1677 1700 msgstr "" 1678 1701 1679 #: includes/common/class-topic.php:11 521702 #: includes/common/class-topic.php:1141 1680 1703 #: templates/js/reply-row.php:120 1681 1704 #: templates/js/reply-row.php:135 … … 1685 1708 msgstr "" 1686 1709 1687 #: includes/common/class-topic.php:11 561710 #: includes/common/class-topic.php:1145 1688 1711 #: templates/topic.php:288 1689 1712 #: templates/topic.php:291 … … 1783 1806 #. translators: %s is a forum category name 1784 1807 #: includes/frontend/class-shortcodes.php:339 1808 #, php-format 1785 1809 msgid "Forum Category: %s" 1786 1810 msgstr "" … … 1788 1812 #. translators: %s is a topic tag name 1789 1813 #: includes/frontend/class-shortcodes.php:345 1814 #, php-format 1790 1815 msgid "Topic Tag: %s" 1791 1816 msgstr "" … … 1834 1859 #. translators: %1$d and %2$d are from-to migrated forums numbers. 1835 1860 #: modules/migration/class-init.php:431 1861 #, php-format 1836 1862 msgid "Forums from %1$d to %2$d are migrated" 1837 1863 msgstr "" … … 1839 1865 #. translators: %1$d and %2$d are from-to migrated topics numbers. 1840 1866 #: modules/migration/class-init.php:595 1867 #, php-format 1841 1868 msgid "Topics from %1$d to %2$d are migrated" 1842 1869 msgstr "" … … 1844 1871 #. translators: %1$d and %2$d are from-to migrated topic tabs numbers. 1845 1872 #: modules/migration/class-init.php:749 1873 #, php-format 1846 1874 msgid "Topic tags from %1$d to %2$d are migrated" 1847 1875 msgstr "" … … 1849 1877 #. translators: %1$d and %2$d are from-to migrated replies numbers. 1850 1878 #: modules/migration/class-init.php:817 1879 #, php-format 1851 1880 msgid "Replies from %1$d to %2$d are migrated" 1852 1881 msgstr "" … … 1912 1941 #. translators: %s is the class attribute 1913 1942 #: templates/forum.php:70 1943 #, php-format 1914 1944 msgid "Please <a href=\"#\" class=\"%s\" title=\"Login to view\" data-fmwp_popup_title=\"Login to view forum\">login</a> to view this forum" 1915 1945 msgstr "" … … 2089 2119 #: templates/profile/main.php:85 2090 2120 #: templates/user-card.php:66 2121 #, php-format 2091 2122 msgid "%s topic" 2092 2123 msgid_plural "%s topics" … … 2098 2129 #: templates/profile/main.php:92 2099 2130 #: templates/user-card.php:75 2131 #, php-format 2100 2132 msgid "%s reply" 2101 2133 msgid_plural "%s replies" … … 2106 2138 #: templates/profile/main-mobile.php:64 2107 2139 #: templates/profile/main.php:100 2140 #, php-format 2108 2141 msgid "Joined: %s" 2109 2142 msgstr "" … … 2137 2170 #. translators: %s is a topic title 2138 2171 #: templates/reply-popup.php:52 2172 #, php-format 2139 2173 msgid "Replying to: \"%s\"" 2140 2174 msgstr "" … … 2170 2204 #. translators: %s is the class attribute 2171 2205 #: templates/topic.php:124 2206 #, php-format 2172 2207 msgid "Please <a href=\"#\" class=\"%s\" title=\"Login to view\" data-fmwp_popup_title=\"Login to view topic\">login</a> to view this topic" 2173 2208 msgstr "" … … 2175 2210 #. translators: %s is a total replies count 2176 2211 #: templates/topic.php:160 2212 #, php-format 2177 2213 msgid "<span id=\"fmwp-replies-total\">%s</span> reply" 2178 2214 msgid_plural "<span id=\"fmwp-replies-total\">%s</span> replies" … … 2182 2218 #. translators: %s is a total topics count 2183 2219 #: templates/topic.php:170 2220 #, php-format 2184 2221 msgid "<span id=\"fmwp-views-total\">%s</span> view" 2185 2222 msgid_plural "<span id=\"fmwp-views-total\">%s</span> views" … … 2189 2226 #. translators: %s is the user display name. 2190 2227 #: templates/topic.php:221 2228 #, php-format 2191 2229 msgid "%s Profile" 2192 2230 msgstr "" -
forumwp/trunk/readme.txt
r3205107 r3306743 6 6 Requires PHP: 7.0 7 7 Requires at least: 5.5 8 Tested up to: 6. 79 Stable tag: 2.1. 38 Tested up to: 6.8 9 Stable tag: 2.1.4 10 10 License: GPLv3 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 61 61 62 62 == Changelog == 63 64 = 2.1.4: June 04, 2025 = 65 66 * Added: Action hooks 'fmwp_change_template_part', 'fmwp_before_user_topics_shortcode', 'fmwp_before_user_replies_shortcode' for 3rd-party integrations. 67 * Fixed: Loading textdomain for compatibility with WordPress 6.7 and 6.8. 68 69 * Templates required update: 70 - js/forum-row.php 63 71 64 72 = 2.1.3: December 09, 2024 = -
forumwp/trunk/templates/js/forum-row.php
r3205107 r3306743 5 5 * This template can be overridden by copying it to your-theme/forumwp/js/forum-row.php 6 6 * 7 * @version 2.1. 37 * @version 2.1.4 8 8 * 9 9 * @var array $fmwp_js_forum_row … … 17 17 ?> 18 18 19 <div class="fmwp-forum-row<# if ( <?php echo esc_js( $item ); ?>.is_locked ) { #> fmwp-forum-locked<# } #><# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #> fmwp-forum-trashed<# } #><# if ( Object.keys( <?php echo esc_js( $item ); ?>.dropdown_actions ).length === 0 ) { #> fmwp-forum-no-actions<# } #> " data-forum_id="{{{<?php echo esc_js( $item ); ?>.forum_id}}}" data-trashed="<# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #>1<# } #>">19 <div class="fmwp-forum-row<# if ( <?php echo esc_js( $item ); ?>.is_locked ) { #> fmwp-forum-locked<# } #><# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #> fmwp-forum-trashed<# } #><# if ( Object.keys( <?php echo esc_js( $item ); ?>.dropdown_actions ).length === 0 ) { #> fmwp-forum-no-actions<# } #> {{{<?php echo esc_js( $item ); ?>.extra_classes}}}" data-forum_id="{{{<?php echo esc_js( $item ); ?>.forum_id}}}" data-trashed="<# if ( <?php echo esc_js( $item ); ?>.is_trashed ) { #>1<# } #>"> 20 20 <div class="fmwp-forum-row-lines"> 21 21
Note: See TracChangeset
for help on using the changeset viewer.