Changeset 3345152
- Timestamp:
- 08/15/2025 12:54:12 PM (8 months ago)
- Location:
- social-post-flow
- Files:
-
- 20 edited
- 1 copied
-
tags/1.0.2 (copied) (copied from social-post-flow/trunk)
-
tags/1.0.2/assets/css/admin.css (modified) (1 diff)
-
tags/1.0.2/assets/js/min/statuses-min.js (modified) (1 diff)
-
tags/1.0.2/assets/js/statuses.js (modified) (4 diffs)
-
tags/1.0.2/assets/scss/admin.scss (modified) (1 diff)
-
tags/1.0.2/includes/class-social-post-flow-admin.php (modified) (1 diff)
-
tags/1.0.2/includes/class-social-post-flow-common.php (modified) (1 diff)
-
tags/1.0.2/includes/class-social-post-flow-publish.php (modified) (4 diffs)
-
tags/1.0.2/readme.txt (modified) (5 diffs)
-
tags/1.0.2/social-post-flow.php (modified) (2 diffs)
-
tags/1.0.2/views/settings-post-actionheader.php (modified) (1 diff)
-
trunk/assets/css/admin.css (modified) (1 diff)
-
trunk/assets/js/min/statuses-min.js (modified) (1 diff)
-
trunk/assets/js/statuses.js (modified) (4 diffs)
-
trunk/assets/scss/admin.scss (modified) (1 diff)
-
trunk/includes/class-social-post-flow-admin.php (modified) (1 diff)
-
trunk/includes/class-social-post-flow-common.php (modified) (1 diff)
-
trunk/includes/class-social-post-flow-publish.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/social-post-flow.php (modified) (2 diffs)
-
trunk/views/settings-post-actionheader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
social-post-flow/tags/1.0.2/assets/css/admin.css
r3336429 r3345152 1 body.wpzinc .wpzinc-option.progressbar .ui-progressbar{height:2em;text-align:left;overflow:hidden}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-overlay{background:green;height:100%;filter:alpha(opacity=25);opacity:.25}body.wpzinc .wpzinc-option.progressbar .ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}body.wpzinc .wpzinc-option.progressbar .ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}body.wpzinc .wpzinc-option.progressbar .ui-widget .ui-widget{font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget input,body.wpzinc .wpzinc-option.progressbar .ui-widget select,body.wpzinc .wpzinc-option.progressbar .ui-widget textarea,body.wpzinc .wpzinc-option.progressbar .ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget-content{border:1px solid #ddd;background:#eee;color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-content a{color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-header{border:1px solid #e78f08;background:green;color:#fff;font-weight:bold}body.wpzinc .wpzinc-option.progressbar .ui-widget-header a{color:#fff}li.toplevel_page_social-post-flow a div.wp-menu-image img{width:16px;height:16px}body.wpzinc.social-post-flow div.wrap h1.wp-heading-inline{background-image:url(../images/icons/social-post-flow-dark.svg);background-position:25px 50%;background-repeat:no-repeat;background-size:32px 32px}body.post-php #social-post-flow>.handlediv,body.post-new-php #social-post-flow>.handlediv{position:relative;z-index:2}body.post-php #social-post-flow>.hndle,body.post-new-php #social-post-flow>.hndle{background:#fff;border-top:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #social-post-flow div.inside,body.post-new-php #social-post-flow div.inside{margin:0;padding:0}body.post-php #social-post-flow div.inside #social-post-flow-override,body.post-new-php #social-post-flow div.inside #social-post-flow-override{display:none;margin-top:-1px;border-bottom:1px solid #dfdfdf}body.post-php #social-post-flow-image div.inside,body.post-new-php #social-post-flow-image div.inside{margin:0;padding:0}#social-post-flow-log div.inside{margin:0;padding:0}#social-post-flow-log div.inside div.wpzinc-option table.social-post-flow-log thead tr th{font-weight:700}table.social-post-flow-log tbody tr.success td,table.social-post-flow-log tbody tr.success th{background:#ddfede}table.social-post-flow-log tbody tr.success.alternate td,table.social-post-flow-log tbody tr.success.alternate th{background:#cafcbb}table.social-post-flow-log tbody tr.warning td,table.social-post-flow-log tbody tr.warning th{background:orange}table.social-post-flow-log tbody tr.warning.alternate td,table.social-post-flow-log tbody tr.warning.alternate th{background:#e6a62e}table.social-post-flow-log tbody tr.error td,table.social-post-flow-log tbody tr.error th{background:#ffcdcd}table.social-post-flow-log tbody tr.error.alternate td,table.social-post-flow-log tbody tr.error.alternate th{background:#fcbbbb}table.social-post-flow-log tbody tr.error a{text-decoration:none}body.block-editor-page #social-post-flow,body.block-editor-page #social-post-flow-log{margin-bottom:20px}#social-post-flow ul.wpzinc-nav-tabs li.image a{background-image:url(../../_modules/dashboard/feather/image.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.lock a{background-image:url(../../_modules/dashboard/feather/lock.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.arrow-right-circle a{background-image:url(../../_modules/dashboard/feather/arrow-right-circle.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.file-text a{background-image:url(../../_modules/dashboard/feather/file-text.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.users a{background-image:url(../../_modules/dashboard/feather/users.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.tag a{background-image:url(../../_modules/dashboard/feather/tag.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.default a{background-image:url(../../_modules/dashboard/feather/settings.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.facebook a{background-image:url(../../_modules/dashboard/feather/facebook.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.threads a{background-image:url(../../_modules/dashboard/feather/at-sign.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.instagram a{background-image:url(../../_modules/dashboard/feather/instagram.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.linkedin a{background-image:url(../../_modules/dashboard/feather/linkedin.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.x a{background-image:url(../../_modules/dashboard/feather/x.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.mastodon a{background-image:url(../../_modules/dashboard/feather/mastodon.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li a span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a span.dashicons.dashicons-yes{display:none}#social-post-flow ul.wpzinc-nav-tabs li a.enabled span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a.enabled span.dashicons.dashicons-yes{display:inline-block}#social-post-flow .wpzinc-media-library{width:150px}#social-post-flow div.postbox{width:100%}#social-post-flow div.postbox div.statuses tr.status.first td.actions a.delete-status{display:none}#social-post-flow div.postbox div.statuses tr.status td.count{width:20px}#social-post-flow div.postbox div.statuses tr.status td.actions{width:80px}#social-post-flow div.postbox div.statuses tr.status-form-container>td{padding:0}body.wpzinc .wrap #social-post-flow-status-form>.wpzinc-option{padding:20px 30px}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline{margin:5px 0 15px 0;border-top:1px solid #ccd0d4;border-right:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline p{margin:.5em 0}body.wpzinc .wrap #social-post-flow-status-form div.images{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form div.images select.right{margin:0 0 0 5px}body.wpzinc .wrap #social-post-flow-status-form div.tags{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form small.characters{display:inline-block;line-height:1}body.wpzinc .wrap #social-post-flow-status-form h3{margin:0}body.wpzinc .wrap #social-post-flow-status-form div.status select,body.wpzinc .wrap #social-post-flow-status-form div.status input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.status textarea,body.wpzinc .wrap #social-post-flow-status-form div.scheduling select,body.wpzinc .wrap #social-post-flow-status-form div.scheduling input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.scheduling textarea,body.wpzinc .wrap #social-post-flow-status-form div.pinterest select,body.wpzinc .wrap #social-post-flow-status-form div.pinterest input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.pinterest textarea,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness select,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness textarea,body.wpzinc .wrap #social-post-flow-status-form div.images select,body.wpzinc .wrap #social-post-flow-status-form div.images input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.images textarea,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image select,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.text-to-image textarea{margin:0 0 7px 0}body.wpzinc .wrap #social-post-flow-status-form div.schedule label,body.wpzinc .wrap #social-post-flow-status-form div.schedule .custom{display:inline-block;vertical-align:middle}body.wpzinc .wrap #social-post-flow-status-form div.schedule input[type=number]{width:50px}body.wpzinc .wrap #social-post-flow-status-form div.section{margin:15px 0 0 0;padding:15px 0 0 0;border-top:1px solid #dfdfdf}body.wpzinc .wrap #social-post-flow-status-form div.section table th.actions,body.wpzinc .wrap #social-post-flow-status-form div.section table td.actions{width:71px}table tr.hide-delete-button td .wpzinc-delete-table-row{display:none}1 body.wpzinc .wpzinc-option.progressbar .ui-progressbar{height:2em;text-align:left;overflow:hidden}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-overlay{background:green;height:100%;filter:alpha(opacity=25);opacity:.25}body.wpzinc .wpzinc-option.progressbar .ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}body.wpzinc .wpzinc-option.progressbar .ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}body.wpzinc .wpzinc-option.progressbar .ui-widget .ui-widget{font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget input,body.wpzinc .wpzinc-option.progressbar .ui-widget select,body.wpzinc .wpzinc-option.progressbar .ui-widget textarea,body.wpzinc .wpzinc-option.progressbar .ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget-content{border:1px solid #ddd;background:#eee;color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-content a{color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-header{border:1px solid #e78f08;background:green;color:#fff;font-weight:bold}body.wpzinc .wpzinc-option.progressbar .ui-widget-header a{color:#fff}li.toplevel_page_social-post-flow a div.wp-menu-image img{width:16px;height:16px}body.wpzinc.social-post-flow div.wrap h1.wp-heading-inline{background-image:url(../images/icons/social-post-flow-dark.svg);background-position:25px 50%;background-repeat:no-repeat;background-size:32px 32px}body.post-php #social-post-flow>.handlediv,body.post-new-php #social-post-flow>.handlediv{position:relative;z-index:2}body.post-php #social-post-flow>.hndle,body.post-new-php #social-post-flow>.hndle{background:#fff;border-top:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #social-post-flow div.inside,body.post-new-php #social-post-flow div.inside{margin:0;padding:0}body.post-php #social-post-flow div.inside #social-post-flow-override,body.post-new-php #social-post-flow div.inside #social-post-flow-override{display:none;margin-top:-1px;border-bottom:1px solid #dfdfdf}body.post-php #social-post-flow-image div.inside,body.post-new-php #social-post-flow-image div.inside{margin:0;padding:0}#social-post-flow-log div.inside{margin:0;padding:0}#social-post-flow-log div.inside div.wpzinc-option table.social-post-flow-log thead tr th{font-weight:700}table.social-post-flow-log tbody tr.success td,table.social-post-flow-log tbody tr.success th{background:#ddfede}table.social-post-flow-log tbody tr.success.alternate td,table.social-post-flow-log tbody tr.success.alternate th{background:#cafcbb}table.social-post-flow-log tbody tr.warning td,table.social-post-flow-log tbody tr.warning th{background:orange}table.social-post-flow-log tbody tr.warning.alternate td,table.social-post-flow-log tbody tr.warning.alternate th{background:#e6a62e}table.social-post-flow-log tbody tr.error td,table.social-post-flow-log tbody tr.error th{background:#ffcdcd}table.social-post-flow-log tbody tr.error.alternate td,table.social-post-flow-log tbody tr.error.alternate th{background:#fcbbbb}table.social-post-flow-log tbody tr.error a{text-decoration:none}body.block-editor-page #social-post-flow,body.block-editor-page #social-post-flow-log{margin-bottom:20px}#social-post-flow ul.wpzinc-nav-tabs li.image a{background-image:url(../../_modules/dashboard/feather/image.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.lock a{background-image:url(../../_modules/dashboard/feather/lock.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.arrow-right-circle a{background-image:url(../../_modules/dashboard/feather/arrow-right-circle.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.file-text a{background-image:url(../../_modules/dashboard/feather/file-text.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.users a{background-image:url(../../_modules/dashboard/feather/users.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.tag a{background-image:url(../../_modules/dashboard/feather/tag.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.default a{background-image:url(../../_modules/dashboard/feather/settings.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.facebook a{background-image:url(../../_modules/dashboard/feather/facebook.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.threads a{background-image:url(../../_modules/dashboard/feather/at-sign.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.instagram a{background-image:url(../../_modules/dashboard/feather/instagram.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.linkedin a{background-image:url(../../_modules/dashboard/feather/linkedin.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.x a{background-image:url(../../_modules/dashboard/feather/x.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.mastodon a{background-image:url(../../_modules/dashboard/feather/mastodon.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.pinterest a{background-image:url(../../_modules/dashboard/feather/pinterest.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li a span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a span.dashicons.dashicons-yes{display:none}#social-post-flow ul.wpzinc-nav-tabs li a.enabled span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a.enabled span.dashicons.dashicons-yes{display:inline-block}#social-post-flow .wpzinc-media-library{width:150px}#social-post-flow div.postbox{width:100%}#social-post-flow div.postbox div.statuses tr.status.first td.actions a.delete-status{display:none}#social-post-flow div.postbox div.statuses tr.status td.count{width:20px}#social-post-flow div.postbox div.statuses tr.status td.actions{width:80px}#social-post-flow div.postbox div.statuses tr.status-form-container>td{padding:0}body.wpzinc .wrap #social-post-flow-status-form>.wpzinc-option{padding:20px 30px}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline{margin:5px 0 15px 0;border-top:1px solid #ccd0d4;border-right:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline p{margin:.5em 0}body.wpzinc .wrap #social-post-flow-status-form div.images{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form div.images select.right{margin:0 0 0 5px}body.wpzinc .wrap #social-post-flow-status-form div.tags{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form small.characters{display:inline-block;line-height:1}body.wpzinc .wrap #social-post-flow-status-form h3{margin:0}body.wpzinc .wrap #social-post-flow-status-form div.status select,body.wpzinc .wrap #social-post-flow-status-form div.status input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.status textarea,body.wpzinc .wrap #social-post-flow-status-form div.scheduling select,body.wpzinc .wrap #social-post-flow-status-form div.scheduling input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.scheduling textarea,body.wpzinc .wrap #social-post-flow-status-form div.pinterest select,body.wpzinc .wrap #social-post-flow-status-form div.pinterest input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.pinterest textarea,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness select,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness textarea,body.wpzinc .wrap #social-post-flow-status-form div.images select,body.wpzinc .wrap #social-post-flow-status-form div.images input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.images textarea,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image select,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.text-to-image textarea{margin:0 0 7px 0}body.wpzinc .wrap #social-post-flow-status-form div.schedule label,body.wpzinc .wrap #social-post-flow-status-form div.schedule .custom{display:inline-block;vertical-align:middle}body.wpzinc .wrap #social-post-flow-status-form div.schedule input[type=number]{width:50px}body.wpzinc .wrap #social-post-flow-status-form div.section{margin:15px 0 0 0;padding:15px 0 0 0;border-top:1px solid #dfdfdf}body.wpzinc .wrap #social-post-flow-status-form div.section table th.actions,body.wpzinc .wrap #social-post-flow-status-form div.section table td.actions{width:71px}table tr.hide-delete-button td .wpzinc-delete-table-row{display:none} -
social-post-flow/tags/1.0.2/assets/js/min/statuses-min.js
r3336429 r3345152 1 function socialPostFlowReinitAutosize(){var $;0!=($=jQuery)(".wpzinc-autosize-js",$(social_post_flow.status_form)).length&&(autosize.destroy($(".wpzinc-autosize-js")),autosize($(".wpzinc-autosize-js")))}function socialPostFlowReinitAutocomplete(){wp_zinc_autocomplete_destroy(),wp_zinc_autocomplete_setup(),wp_zinc_autocomplete_initialize()}function socialPostFlowInitTags(){var $;0!=($=jQuery)("select.tags",$(social_post_flow.status_form)).length&&$("select.tags",$(social_post_flow.status_form)).each((function(){$(this).on("change.social-post-flow",(function(t){var s=$(this).val(),o=$(this).attr("data-textarea"),a=$("option:selected",$(this)),e=$(this).closest("#social-post-flow-status-form"),i=$(o,$(e)),l=$(i).val();if(void 0!==$(a).data("question")){var _=prompt($(a).data("question"),$(a).data("default-value"));0==_.length&&(_=$(a).data("default-value")),s=s.replace($(a).data("replace"),_)}var c=$(i)[0].selectionStart;c>0&&(" "!=l.substring(c-1,c)&&(s=" "+s)," "!=l.substring(c,c+1)&&(s+=" ")),s.trim().length>0&&$(i).val(l.substring(0,c)+s+l.substring(c)).trigger("change"),$(this).val("")}))}))}function socialPostFlowInitSelectize(t,s,o,a){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){var t=$(this).attr("id"),e=!1,l=!1,_={},c=[];s&&o&&(e=$('div.statuses[data-profile-id="'+s+'"][data-action="'+o+'"]'),l=$('tr[data-status-index="'+a+'"]',$(e)),c=void 0!==(_=JSON.parse($(l).attr("data-labels")))[t]?_[t]:[]),$(this).selectize({valueField:"id",labelField:"text",searchField:"text",plugins:["drag_drop","remove_button"],options:c,delimiter:",",persist:!1,create:!1,load:function(t,s){if(!t.length||t.length<3)return s();var o=this.$input.data("action"),a=this.$input.data("taxonomy"),e=this.$input.data("nonce-key");$.ajax({url:ajaxurl,data:{action:o,taxonomy:a,nonce:social_post_flow[e],q:t,page:10},error:function(t,o,a){s()},success:function(t){s(t.data)}})},onChange:function(s){if(l){var o=[],a=this.items.length;for(i=0;i<a;i++)o.push({id:this.options[this.items[i]].id,text:this.options[this.items[i]].text});var e=JSON.parse($(l).attr("data-labels"));e[t]=o,$(l).data("labels",JSON.stringify(e)).attr("data-labels",JSON.stringify(e))}}})}))}function socialPostFlowDestroySelectize(t){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){this.selectize&&this.selectize.destroy()}))}function socialPostFlowReindexStatuses(t){var $;($=jQuery)("tr.sortable",$(t)).each((function(t){$(this).data("status-index",t).attr("data-status-index",t),$("td.count ",$(this)).html("#"+(t+1)),0==t?$(this).addClass("first"):$(this).removeClass("first")}))}function socialPostFlowUpdateScheduleOptions(t){!function($){if(0!=$("select.schedule",$(social_post_flow.status_form)).length)switch($("select.schedule",$(social_post_flow.status_form)).val()){case"custom":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_relative":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).show(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_field":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).show(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_EventStartDate":case"_EventEndDate":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).show(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_event_start_date":case"_event_end_date":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).show(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"mec_start_datetime":case"mec_end_datetime":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).show(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"specific":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).show();break;default:$("div.schedule",$(social_post_flow.status_form)).hide(),$("span.schedule",$(social_post_flow.status_form)).hide(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide()}}(jQuery)}function socialPostFlowUpdateImageOptions(){!function($){if(0==$("select.image",$(social_post_flow.status_form)).length)return;let t=$("select.image",$(social_post_flow.status_form)).val();$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).hide(),$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).each((function(){-1!==$(this).data("conditional-value").toString().split(",").indexOf(t)&&$(this).show()}))}(jQuery)}function socialPostFlowUpdatePostTypeOptions(t){!function($){switch(t.provider){case"instagram":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1) ;break;case"tiktok":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0);break;default:$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0)}}(jQuery)}function socialPostFlowUpdateStatusSections(){!function($){switch($("select.post_type",$(social_post_flow.status_form)).val()){case"text":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).hide();break;case"link":$(".link",$(social_post_flow.status_form)).show(),$(".images",$(social_post_flow.status_form)).hide();break;case"image":case"story":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).show()}}(jQuery)}function socialPostFlowAddStatus(t,s){var $,o,a,e;$=jQuery,o=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),a=$("tbody",$(o)),e=$("tr.status",$(a)).last(),$(a).first().after($(e).clone()),socialPostFlowReindexStatuses(o),socialPostFlowUpdateStatuses()}function socialPostFlowEditStatus(t,s,o,a,e){socialPostFlowDestroySelectize(social_post_flow.status_form),socialPostFlowPopulateStatusForm(t,s,o,a,e),socialPostFlowUpdatePostTypeOptions(s),socialPostFlowUpdateScheduleOptions(o),socialPostFlowUpdateImageOptions(),socialPostFlowUpdateStatusSections(),socialPostFlowDisplayStatusForm(t,o,a),socialPostFlowReinitAutosize(),socialPostFlowReinitAutocomplete(),socialPostFlowInitSelectize(social_post_flow.status_form,t,o,a)}function socialPostFlowDeleteStatus(t,s,o){!function($){if(confirm(social_post_flow.delete_status_message)){var a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),e=$('tr[data-status-index="'+o+'"]',$(a));$(e).remove(),socialPostFlowReindexStatuses(a),socialPostFlowUpdateStatuses()}}(jQuery)}function socialPostFlowUpdateStatus(t,s,o){var $,a,e,i,l;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=-1,i=-1,(l=JSON.parse($(a).attr("data-status"))).conditions={},l.custom_fields={},l.authors_custom_fields={},l.terms={},$.each($(social_post_flow.status_form).find("input, select, textarea").serializeArray(),(function(t,s){switch(s.name=s.name.replace(social_post_flow.plugin_name+"_",""),s.name){case"custom_fields[key][]":if(e++,""==s.value)break;l.custom_fields[e]={},l.custom_fields[e].key=s.value;break;case"custom_fields[compare][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].compare=s.value;break;case"custom_fields[value][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].value=s.value;break;case"authors":case"authors_roles":if("false"==s.value)break;l[s.name]=s.value.split(",");break;case"authors_custom_fields[key][]":if(i++,""==s.value)break;l.authors_custom_fields[i]={},l.authors_custom_fields[i].key=s.value;break;case"authors_custom_fields[compare][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].compare=s.value;break;case"authors_custom_fields[value][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].value=s.value;break;default:var o=s.name.match(/conditions\[([^)]+)\]/);if(o){l.conditions[o[1]]=s.value;break}var a=s.name.match(/terms\[([^)]+)\]/);if(a){l.terms[a[1]]=s.value.split(",");break}"true"==s.value&&(s.value=!0),"false"==s.value&&(s.value=!1);var _=s.name.match(/(.*?)\[(.*?)\]/);null!=_?l[_[1]][_[2]]=s.value:l[s.name]=s.value}})),$(a).data("status",JSON.stringify(l)).attr("data-status",JSON.stringify(l)),socialPostFlowUpdateStatuses(),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.get_status_row_action,nonce:social_post_flow.get_status_row_nonce,post_type:social_post_flow.post_type,post_action:s,status:JSON.stringify(l)},error:function(t,s,o){alert("socialPostFlowUpdateStatus(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||alert(t.data),$("td.post_type",$(a)).text(t.data.post_type),$("td.text",$(a)).text(t.data.text),$("td.schedule",$(a)).text(t.data.schedule)}})}function socialPostFlowPopulateStatusForm(t,s,o,a,e){var $;($=jQuery)("div.conditional",$(social_post_flow.status_form)).addClass("hidden"),$("input, select, textarea",$(social_post_flow.status_form)).each((function(){var t=$(this).attr("name");if($(this).prop("nodeName").toLowerCase(),void 0!==t)switch(t=t.replace(social_post_flow.plugin_name+"_","")){case"text_to_image_background_image":void 0!==e[t]?$(this).val(e[t]):$(this).val("");break;case"text_to_image_background_image_url":void 0!==e.text_to_image_background_image_url?($(this).val(e[t]),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",e.text_to_image_background_image_url)):($(this).val(""),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",""));break;case"custom_fields[key][]":for(let t in e.custom_fields)$('input[name="'+social_post_flow.plugin_name+'_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].value),wpzinc_table_row_add("custom-field",$(this).closest("table"));break;case"custom_fields[compare][]":case"custom_fields[value][]":case"authors_custom_fields[compare][]":case"authors_custom_fields[value][]":break;case"authors":case"authors_roles":if(!e[t])break;$('input[name="'+$(this).attr("name")+'"]').val(e[t].join(","));break;case"authors_compare":case"authors_roles_compare":if(!e[t])break;$('select[name="'+$(this).attr("name")+'"]').val(e[t]);break;case"authors_custom_fields[key][]":for(let t in e.authors_custom_fields)$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_authors_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].value),wpzinc_table_row_add("authors-custom-field",$(this).closest("table"));break;default:var s=t.match(/conditions\[([^)]+)\]/);if(s){void 0!==e.conditions[s[1]]&&$(this).val(e.conditions[s[1]]);break}var o=t.match(/terms\[([^)]+)\]/);if(o){void 0!==e.terms[o[1]]&&$(this).val(e.terms[o[1]].join(","));break}var a=t.match(/(.*?)\[(.*?)\]/);if(null!=a){$(this).val(e[a[1]][a[2]]);break}$(this).val(e[t])}})),$(social_post_flow.status_form).data("profile-id",t).attr("data-profile-id",t),$(social_post_flow.status_form).data("action",o).attr("data-action",o),$(social_post_flow.status_form).data("status-index",a).attr("data-status-index",a),$("input, select",$(social_post_flow.status_form)).conditional()}function socialPostFlowDisplayStatusForm(t,s,o){var $,a,e;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr.status-form-container'),$("td",e).append($(social_post_flow.status_form).removeClass("hidden")),$(a).after($(e).removeClass("hidden"))}function socialPostFlowSaveAndHideStatusForm(){var $;($=jQuery)("div.statuses div.social-post-flow-status-form").length>0&&socialPostFlowUpdateStatus($("div.statuses tr.status-form-container #social-post-flow-status-form").data("profile-id"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("action"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("status-index")),$(social_post_flow.status_form).data("profile-id","").attr("data-profile-id",""),$(social_post_flow.status_form).data("action","").attr("data-action",""),$(social_post_flow.status_form).data("status-index","").attr("data-status-index",""),$(social_post_flow.status_form_container).append($(social_post_flow.status_form))}function socialPostFlowClearStatusForm(){var $;($=jQuery)("input, select, textarea",$(social_post_flow.status_form)).each((function(){$(this).val("")})),$("tr.custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()})),$("tr.authors-custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()}))}function socialPostFlowGetStatuses(){var $,t={};return($=jQuery)("li.wpzinc-nav-tab a").each((function(){var s=$(this).attr("href").split("#profile-").pop();"default"==s?t[s]={}:(t[s]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+'][enabled]"]').is(":checked")},$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').length>0?t[s].override=$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').is(":checked"):t[s].override="1"==$('input[type="hidden"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').val()),$("li.wpzinc-nav-tab-horizontal a","#profile-"+s).each((function(){var o=$(this).attr("href").split("#profile-"+s+"-").pop();t[s][o]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+"]["+o+'][enabled]"]').is(":checked"),status:[]},$("tr.status","#profile-"+s+"-"+o).each((function(){t[s][o].status.push(JSON.parse($(this).attr("data-status")))}))}))})),t}function socialPostFlowUpdateStatuses(){var t,$;return $=jQuery,t=socialPostFlowGetStatuses(),$('input[name="'+social_post_flow.plugin_name+'[statuses]"][type="hidden"]').val(JSON.stringify(t)),t}function socialPostFlowSaveStatuses(t,s){var o,$;$=jQuery,o=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_type:t,statuses:JSON.stringify(o)},error:function(t,s,o){wpzinc_modal_show_error_message_and_exit("socialPostFlowSaveStatuses(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),s.length&&(t.data.post_type_enabled?($(s).addClass("enabled"),$(".notice-warning").hide()):($(s).removeClass("enabled"),$(".notice-warning").show())),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}function socialPostFlowSavePostStatuses(t,s,o,a){var e,$;$=jQuery,e=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_id:t,override:s,featured_image:o,additional_images:a,statuses:JSON.stringify(e)},error:function(t,s,o){wpzinc_modal_close()},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}var socialPostFlowCharacterCounting=!1;function socialPostFlowCharacterCount(t){var $;$=jQuery,socialPostFlowCharacterCounting||(socialPostFlowCharacterCounting=!0,$.post(social_post_flow.ajax,{action:social_post_flow.character_count_action,post_id:social_post_flow.post_id,status:$(t).val(),nonce:social_post_flow.character_count_nonce},(function(s){$("span.character-count",$(t).parent()).text(s.data.character_count),setTimeout((function(){socialPostFlowCharacterCounting=!1}),3e3)})))}function socialPostFlowEnableNotSavedPrompt(){social_post_flow.prompt_unsaved_changes&&(window.onbeforeunload=function(){return!0})}function socialPostFlowDisableNotSavedPrompt(){window.onbeforeunload=null}jQuery(document).ready((function($){socialPostFlowInitTags(),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.post_type",(function(t){socialPostFlowUpdateStatusSections()})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.schedule",(function(t){socialPostFlowUpdateScheduleOptions($(this).closest("div.statuses").data("action"))})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.image",(function(t){socialPostFlowUpdateImageOptions()})),$("input.enable",$("#profiles-container")).on("change",(function(t){var s=$(this).data("tab");$(this).prop("checked")?$('a[href="#'+s+'"]').addClass("enabled"):$('a[href="#'+s+'"]').removeClass("enabled"),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$("input.override",$("#profiles-container")).on("change",(function(t){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$(".wpzinc-js-tabs").on("click",(function(){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm()})),$("#profiles-container").on("click","a.button.add-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowAddStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.edit-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowEditStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("profile"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index"),JSON.parse($(this).closest("tr").attr("data-status"))),socialPostFlowEnableNotSavedPrompt()})),$(social_post_flow.status_form).on("change","input, select, textarea",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("body").on("wpzinc-media-library-attachment-added",(function(t){void 0!==$(social_post_flow.status_form).data("profile-id")&&(socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt())})),$("body").on("wpzinc-table-row-delete",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.delete-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowDeleteStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container div.statuses").length>0&&$("#profiles-container div.statuses").sortable({containment:"parent",items:".sortable",stop:function(t,s){var o=$(s.item),a=$(o).closest("div.statuses");socialPostFlowReindexStatuses($(a)),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()}}),$("#profiles-container div.statuses").bind("click.sortable mousedown.sortable",(function(t){t.target.focus()})),social_post_flow.post_id>0&&$("textarea.text",$(social_post_flow.status_form)).on("keyup change",(function(t){socialPostFlowCharacterCount(this)})),$("form#social-post-flow").on("submit",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses(),socialPostFlowSaveStatuses(social_post_flow.post_type,$('h2.nav-tab-wrapper a[data-post-type="'+social_post_flow.post_type+'"]'))})),$("button."+social_post_flow.plugin_name+"-save-post-statuses").on("click",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses();var s=[];for(i=0;i<=10;i++)$('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').length&&s.push($('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').val());socialPostFlowSavePostStatuses(social_post_flow.post_id,$('select[name="'+social_post_flow.plugin_name+'[override]"]').val(),$('input[name="'+social_post_flow.plugin_name+'[featured_image]"]').val(),s)}))}));1 function socialPostFlowReinitAutosize(){var $;0!=($=jQuery)(".wpzinc-autosize-js",$(social_post_flow.status_form)).length&&(autosize.destroy($(".wpzinc-autosize-js")),autosize($(".wpzinc-autosize-js")))}function socialPostFlowReinitAutocomplete(){wp_zinc_autocomplete_destroy(),wp_zinc_autocomplete_setup(),wp_zinc_autocomplete_initialize()}function socialPostFlowInitTags(){var $;0!=($=jQuery)("select.tags",$(social_post_flow.status_form)).length&&$("select.tags",$(social_post_flow.status_form)).each((function(){$(this).on("change.social-post-flow",(function(t){var s=$(this).val(),o=$(this).attr("data-textarea"),a=$("option:selected",$(this)),e=$(this).closest("#social-post-flow-status-form"),i=$(o,$(e)),l=$(i).val();if(void 0!==$(a).data("question")){var _=prompt($(a).data("question"),$(a).data("default-value"));0==_.length&&(_=$(a).data("default-value")),s=s.replace($(a).data("replace"),_)}var c=$(i)[0].selectionStart;c>0&&(" "!=l.substring(c-1,c)&&(s=" "+s)," "!=l.substring(c,c+1)&&(s+=" ")),s.trim().length>0&&$(i).val(l.substring(0,c)+s+l.substring(c)).trigger("change"),$(this).val("")}))}))}function socialPostFlowInitSelectize(t,s,o,a){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){var t=$(this).attr("id"),e=!1,l=!1,_={},c=[];s&&o&&(e=$('div.statuses[data-profile-id="'+s+'"][data-action="'+o+'"]'),l=$('tr[data-status-index="'+a+'"]',$(e)),c=void 0!==(_=JSON.parse($(l).attr("data-labels")))[t]?_[t]:[]),$(this).selectize({valueField:"id",labelField:"text",searchField:"text",plugins:["drag_drop","remove_button"],options:c,delimiter:",",persist:!1,create:!1,load:function(t,s){if(!t.length||t.length<3)return s();var o=this.$input.data("action"),a=this.$input.data("taxonomy"),e=this.$input.data("nonce-key");$.ajax({url:ajaxurl,data:{action:o,taxonomy:a,nonce:social_post_flow[e],q:t,page:10},error:function(t,o,a){s()},success:function(t){s(t.data)}})},onChange:function(s){if(l){var o=[],a=this.items.length;for(i=0;i<a;i++)o.push({id:this.options[this.items[i]].id,text:this.options[this.items[i]].text});var e=JSON.parse($(l).attr("data-labels"));e[t]=o,$(l).data("labels",JSON.stringify(e)).attr("data-labels",JSON.stringify(e))}}})}))}function socialPostFlowDestroySelectize(t){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){this.selectize&&this.selectize.destroy()}))}function socialPostFlowReindexStatuses(t){var $;($=jQuery)("tr.sortable",$(t)).each((function(t){$(this).data("status-index",t).attr("data-status-index",t),$("td.count ",$(this)).html("#"+(t+1)),0==t?$(this).addClass("first"):$(this).removeClass("first")}))}function socialPostFlowUpdateScheduleOptions(t){!function($){if(0!=$("select.schedule",$(social_post_flow.status_form)).length)switch($("select.schedule",$(social_post_flow.status_form)).val()){case"custom":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_relative":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).show(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_field":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).show(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_EventStartDate":case"_EventEndDate":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).show(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_event_start_date":case"_event_end_date":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).show(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"mec_start_datetime":case"mec_end_datetime":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).show(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"specific":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).show();break;default:$("div.schedule",$(social_post_flow.status_form)).hide(),$("span.schedule",$(social_post_flow.status_form)).hide(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide()}}(jQuery)}function socialPostFlowUpdateImageOptions(){!function($){if(0==$("select.image",$(social_post_flow.status_form)).length)return;let t=$("select.image",$(social_post_flow.status_form)).val();$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).hide(),$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).each((function(){-1!==$(this).data("conditional-value").toString().split(",").indexOf(t)&&$(this).show()}))}(jQuery)}function socialPostFlowUpdatePostTypeOptions(t){!function($){switch(t.provider){case"instagram":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0);break;case"pinterest":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1);break;case"tiktok":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0);break;default:$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0)}}(jQuery)}function socialPostFlowUpdateStatusSections(){!function($){switch($("select.post_type",$(social_post_flow.status_form)).val()){case"text":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).hide();break;case"link":$(".link",$(social_post_flow.status_form)).show(),$(".images",$(social_post_flow.status_form)).hide();break;case"image":case"story":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).show();break;case"pin":$(".link",$(social_post_flow.status_form)).show(),$(".images",$(social_post_flow.status_form)).show()}}(jQuery)}function socialPostFlowAddStatus(t,s){var $,o,a,e;$=jQuery,o=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),a=$("tbody",$(o)),e=$("tr.status",$(a)).last(),$(a).first().after($(e).clone()),socialPostFlowReindexStatuses(o),socialPostFlowUpdateStatuses()}function socialPostFlowEditStatus(t,s,o,a,e){socialPostFlowDestroySelectize(social_post_flow.status_form),socialPostFlowPopulateStatusForm(t,s,o,a,e),socialPostFlowUpdatePostTypeOptions(s),socialPostFlowUpdateScheduleOptions(o),socialPostFlowUpdateImageOptions(),socialPostFlowUpdateStatusSections(),socialPostFlowDisplayStatusForm(t,o,a),socialPostFlowReinitAutosize(),socialPostFlowReinitAutocomplete(),socialPostFlowInitSelectize(social_post_flow.status_form,t,o,a)}function socialPostFlowDeleteStatus(t,s,o){!function($){if(confirm(social_post_flow.delete_status_message)){var a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),e=$('tr[data-status-index="'+o+'"]',$(a));$(e).remove(),socialPostFlowReindexStatuses(a),socialPostFlowUpdateStatuses()}}(jQuery)}function socialPostFlowUpdateStatus(t,s,o){var $,a,e,i,l;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=-1,i=-1,(l=JSON.parse($(a).attr("data-status"))).conditions={},l.custom_fields={},l.authors_custom_fields={},l.terms={},$.each($(social_post_flow.status_form).find("input, select, textarea").serializeArray(),(function(t,s){switch(s.name=s.name.replace(social_post_flow.plugin_name+"_",""),s.name){case"custom_fields[key][]":if(e++,""==s.value)break;l.custom_fields[e]={},l.custom_fields[e].key=s.value;break;case"custom_fields[compare][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].compare=s.value;break;case"custom_fields[value][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].value=s.value;break;case"authors":case"authors_roles":if("false"==s.value)break;l[s.name]=s.value.split(",");break;case"authors_custom_fields[key][]":if(i++,""==s.value)break;l.authors_custom_fields[i]={},l.authors_custom_fields[i].key=s.value;break;case"authors_custom_fields[compare][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].compare=s.value;break;case"authors_custom_fields[value][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].value=s.value;break;default:var o=s.name.match(/conditions\[([^)]+)\]/);if(o){l.conditions[o[1]]=s.value;break}var a=s.name.match(/terms\[([^)]+)\]/);if(a){l.terms[a[1]]=s.value.split(",");break}"true"==s.value&&(s.value=!0),"false"==s.value&&(s.value=!1);var _=s.name.match(/(.*?)\[(.*?)\]/);null!=_?l[_[1]][_[2]]=s.value:l[s.name]=s.value}})),$(a).data("status",JSON.stringify(l)).attr("data-status",JSON.stringify(l)),socialPostFlowUpdateStatuses(),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.get_status_row_action,nonce:social_post_flow.get_status_row_nonce,post_type:social_post_flow.post_type,post_action:s,status:JSON.stringify(l)},error:function(t,s,o){alert("socialPostFlowUpdateStatus(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||alert(t.data),$("td.post_type",$(a)).text(t.data.post_type),$("td.text",$(a)).text(t.data.text),$("td.schedule",$(a)).text(t.data.schedule)}})}function socialPostFlowPopulateStatusForm(t,s,o,a,e){var $;($=jQuery)("div.conditional",$(social_post_flow.status_form)).addClass("hidden"),$("input, select, textarea",$(social_post_flow.status_form)).each((function(){var t=$(this).attr("name");if($(this).prop("nodeName").toLowerCase(),void 0!==t)switch(t=t.replace(social_post_flow.plugin_name+"_","")){case"text_to_image_background_image":void 0!==e[t]?$(this).val(e[t]):$(this).val("");break;case"text_to_image_background_image_url":void 0!==e.text_to_image_background_image_url?($(this).val(e[t]),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",e.text_to_image_background_image_url)):($(this).val(""),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",""));break;case"custom_fields[key][]":for(let t in e.custom_fields)$('input[name="'+social_post_flow.plugin_name+'_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].value),wpzinc_table_row_add("custom-field",$(this).closest("table"));break;case"custom_fields[compare][]":case"custom_fields[value][]":case"authors_custom_fields[compare][]":case"authors_custom_fields[value][]":break;case"authors":case"authors_roles":if(!e[t])break;$('input[name="'+$(this).attr("name")+'"]').val(e[t].join(","));break;case"authors_compare":case"authors_roles_compare":if(!e[t])break;$('select[name="'+$(this).attr("name")+'"]').val(e[t]);break;case"authors_custom_fields[key][]":for(let t in e.authors_custom_fields)$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_authors_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].value),wpzinc_table_row_add("authors-custom-field",$(this).closest("table"));break;default:var s=t.match(/conditions\[([^)]+)\]/);if(s){void 0!==e.conditions[s[1]]&&$(this).val(e.conditions[s[1]]);break}var o=t.match(/terms\[([^)]+)\]/);if(o){void 0!==e.terms[o[1]]&&$(this).val(e.terms[o[1]].join(","));break}var a=t.match(/(.*?)\[(.*?)\]/);if(null!=a){$(this).val(e[a[1]][a[2]]);break}$(this).val(e[t])}})),$(social_post_flow.status_form).data("profile-id",t).attr("data-profile-id",t),$(social_post_flow.status_form).data("action",o).attr("data-action",o),$(social_post_flow.status_form).data("status-index",a).attr("data-status-index",a),$("input, select",$(social_post_flow.status_form)).conditional()}function socialPostFlowDisplayStatusForm(t,s,o){var $,a,e;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr.status-form-container'),$("td",e).append($(social_post_flow.status_form).removeClass("hidden")),$(a).after($(e).removeClass("hidden"))}function socialPostFlowSaveAndHideStatusForm(){var $;($=jQuery)("div.statuses div.social-post-flow-status-form").length>0&&socialPostFlowUpdateStatus($("div.statuses tr.status-form-container #social-post-flow-status-form").data("profile-id"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("action"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("status-index")),$(social_post_flow.status_form).data("profile-id","").attr("data-profile-id",""),$(social_post_flow.status_form).data("action","").attr("data-action",""),$(social_post_flow.status_form).data("status-index","").attr("data-status-index",""),$(social_post_flow.status_form_container).append($(social_post_flow.status_form))}function socialPostFlowClearStatusForm(){var $;($=jQuery)("input, select, textarea",$(social_post_flow.status_form)).each((function(){$(this).val("")})),$("tr.custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()})),$("tr.authors-custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()}))}function socialPostFlowGetStatuses(){var $,t={};return($=jQuery)("li.wpzinc-nav-tab a").each((function(){var s=$(this).attr("href").split("#profile-").pop();"default"==s?t[s]={}:(t[s]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+'][enabled]"]').is(":checked")},$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').length>0?t[s].override=$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').is(":checked"):t[s].override="1"==$('input[type="hidden"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').val()),$("li.wpzinc-nav-tab-horizontal a","#profile-"+s).each((function(){var o=$(this).attr("href").split("#profile-"+s+"-").pop();t[s][o]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+"]["+o+'][enabled]"]').is(":checked"),status:[]},$("tr.status","#profile-"+s+"-"+o).each((function(){t[s][o].status.push(JSON.parse($(this).attr("data-status")))}))}))})),t}function socialPostFlowUpdateStatuses(){var t,$;return $=jQuery,t=socialPostFlowGetStatuses(),$('input[name="'+social_post_flow.plugin_name+'[statuses]"][type="hidden"]').val(JSON.stringify(t)),t}function socialPostFlowSaveStatuses(t,s){var o,$;$=jQuery,o=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_type:t,statuses:JSON.stringify(o)},error:function(t,s,o){wpzinc_modal_show_error_message_and_exit("socialPostFlowSaveStatuses(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),s.length&&(t.data.post_type_enabled?($(s).addClass("enabled"),$(".notice-warning").hide()):($(s).removeClass("enabled"),$(".notice-warning").show())),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}function socialPostFlowSavePostStatuses(t,s,o,a){var e,$;$=jQuery,e=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_id:t,override:s,featured_image:o,additional_images:a,statuses:JSON.stringify(e)},error:function(t,s,o){wpzinc_modal_close()},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}var socialPostFlowCharacterCounting=!1;function socialPostFlowCharacterCount(t){var $;$=jQuery,socialPostFlowCharacterCounting||(socialPostFlowCharacterCounting=!0,$.post(social_post_flow.ajax,{action:social_post_flow.character_count_action,post_id:social_post_flow.post_id,status:$(t).val(),nonce:social_post_flow.character_count_nonce},(function(s){$("span.character-count",$(t).parent()).text(s.data.character_count),setTimeout((function(){socialPostFlowCharacterCounting=!1}),3e3)})))}function socialPostFlowEnableNotSavedPrompt(){social_post_flow.prompt_unsaved_changes&&(window.onbeforeunload=function(){return!0})}function socialPostFlowDisableNotSavedPrompt(){window.onbeforeunload=null}jQuery(document).ready((function($){socialPostFlowInitTags(),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.post_type",(function(t){socialPostFlowUpdateStatusSections()})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.schedule",(function(t){socialPostFlowUpdateScheduleOptions($(this).closest("div.statuses").data("action"))})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.image",(function(t){socialPostFlowUpdateImageOptions()})),$("input.enable",$("#profiles-container")).on("change",(function(t){var s=$(this).data("tab");$(this).prop("checked")?$('a[href="#'+s+'"]').addClass("enabled"):$('a[href="#'+s+'"]').removeClass("enabled"),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$("input.override",$("#profiles-container")).on("change",(function(t){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$(".wpzinc-js-tabs").on("click",(function(){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm()})),$("#profiles-container").on("click","a.button.add-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowAddStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.edit-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowEditStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("profile"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index"),JSON.parse($(this).closest("tr").attr("data-status"))),socialPostFlowEnableNotSavedPrompt()})),$(social_post_flow.status_form).on("change","input, select, textarea",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("body").on("wpzinc-media-library-attachment-added",(function(t){void 0!==$(social_post_flow.status_form).data("profile-id")&&(socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt())})),$("body").on("wpzinc-table-row-delete",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.delete-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowDeleteStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container div.statuses").length>0&&$("#profiles-container div.statuses").sortable({containment:"parent",items:".sortable",stop:function(t,s){var o=$(s.item),a=$(o).closest("div.statuses");socialPostFlowReindexStatuses($(a)),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()}}),$("#profiles-container div.statuses").bind("click.sortable mousedown.sortable",(function(t){t.target.focus()})),social_post_flow.post_id>0&&$("textarea.text",$(social_post_flow.status_form)).on("keyup change",(function(t){socialPostFlowCharacterCount(this)})),$("form#social-post-flow").on("submit",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses(),socialPostFlowSaveStatuses(social_post_flow.post_type,$('h2.nav-tab-wrapper a[data-post-type="'+social_post_flow.post_type+'"]'))})),$("button."+social_post_flow.plugin_name+"-save-post-statuses").on("click",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses();var s=[];for(i=0;i<=10;i++)$('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').length&&s.push($('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').val());socialPostFlowSavePostStatuses(social_post_flow.post_id,$('select[name="'+social_post_flow.plugin_name+'[override]"]').val(),$('input[name="'+social_post_flow.plugin_name+'[featured_image]"]').val(),s)}))})); -
social-post-flow/tags/1.0.2/assets/js/statuses.js
r3344663 r3345152 466 466 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 467 467 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 468 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 469 break; 470 471 case 'pinterest': 472 $( 'option[value="text"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 473 $( 'option[value="link"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 474 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 475 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 476 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 468 477 break; 469 478 … … 473 482 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 474 483 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 484 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 475 485 break; 476 486 … … 480 490 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 481 491 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 492 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 482 493 break; 483 494 } … … 510 521 case 'story': 511 522 $( '.link', $( social_post_flow.status_form ) ).hide(); 523 $( '.images', $( social_post_flow.status_form ) ).show(); 524 break; 525 526 case 'pin': 527 $( '.link', $( social_post_flow.status_form ) ).show(); 512 528 $( '.images', $( social_post_flow.status_form ) ).show(); 513 529 break; -
social-post-flow/tags/1.0.2/assets/scss/admin.scss
r3336429 r3345152 249 249 } 250 250 } 251 &.pinterest { 252 a { 253 background-image: url(../../_modules/dashboard/feather/pinterest.svg); 254 background-size: 16px 16px; 255 } 256 } 251 257 } 252 258 } -
social-post-flow/tags/1.0.2/includes/class-social-post-flow-admin.php
r3344663 r3345152 452 452 'input.url', 453 453 'textarea.text-to-image', 454 455 // Pinterest.456 'input#pinterest_title',457 'input#pinterest_source_url',458 459 // Google Business.460 'input#googlebusiness_title',461 'input#googlebusiness_code',462 'input#googlebusiness_terms',463 454 ), 464 455 'triggers' => array( -
social-post-flow/tags/1.0.2/includes/class-social-post-flow-common.php
r3344663 r3345152 82 82 'conditions' => array( 83 83 'provider' => array( 'instagram' ), 84 ), 85 ), 86 'pin' => array( 87 'label' => __( 'Pin', 'social-post-flow' ), 88 'conditions' => array( 89 'provider' => array( 'pinterest' ), 84 90 ), 85 91 ), -
social-post-flow/tags/1.0.2/includes/class-social-post-flow-publish.php
r3344663 r3345152 1611 1611 // Build API compatible arguments. 1612 1612 $args = array( 1613 'post_type' => $status['post_type'], 1613 'post_type' => ( $service === 'pinterest' ? 'pin' : $status['post_type'] ), 1614 'profile_ids' => array( $profile_id ), 1614 1615 'text' => $this->parse_text( $post, $status['text'] ), 1615 'first_comment' => $this->parse_text( $post, $status['first_comment'] ), 1616 'profile_ids' => array( $profile_id ), 1616 'first_comment' => ( $service !== 'mastodon' ? $this->parse_text( $post, $status['first_comment'] ) : null ), 1617 1617 ); 1618 1618 1619 // Remove first comment for Mastodon and Instagram Story posts. 1620 if ( $service === 'mastodon' || $status['post_type'] === 'story' ) { 1621 unset( $args['first_comment'] ); 1622 } 1623 1624 // URL and Image. 1625 switch ( $status['post_type'] ) { 1626 /** 1627 * Text 1628 */ 1629 case 'text': 1630 // No image or URL. 1631 break; 1632 1619 // URL. 1620 switch ( $args['post_type'] ) { 1633 1621 /** 1634 1622 * Link 1635 1623 */ 1636 1624 case 'link': 1637 $args['url'] = $this->get_permalink( $post ); 1625 $args['url'] = $this->parse_text( $post, $status['url'] ); 1626 1627 // If the URL is empty, use the Post's URL, as a URL is required. 1628 if ( empty( $args['url'] ) ) { 1629 $args['url'] = $this->get_permalink( $post ); 1630 } 1638 1631 break; 1639 1632 1640 1633 /** 1641 * Image 1642 * IG: Story 1634 * Pinterest 1643 1635 */ 1636 case 'pin': 1637 // Get URL. 1638 $url = $this->parse_text( $post, $status['url'] ); 1639 1640 // If URL is empty, don't include it in the args. 1641 if ( empty( $url ) ) { 1642 break; 1643 } 1644 1645 // Add URL to args. 1646 $args['url'] = $url; 1647 break; 1648 1649 /** 1650 * IG Story 1651 * - Remove first comment. 1652 */ 1653 case 'story': 1654 unset( $args['first_comment'] ); 1655 break; 1656 } 1657 1658 // Image(s). 1659 switch ( $args['post_type'] ) { 1660 case 'pin': 1661 case 'story': 1644 1662 case 'image': 1645 case 'story':1646 1663 switch ( $status['image'] ) { 1647 1664 /** … … 1721 1738 1722 1739 } 1723 break;1724 1740 } 1725 1741 … … 1994 2010 * Text 1995 2011 * Link 2012 * Pin 2013 * Story 1996 2014 */ 1997 2015 case 'text': 1998 2016 case 'link': 2017 case 'pin': 2018 case 'story': 1999 2019 // No additional images supported. 2000 2020 break; … … 2002 2022 /** 2003 2023 * Image 2004 * Story2005 2024 * Integrations (e.g. ACF) 2006 2025 */ 2007 2026 case 'image': 2008 case 'story':2009 2027 switch ( $status['image_additional'] ) { 2010 2028 case '': -
social-post-flow/tags/1.0.2/readme.txt
r3344663 r3345152 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 14 14 == Description == 15 15 16 Auto matically publishyour Posts, Pages, Events, Products and more to Facebook, X / Twitter, Threads, Instagram, Mastodon and more with Social Post Flow.16 Auto post your Posts, Pages, Events, Products and more to Facebook, X / Twitter, Threads, Instagram, Mastodon and more with Social Post Flow. 17 17 18 18 Don't have a Social Post Flow account? Pricing starts at $99/year for 10 social accounts, and you can [sign up for a free 7 day trial](https://app.socialpostflow.com/register) 19 20 See our quick start tutorial to auto publish your WordPress content: 19 21 20 22 [youtube https://www.youtube.com/watch?v=IFjYKMjnRB4] … … 79 81 There's no need to mess around with App IDs, authorization tokens or complicated technical steps. 80 82 81 Connecting your social media profiles is done in a few clicks through Buffer, taking minutes.83 Connecting your social media profiles is done in a few clicks through Social Post Flow, taking minutes. 82 84 83 85 Then just choose which of those profiles to use in the plugin, set your status message and your social media scheduling is set. 84 86 87 === Supports Twitter / X === 88 89 If you're a Jetpack Social, Blog2Social or NextScripts Social Networks Auto-Poster user looking for a replacement to auto publish to Twitter / X, Social Post Flow is one of the best auto post to Twitter / X solutions that still works. 90 85 91 === What can I do with Social Post Flow? === 86 92 87 - Automatically share Posts, Pages and Custom Post Types to social media when scheduling, publishing or updating your WordPress content93 - Automatically share and auto post your WordPress Posts, Pages and Custom Post Types to social media when scheduling, publishing or updating your WordPress content 88 94 - Define the status text dynamically, pulling in your WordPress Post's Title, Content, Excerpt and more 89 95 - WordPress to Facebook Page Auto Post … … 123 129 Our aim is to provide a competitively priced, well featured Plugin and service without breaking the bank. 124 130 131 = Can I still auto publish to Twitter / X? = 132 133 Yes! You can still auto publish to Twitter / X with the Social Post Flow WordPress Plugin. 134 125 135 = Which Social Media Profiles can I auto post / auto publish to with Social Post Flow? = 126 136 … … 144 154 == Changelog == 145 155 156 = 1.0.2 (2025-08-15) = 157 * Fix: Status: Link: Honor value in Link field, instead of always using the Post's URL 158 146 159 = 1.0.1 (2025-08-14) = 147 160 * Added: Logs: Search: Search `Status Response` when performing a search -
social-post-flow/tags/1.0.2/social-post-flow.php
r3344663 r3345152 9 9 * Plugin Name: Social Post Flow 10 10 * Plugin URI: http://www.socialpostflow.com/integrations/wordpress 11 * Version: 1.0. 111 * Version: 1.0.2 12 12 * Author: Social Post Flow 13 13 * Author URI: http://www.socialpostflow.com … … 28 28 29 29 // Define Plugin version and build date. 30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.0. 1' );31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-08-1 418:00:00' );30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.0.2' ); 31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-08-15 18:00:00' ); 32 32 33 33 // Define Plugin paths. -
social-post-flow/tags/1.0.2/views/settings-post-actionheader.php
r3344663 r3345152 73 73 $override = $this->get_setting( $post_type, '[' . $profile_id . '][override]', 0 ); 74 74 $disabled = false; 75 if ( isset( $profile['provider'] ) && $profile['provider'] === 'pinterest' ) {76 if ( ! isset( $profile['can_be_subprofile'] ) || ! $profile['can_be_subprofile'] ) {77 // Subprofile is required.78 $override = 1;79 $disabled = true;80 }81 }82 75 83 76 // If Override is Disabled, store the value in a hidden field. -
social-post-flow/trunk/assets/css/admin.css
r3336429 r3345152 1 body.wpzinc .wpzinc-option.progressbar .ui-progressbar{height:2em;text-align:left;overflow:hidden}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-overlay{background:green;height:100%;filter:alpha(opacity=25);opacity:.25}body.wpzinc .wpzinc-option.progressbar .ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}body.wpzinc .wpzinc-option.progressbar .ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}body.wpzinc .wpzinc-option.progressbar .ui-widget .ui-widget{font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget input,body.wpzinc .wpzinc-option.progressbar .ui-widget select,body.wpzinc .wpzinc-option.progressbar .ui-widget textarea,body.wpzinc .wpzinc-option.progressbar .ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget-content{border:1px solid #ddd;background:#eee;color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-content a{color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-header{border:1px solid #e78f08;background:green;color:#fff;font-weight:bold}body.wpzinc .wpzinc-option.progressbar .ui-widget-header a{color:#fff}li.toplevel_page_social-post-flow a div.wp-menu-image img{width:16px;height:16px}body.wpzinc.social-post-flow div.wrap h1.wp-heading-inline{background-image:url(../images/icons/social-post-flow-dark.svg);background-position:25px 50%;background-repeat:no-repeat;background-size:32px 32px}body.post-php #social-post-flow>.handlediv,body.post-new-php #social-post-flow>.handlediv{position:relative;z-index:2}body.post-php #social-post-flow>.hndle,body.post-new-php #social-post-flow>.hndle{background:#fff;border-top:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #social-post-flow div.inside,body.post-new-php #social-post-flow div.inside{margin:0;padding:0}body.post-php #social-post-flow div.inside #social-post-flow-override,body.post-new-php #social-post-flow div.inside #social-post-flow-override{display:none;margin-top:-1px;border-bottom:1px solid #dfdfdf}body.post-php #social-post-flow-image div.inside,body.post-new-php #social-post-flow-image div.inside{margin:0;padding:0}#social-post-flow-log div.inside{margin:0;padding:0}#social-post-flow-log div.inside div.wpzinc-option table.social-post-flow-log thead tr th{font-weight:700}table.social-post-flow-log tbody tr.success td,table.social-post-flow-log tbody tr.success th{background:#ddfede}table.social-post-flow-log tbody tr.success.alternate td,table.social-post-flow-log tbody tr.success.alternate th{background:#cafcbb}table.social-post-flow-log tbody tr.warning td,table.social-post-flow-log tbody tr.warning th{background:orange}table.social-post-flow-log tbody tr.warning.alternate td,table.social-post-flow-log tbody tr.warning.alternate th{background:#e6a62e}table.social-post-flow-log tbody tr.error td,table.social-post-flow-log tbody tr.error th{background:#ffcdcd}table.social-post-flow-log tbody tr.error.alternate td,table.social-post-flow-log tbody tr.error.alternate th{background:#fcbbbb}table.social-post-flow-log tbody tr.error a{text-decoration:none}body.block-editor-page #social-post-flow,body.block-editor-page #social-post-flow-log{margin-bottom:20px}#social-post-flow ul.wpzinc-nav-tabs li.image a{background-image:url(../../_modules/dashboard/feather/image.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.lock a{background-image:url(../../_modules/dashboard/feather/lock.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.arrow-right-circle a{background-image:url(../../_modules/dashboard/feather/arrow-right-circle.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.file-text a{background-image:url(../../_modules/dashboard/feather/file-text.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.users a{background-image:url(../../_modules/dashboard/feather/users.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.tag a{background-image:url(../../_modules/dashboard/feather/tag.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.default a{background-image:url(../../_modules/dashboard/feather/settings.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.facebook a{background-image:url(../../_modules/dashboard/feather/facebook.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.threads a{background-image:url(../../_modules/dashboard/feather/at-sign.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.instagram a{background-image:url(../../_modules/dashboard/feather/instagram.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.linkedin a{background-image:url(../../_modules/dashboard/feather/linkedin.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.x a{background-image:url(../../_modules/dashboard/feather/x.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.mastodon a{background-image:url(../../_modules/dashboard/feather/mastodon.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li a span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a span.dashicons.dashicons-yes{display:none}#social-post-flow ul.wpzinc-nav-tabs li a.enabled span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a.enabled span.dashicons.dashicons-yes{display:inline-block}#social-post-flow .wpzinc-media-library{width:150px}#social-post-flow div.postbox{width:100%}#social-post-flow div.postbox div.statuses tr.status.first td.actions a.delete-status{display:none}#social-post-flow div.postbox div.statuses tr.status td.count{width:20px}#social-post-flow div.postbox div.statuses tr.status td.actions{width:80px}#social-post-flow div.postbox div.statuses tr.status-form-container>td{padding:0}body.wpzinc .wrap #social-post-flow-status-form>.wpzinc-option{padding:20px 30px}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline{margin:5px 0 15px 0;border-top:1px solid #ccd0d4;border-right:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline p{margin:.5em 0}body.wpzinc .wrap #social-post-flow-status-form div.images{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form div.images select.right{margin:0 0 0 5px}body.wpzinc .wrap #social-post-flow-status-form div.tags{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form small.characters{display:inline-block;line-height:1}body.wpzinc .wrap #social-post-flow-status-form h3{margin:0}body.wpzinc .wrap #social-post-flow-status-form div.status select,body.wpzinc .wrap #social-post-flow-status-form div.status input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.status textarea,body.wpzinc .wrap #social-post-flow-status-form div.scheduling select,body.wpzinc .wrap #social-post-flow-status-form div.scheduling input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.scheduling textarea,body.wpzinc .wrap #social-post-flow-status-form div.pinterest select,body.wpzinc .wrap #social-post-flow-status-form div.pinterest input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.pinterest textarea,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness select,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness textarea,body.wpzinc .wrap #social-post-flow-status-form div.images select,body.wpzinc .wrap #social-post-flow-status-form div.images input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.images textarea,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image select,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.text-to-image textarea{margin:0 0 7px 0}body.wpzinc .wrap #social-post-flow-status-form div.schedule label,body.wpzinc .wrap #social-post-flow-status-form div.schedule .custom{display:inline-block;vertical-align:middle}body.wpzinc .wrap #social-post-flow-status-form div.schedule input[type=number]{width:50px}body.wpzinc .wrap #social-post-flow-status-form div.section{margin:15px 0 0 0;padding:15px 0 0 0;border-top:1px solid #dfdfdf}body.wpzinc .wrap #social-post-flow-status-form div.section table th.actions,body.wpzinc .wrap #social-post-flow-status-form div.section table td.actions{width:71px}table tr.hide-delete-button td .wpzinc-delete-table-row{display:none}1 body.wpzinc .wpzinc-option.progressbar .ui-progressbar{height:2em;text-align:left;overflow:hidden}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}body.wpzinc .wpzinc-option.progressbar .ui-progressbar .ui-progressbar-overlay{background:green;height:100%;filter:alpha(opacity=25);opacity:.25}body.wpzinc .wpzinc-option.progressbar .ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}body.wpzinc .wpzinc-option.progressbar .ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}body.wpzinc .wpzinc-option.progressbar .ui-widget .ui-widget{font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget input,body.wpzinc .wpzinc-option.progressbar .ui-widget select,body.wpzinc .wpzinc-option.progressbar .ui-widget textarea,body.wpzinc .wpzinc-option.progressbar .ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}body.wpzinc .wpzinc-option.progressbar .ui-widget-content{border:1px solid #ddd;background:#eee;color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-content a{color:#333}body.wpzinc .wpzinc-option.progressbar .ui-widget-header{border:1px solid #e78f08;background:green;color:#fff;font-weight:bold}body.wpzinc .wpzinc-option.progressbar .ui-widget-header a{color:#fff}li.toplevel_page_social-post-flow a div.wp-menu-image img{width:16px;height:16px}body.wpzinc.social-post-flow div.wrap h1.wp-heading-inline{background-image:url(../images/icons/social-post-flow-dark.svg);background-position:25px 50%;background-repeat:no-repeat;background-size:32px 32px}body.post-php #social-post-flow>.handlediv,body.post-new-php #social-post-flow>.handlediv{position:relative;z-index:2}body.post-php #social-post-flow>.hndle,body.post-new-php #social-post-flow>.hndle{background:#fff;border-top:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #social-post-flow div.inside,body.post-new-php #social-post-flow div.inside{margin:0;padding:0}body.post-php #social-post-flow div.inside #social-post-flow-override,body.post-new-php #social-post-flow div.inside #social-post-flow-override{display:none;margin-top:-1px;border-bottom:1px solid #dfdfdf}body.post-php #social-post-flow-image div.inside,body.post-new-php #social-post-flow-image div.inside{margin:0;padding:0}#social-post-flow-log div.inside{margin:0;padding:0}#social-post-flow-log div.inside div.wpzinc-option table.social-post-flow-log thead tr th{font-weight:700}table.social-post-flow-log tbody tr.success td,table.social-post-flow-log tbody tr.success th{background:#ddfede}table.social-post-flow-log tbody tr.success.alternate td,table.social-post-flow-log tbody tr.success.alternate th{background:#cafcbb}table.social-post-flow-log tbody tr.warning td,table.social-post-flow-log tbody tr.warning th{background:orange}table.social-post-flow-log tbody tr.warning.alternate td,table.social-post-flow-log tbody tr.warning.alternate th{background:#e6a62e}table.social-post-flow-log tbody tr.error td,table.social-post-flow-log tbody tr.error th{background:#ffcdcd}table.social-post-flow-log tbody tr.error.alternate td,table.social-post-flow-log tbody tr.error.alternate th{background:#fcbbbb}table.social-post-flow-log tbody tr.error a{text-decoration:none}body.block-editor-page #social-post-flow,body.block-editor-page #social-post-flow-log{margin-bottom:20px}#social-post-flow ul.wpzinc-nav-tabs li.image a{background-image:url(../../_modules/dashboard/feather/image.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.lock a{background-image:url(../../_modules/dashboard/feather/lock.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.arrow-right-circle a{background-image:url(../../_modules/dashboard/feather/arrow-right-circle.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.file-text a{background-image:url(../../_modules/dashboard/feather/file-text.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.users a{background-image:url(../../_modules/dashboard/feather/users.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.tag a{background-image:url(../../_modules/dashboard/feather/tag.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.default a{background-image:url(../../_modules/dashboard/feather/settings.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.facebook a{background-image:url(../../_modules/dashboard/feather/facebook.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.threads a{background-image:url(../../_modules/dashboard/feather/at-sign.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.instagram a{background-image:url(../../_modules/dashboard/feather/instagram.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.linkedin a{background-image:url(../../_modules/dashboard/feather/linkedin.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.x a{background-image:url(../../_modules/dashboard/feather/x.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.mastodon a{background-image:url(../../_modules/dashboard/feather/mastodon.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li.pinterest a{background-image:url(../../_modules/dashboard/feather/pinterest.svg);background-size:16px 16px}#social-post-flow ul.wpzinc-nav-tabs li a span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a span.dashicons.dashicons-yes{display:none}#social-post-flow ul.wpzinc-nav-tabs li a.enabled span.dashicons.dashicons-yes,#social-post-flow ul.wpzinc-nav-tabs-horizontal li a.enabled span.dashicons.dashicons-yes{display:inline-block}#social-post-flow .wpzinc-media-library{width:150px}#social-post-flow div.postbox{width:100%}#social-post-flow div.postbox div.statuses tr.status.first td.actions a.delete-status{display:none}#social-post-flow div.postbox div.statuses tr.status td.count{width:20px}#social-post-flow div.postbox div.statuses tr.status td.actions{width:80px}#social-post-flow div.postbox div.statuses tr.status-form-container>td{padding:0}body.wpzinc .wrap #social-post-flow-status-form>.wpzinc-option{padding:20px 30px}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline{margin:5px 0 15px 0;border-top:1px solid #ccd0d4;border-right:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}body.wpzinc .wrap #social-post-flow-status-form div.notice-inline p{margin:.5em 0}body.wpzinc .wrap #social-post-flow-status-form div.images{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form div.images select.right{margin:0 0 0 5px}body.wpzinc .wrap #social-post-flow-status-form div.tags{margin:0 0 10px 0}body.wpzinc .wrap #social-post-flow-status-form small.characters{display:inline-block;line-height:1}body.wpzinc .wrap #social-post-flow-status-form h3{margin:0}body.wpzinc .wrap #social-post-flow-status-form div.status select,body.wpzinc .wrap #social-post-flow-status-form div.status input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.status textarea,body.wpzinc .wrap #social-post-flow-status-form div.scheduling select,body.wpzinc .wrap #social-post-flow-status-form div.scheduling input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.scheduling textarea,body.wpzinc .wrap #social-post-flow-status-form div.pinterest select,body.wpzinc .wrap #social-post-flow-status-form div.pinterest input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.pinterest textarea,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness select,body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.googlebusiness textarea,body.wpzinc .wrap #social-post-flow-status-form div.images select,body.wpzinc .wrap #social-post-flow-status-form div.images input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.images textarea,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image select,body.wpzinc .wrap #social-post-flow-status-form div.text-to-image input[type=text],body.wpzinc .wrap #social-post-flow-status-form div.text-to-image textarea{margin:0 0 7px 0}body.wpzinc .wrap #social-post-flow-status-form div.schedule label,body.wpzinc .wrap #social-post-flow-status-form div.schedule .custom{display:inline-block;vertical-align:middle}body.wpzinc .wrap #social-post-flow-status-form div.schedule input[type=number]{width:50px}body.wpzinc .wrap #social-post-flow-status-form div.section{margin:15px 0 0 0;padding:15px 0 0 0;border-top:1px solid #dfdfdf}body.wpzinc .wrap #social-post-flow-status-form div.section table th.actions,body.wpzinc .wrap #social-post-flow-status-form div.section table td.actions{width:71px}table tr.hide-delete-button td .wpzinc-delete-table-row{display:none} -
social-post-flow/trunk/assets/js/min/statuses-min.js
r3336429 r3345152 1 function socialPostFlowReinitAutosize(){var $;0!=($=jQuery)(".wpzinc-autosize-js",$(social_post_flow.status_form)).length&&(autosize.destroy($(".wpzinc-autosize-js")),autosize($(".wpzinc-autosize-js")))}function socialPostFlowReinitAutocomplete(){wp_zinc_autocomplete_destroy(),wp_zinc_autocomplete_setup(),wp_zinc_autocomplete_initialize()}function socialPostFlowInitTags(){var $;0!=($=jQuery)("select.tags",$(social_post_flow.status_form)).length&&$("select.tags",$(social_post_flow.status_form)).each((function(){$(this).on("change.social-post-flow",(function(t){var s=$(this).val(),o=$(this).attr("data-textarea"),a=$("option:selected",$(this)),e=$(this).closest("#social-post-flow-status-form"),i=$(o,$(e)),l=$(i).val();if(void 0!==$(a).data("question")){var _=prompt($(a).data("question"),$(a).data("default-value"));0==_.length&&(_=$(a).data("default-value")),s=s.replace($(a).data("replace"),_)}var c=$(i)[0].selectionStart;c>0&&(" "!=l.substring(c-1,c)&&(s=" "+s)," "!=l.substring(c,c+1)&&(s+=" ")),s.trim().length>0&&$(i).val(l.substring(0,c)+s+l.substring(c)).trigger("change"),$(this).val("")}))}))}function socialPostFlowInitSelectize(t,s,o,a){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){var t=$(this).attr("id"),e=!1,l=!1,_={},c=[];s&&o&&(e=$('div.statuses[data-profile-id="'+s+'"][data-action="'+o+'"]'),l=$('tr[data-status-index="'+a+'"]',$(e)),c=void 0!==(_=JSON.parse($(l).attr("data-labels")))[t]?_[t]:[]),$(this).selectize({valueField:"id",labelField:"text",searchField:"text",plugins:["drag_drop","remove_button"],options:c,delimiter:",",persist:!1,create:!1,load:function(t,s){if(!t.length||t.length<3)return s();var o=this.$input.data("action"),a=this.$input.data("taxonomy"),e=this.$input.data("nonce-key");$.ajax({url:ajaxurl,data:{action:o,taxonomy:a,nonce:social_post_flow[e],q:t,page:10},error:function(t,o,a){s()},success:function(t){s(t.data)}})},onChange:function(s){if(l){var o=[],a=this.items.length;for(i=0;i<a;i++)o.push({id:this.options[this.items[i]].id,text:this.options[this.items[i]].text});var e=JSON.parse($(l).attr("data-labels"));e[t]=o,$(l).data("labels",JSON.stringify(e)).attr("data-labels",JSON.stringify(e))}}})}))}function socialPostFlowDestroySelectize(t){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){this.selectize&&this.selectize.destroy()}))}function socialPostFlowReindexStatuses(t){var $;($=jQuery)("tr.sortable",$(t)).each((function(t){$(this).data("status-index",t).attr("data-status-index",t),$("td.count ",$(this)).html("#"+(t+1)),0==t?$(this).addClass("first"):$(this).removeClass("first")}))}function socialPostFlowUpdateScheduleOptions(t){!function($){if(0!=$("select.schedule",$(social_post_flow.status_form)).length)switch($("select.schedule",$(social_post_flow.status_form)).val()){case"custom":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_relative":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).show(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_field":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).show(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_EventStartDate":case"_EventEndDate":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).show(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_event_start_date":case"_event_end_date":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).show(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"mec_start_datetime":case"mec_end_datetime":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).show(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"specific":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).show();break;default:$("div.schedule",$(social_post_flow.status_form)).hide(),$("span.schedule",$(social_post_flow.status_form)).hide(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide()}}(jQuery)}function socialPostFlowUpdateImageOptions(){!function($){if(0==$("select.image",$(social_post_flow.status_form)).length)return;let t=$("select.image",$(social_post_flow.status_form)).val();$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).hide(),$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).each((function(){-1!==$(this).data("conditional-value").toString().split(",").indexOf(t)&&$(this).show()}))}(jQuery)}function socialPostFlowUpdatePostTypeOptions(t){!function($){switch(t.provider){case"instagram":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1) ;break;case"tiktok":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0);break;default:$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0)}}(jQuery)}function socialPostFlowUpdateStatusSections(){!function($){switch($("select.post_type",$(social_post_flow.status_form)).val()){case"text":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).hide();break;case"link":$(".link",$(social_post_flow.status_form)).show(),$(".images",$(social_post_flow.status_form)).hide();break;case"image":case"story":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).show()}}(jQuery)}function socialPostFlowAddStatus(t,s){var $,o,a,e;$=jQuery,o=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),a=$("tbody",$(o)),e=$("tr.status",$(a)).last(),$(a).first().after($(e).clone()),socialPostFlowReindexStatuses(o),socialPostFlowUpdateStatuses()}function socialPostFlowEditStatus(t,s,o,a,e){socialPostFlowDestroySelectize(social_post_flow.status_form),socialPostFlowPopulateStatusForm(t,s,o,a,e),socialPostFlowUpdatePostTypeOptions(s),socialPostFlowUpdateScheduleOptions(o),socialPostFlowUpdateImageOptions(),socialPostFlowUpdateStatusSections(),socialPostFlowDisplayStatusForm(t,o,a),socialPostFlowReinitAutosize(),socialPostFlowReinitAutocomplete(),socialPostFlowInitSelectize(social_post_flow.status_form,t,o,a)}function socialPostFlowDeleteStatus(t,s,o){!function($){if(confirm(social_post_flow.delete_status_message)){var a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),e=$('tr[data-status-index="'+o+'"]',$(a));$(e).remove(),socialPostFlowReindexStatuses(a),socialPostFlowUpdateStatuses()}}(jQuery)}function socialPostFlowUpdateStatus(t,s,o){var $,a,e,i,l;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=-1,i=-1,(l=JSON.parse($(a).attr("data-status"))).conditions={},l.custom_fields={},l.authors_custom_fields={},l.terms={},$.each($(social_post_flow.status_form).find("input, select, textarea").serializeArray(),(function(t,s){switch(s.name=s.name.replace(social_post_flow.plugin_name+"_",""),s.name){case"custom_fields[key][]":if(e++,""==s.value)break;l.custom_fields[e]={},l.custom_fields[e].key=s.value;break;case"custom_fields[compare][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].compare=s.value;break;case"custom_fields[value][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].value=s.value;break;case"authors":case"authors_roles":if("false"==s.value)break;l[s.name]=s.value.split(",");break;case"authors_custom_fields[key][]":if(i++,""==s.value)break;l.authors_custom_fields[i]={},l.authors_custom_fields[i].key=s.value;break;case"authors_custom_fields[compare][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].compare=s.value;break;case"authors_custom_fields[value][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].value=s.value;break;default:var o=s.name.match(/conditions\[([^)]+)\]/);if(o){l.conditions[o[1]]=s.value;break}var a=s.name.match(/terms\[([^)]+)\]/);if(a){l.terms[a[1]]=s.value.split(",");break}"true"==s.value&&(s.value=!0),"false"==s.value&&(s.value=!1);var _=s.name.match(/(.*?)\[(.*?)\]/);null!=_?l[_[1]][_[2]]=s.value:l[s.name]=s.value}})),$(a).data("status",JSON.stringify(l)).attr("data-status",JSON.stringify(l)),socialPostFlowUpdateStatuses(),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.get_status_row_action,nonce:social_post_flow.get_status_row_nonce,post_type:social_post_flow.post_type,post_action:s,status:JSON.stringify(l)},error:function(t,s,o){alert("socialPostFlowUpdateStatus(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||alert(t.data),$("td.post_type",$(a)).text(t.data.post_type),$("td.text",$(a)).text(t.data.text),$("td.schedule",$(a)).text(t.data.schedule)}})}function socialPostFlowPopulateStatusForm(t,s,o,a,e){var $;($=jQuery)("div.conditional",$(social_post_flow.status_form)).addClass("hidden"),$("input, select, textarea",$(social_post_flow.status_form)).each((function(){var t=$(this).attr("name");if($(this).prop("nodeName").toLowerCase(),void 0!==t)switch(t=t.replace(social_post_flow.plugin_name+"_","")){case"text_to_image_background_image":void 0!==e[t]?$(this).val(e[t]):$(this).val("");break;case"text_to_image_background_image_url":void 0!==e.text_to_image_background_image_url?($(this).val(e[t]),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",e.text_to_image_background_image_url)):($(this).val(""),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",""));break;case"custom_fields[key][]":for(let t in e.custom_fields)$('input[name="'+social_post_flow.plugin_name+'_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].value),wpzinc_table_row_add("custom-field",$(this).closest("table"));break;case"custom_fields[compare][]":case"custom_fields[value][]":case"authors_custom_fields[compare][]":case"authors_custom_fields[value][]":break;case"authors":case"authors_roles":if(!e[t])break;$('input[name="'+$(this).attr("name")+'"]').val(e[t].join(","));break;case"authors_compare":case"authors_roles_compare":if(!e[t])break;$('select[name="'+$(this).attr("name")+'"]').val(e[t]);break;case"authors_custom_fields[key][]":for(let t in e.authors_custom_fields)$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_authors_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].value),wpzinc_table_row_add("authors-custom-field",$(this).closest("table"));break;default:var s=t.match(/conditions\[([^)]+)\]/);if(s){void 0!==e.conditions[s[1]]&&$(this).val(e.conditions[s[1]]);break}var o=t.match(/terms\[([^)]+)\]/);if(o){void 0!==e.terms[o[1]]&&$(this).val(e.terms[o[1]].join(","));break}var a=t.match(/(.*?)\[(.*?)\]/);if(null!=a){$(this).val(e[a[1]][a[2]]);break}$(this).val(e[t])}})),$(social_post_flow.status_form).data("profile-id",t).attr("data-profile-id",t),$(social_post_flow.status_form).data("action",o).attr("data-action",o),$(social_post_flow.status_form).data("status-index",a).attr("data-status-index",a),$("input, select",$(social_post_flow.status_form)).conditional()}function socialPostFlowDisplayStatusForm(t,s,o){var $,a,e;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr.status-form-container'),$("td",e).append($(social_post_flow.status_form).removeClass("hidden")),$(a).after($(e).removeClass("hidden"))}function socialPostFlowSaveAndHideStatusForm(){var $;($=jQuery)("div.statuses div.social-post-flow-status-form").length>0&&socialPostFlowUpdateStatus($("div.statuses tr.status-form-container #social-post-flow-status-form").data("profile-id"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("action"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("status-index")),$(social_post_flow.status_form).data("profile-id","").attr("data-profile-id",""),$(social_post_flow.status_form).data("action","").attr("data-action",""),$(social_post_flow.status_form).data("status-index","").attr("data-status-index",""),$(social_post_flow.status_form_container).append($(social_post_flow.status_form))}function socialPostFlowClearStatusForm(){var $;($=jQuery)("input, select, textarea",$(social_post_flow.status_form)).each((function(){$(this).val("")})),$("tr.custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()})),$("tr.authors-custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()}))}function socialPostFlowGetStatuses(){var $,t={};return($=jQuery)("li.wpzinc-nav-tab a").each((function(){var s=$(this).attr("href").split("#profile-").pop();"default"==s?t[s]={}:(t[s]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+'][enabled]"]').is(":checked")},$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').length>0?t[s].override=$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').is(":checked"):t[s].override="1"==$('input[type="hidden"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').val()),$("li.wpzinc-nav-tab-horizontal a","#profile-"+s).each((function(){var o=$(this).attr("href").split("#profile-"+s+"-").pop();t[s][o]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+"]["+o+'][enabled]"]').is(":checked"),status:[]},$("tr.status","#profile-"+s+"-"+o).each((function(){t[s][o].status.push(JSON.parse($(this).attr("data-status")))}))}))})),t}function socialPostFlowUpdateStatuses(){var t,$;return $=jQuery,t=socialPostFlowGetStatuses(),$('input[name="'+social_post_flow.plugin_name+'[statuses]"][type="hidden"]').val(JSON.stringify(t)),t}function socialPostFlowSaveStatuses(t,s){var o,$;$=jQuery,o=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_type:t,statuses:JSON.stringify(o)},error:function(t,s,o){wpzinc_modal_show_error_message_and_exit("socialPostFlowSaveStatuses(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),s.length&&(t.data.post_type_enabled?($(s).addClass("enabled"),$(".notice-warning").hide()):($(s).removeClass("enabled"),$(".notice-warning").show())),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}function socialPostFlowSavePostStatuses(t,s,o,a){var e,$;$=jQuery,e=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_id:t,override:s,featured_image:o,additional_images:a,statuses:JSON.stringify(e)},error:function(t,s,o){wpzinc_modal_close()},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}var socialPostFlowCharacterCounting=!1;function socialPostFlowCharacterCount(t){var $;$=jQuery,socialPostFlowCharacterCounting||(socialPostFlowCharacterCounting=!0,$.post(social_post_flow.ajax,{action:social_post_flow.character_count_action,post_id:social_post_flow.post_id,status:$(t).val(),nonce:social_post_flow.character_count_nonce},(function(s){$("span.character-count",$(t).parent()).text(s.data.character_count),setTimeout((function(){socialPostFlowCharacterCounting=!1}),3e3)})))}function socialPostFlowEnableNotSavedPrompt(){social_post_flow.prompt_unsaved_changes&&(window.onbeforeunload=function(){return!0})}function socialPostFlowDisableNotSavedPrompt(){window.onbeforeunload=null}jQuery(document).ready((function($){socialPostFlowInitTags(),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.post_type",(function(t){socialPostFlowUpdateStatusSections()})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.schedule",(function(t){socialPostFlowUpdateScheduleOptions($(this).closest("div.statuses").data("action"))})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.image",(function(t){socialPostFlowUpdateImageOptions()})),$("input.enable",$("#profiles-container")).on("change",(function(t){var s=$(this).data("tab");$(this).prop("checked")?$('a[href="#'+s+'"]').addClass("enabled"):$('a[href="#'+s+'"]').removeClass("enabled"),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$("input.override",$("#profiles-container")).on("change",(function(t){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$(".wpzinc-js-tabs").on("click",(function(){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm()})),$("#profiles-container").on("click","a.button.add-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowAddStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.edit-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowEditStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("profile"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index"),JSON.parse($(this).closest("tr").attr("data-status"))),socialPostFlowEnableNotSavedPrompt()})),$(social_post_flow.status_form).on("change","input, select, textarea",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("body").on("wpzinc-media-library-attachment-added",(function(t){void 0!==$(social_post_flow.status_form).data("profile-id")&&(socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt())})),$("body").on("wpzinc-table-row-delete",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.delete-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowDeleteStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container div.statuses").length>0&&$("#profiles-container div.statuses").sortable({containment:"parent",items:".sortable",stop:function(t,s){var o=$(s.item),a=$(o).closest("div.statuses");socialPostFlowReindexStatuses($(a)),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()}}),$("#profiles-container div.statuses").bind("click.sortable mousedown.sortable",(function(t){t.target.focus()})),social_post_flow.post_id>0&&$("textarea.text",$(social_post_flow.status_form)).on("keyup change",(function(t){socialPostFlowCharacterCount(this)})),$("form#social-post-flow").on("submit",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses(),socialPostFlowSaveStatuses(social_post_flow.post_type,$('h2.nav-tab-wrapper a[data-post-type="'+social_post_flow.post_type+'"]'))})),$("button."+social_post_flow.plugin_name+"-save-post-statuses").on("click",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses();var s=[];for(i=0;i<=10;i++)$('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').length&&s.push($('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').val());socialPostFlowSavePostStatuses(social_post_flow.post_id,$('select[name="'+social_post_flow.plugin_name+'[override]"]').val(),$('input[name="'+social_post_flow.plugin_name+'[featured_image]"]').val(),s)}))}));1 function socialPostFlowReinitAutosize(){var $;0!=($=jQuery)(".wpzinc-autosize-js",$(social_post_flow.status_form)).length&&(autosize.destroy($(".wpzinc-autosize-js")),autosize($(".wpzinc-autosize-js")))}function socialPostFlowReinitAutocomplete(){wp_zinc_autocomplete_destroy(),wp_zinc_autocomplete_setup(),wp_zinc_autocomplete_initialize()}function socialPostFlowInitTags(){var $;0!=($=jQuery)("select.tags",$(social_post_flow.status_form)).length&&$("select.tags",$(social_post_flow.status_form)).each((function(){$(this).on("change.social-post-flow",(function(t){var s=$(this).val(),o=$(this).attr("data-textarea"),a=$("option:selected",$(this)),e=$(this).closest("#social-post-flow-status-form"),i=$(o,$(e)),l=$(i).val();if(void 0!==$(a).data("question")){var _=prompt($(a).data("question"),$(a).data("default-value"));0==_.length&&(_=$(a).data("default-value")),s=s.replace($(a).data("replace"),_)}var c=$(i)[0].selectionStart;c>0&&(" "!=l.substring(c-1,c)&&(s=" "+s)," "!=l.substring(c,c+1)&&(s+=" ")),s.trim().length>0&&$(i).val(l.substring(0,c)+s+l.substring(c)).trigger("change"),$(this).val("")}))}))}function socialPostFlowInitSelectize(t,s,o,a){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){var t=$(this).attr("id"),e=!1,l=!1,_={},c=[];s&&o&&(e=$('div.statuses[data-profile-id="'+s+'"][data-action="'+o+'"]'),l=$('tr[data-status-index="'+a+'"]',$(e)),c=void 0!==(_=JSON.parse($(l).attr("data-labels")))[t]?_[t]:[]),$(this).selectize({valueField:"id",labelField:"text",searchField:"text",plugins:["drag_drop","remove_button"],options:c,delimiter:",",persist:!1,create:!1,load:function(t,s){if(!t.length||t.length<3)return s();var o=this.$input.data("action"),a=this.$input.data("taxonomy"),e=this.$input.data("nonce-key");$.ajax({url:ajaxurl,data:{action:o,taxonomy:a,nonce:social_post_flow[e],q:t,page:10},error:function(t,o,a){s()},success:function(t){s(t.data)}})},onChange:function(s){if(l){var o=[],a=this.items.length;for(i=0;i<a;i++)o.push({id:this.options[this.items[i]].id,text:this.options[this.items[i]].text});var e=JSON.parse($(l).attr("data-labels"));e[t]=o,$(l).data("labels",JSON.stringify(e)).attr("data-labels",JSON.stringify(e))}}})}))}function socialPostFlowDestroySelectize(t){var $;($=jQuery)(".wpzinc-selectize",$(t)).each((function(){this.selectize&&this.selectize.destroy()}))}function socialPostFlowReindexStatuses(t){var $;($=jQuery)("tr.sortable",$(t)).each((function(t){$(this).data("status-index",t).attr("data-status-index",t),$("td.count ",$(this)).html("#"+(t+1)),0==t?$(this).addClass("first"):$(this).removeClass("first")}))}function socialPostFlowUpdateScheduleOptions(t){!function($){if(0!=$("select.schedule",$(social_post_flow.status_form)).length)switch($("select.schedule",$(social_post_flow.status_form)).val()){case"custom":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_relative":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).show(),$("span.custom",$(social_post_flow.status_form)).text("after "+t).show(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"custom_field":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).show(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_EventStartDate":case"_EventEndDate":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).show(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"_event_start_date":case"_event_end_date":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).show(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"mec_start_datetime":case"mec_end_datetime":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).show(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).show(),$("span.specific",$(social_post_flow.status_form)).hide();break;case"specific":$("div.schedule",$(social_post_flow.status_form)).show(),$("span.schedule",$(social_post_flow.status_form)).show(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).show();break;default:$("div.schedule",$(social_post_flow.status_form)).hide(),$("span.schedule",$(social_post_flow.status_form)).hide(),$("span.hours_mins_secs",$(social_post_flow.status_form)).hide(),$("span.relative",$(social_post_flow.status_form)).hide(),$("span.custom",$(social_post_flow.status_form)).text("").hide(),$("span.custom_field",$(social_post_flow.status_form)).hide(),$("span.the_events_calendar",$(social_post_flow.status_form)).hide(),$("span.events_manager",$(social_post_flow.status_form)).hide(),$("span.modern_events_calendar",$(social_post_flow.status_form)).hide(),$("span.specific",$(social_post_flow.status_form)).hide()}}(jQuery)}function socialPostFlowUpdateImageOptions(){!function($){if(0==$("select.image",$(social_post_flow.status_form)).length)return;let t=$("select.image",$(social_post_flow.status_form)).val();$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).hide(),$("tr.additional-images, tr.text-to-image",$(social_post_flow.status_form)).each((function(){-1!==$(this).data("conditional-value").toString().split(",").indexOf(t)&&$(this).show()}))}(jQuery)}function socialPostFlowUpdatePostTypeOptions(t){!function($){switch(t.provider){case"instagram":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0);break;case"pinterest":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1);break;case"tiktok":$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0);break;default:$('option[value="text"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="link"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="image"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!1),$('option[value="story"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0),$('option[value="pin"]',$("select.post_type",$(social_post_flow.status_form))).attr("disabled",!0)}}(jQuery)}function socialPostFlowUpdateStatusSections(){!function($){switch($("select.post_type",$(social_post_flow.status_form)).val()){case"text":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).hide();break;case"link":$(".link",$(social_post_flow.status_form)).show(),$(".images",$(social_post_flow.status_form)).hide();break;case"image":case"story":$(".link",$(social_post_flow.status_form)).hide(),$(".images",$(social_post_flow.status_form)).show();break;case"pin":$(".link",$(social_post_flow.status_form)).show(),$(".images",$(social_post_flow.status_form)).show()}}(jQuery)}function socialPostFlowAddStatus(t,s){var $,o,a,e;$=jQuery,o=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),a=$("tbody",$(o)),e=$("tr.status",$(a)).last(),$(a).first().after($(e).clone()),socialPostFlowReindexStatuses(o),socialPostFlowUpdateStatuses()}function socialPostFlowEditStatus(t,s,o,a,e){socialPostFlowDestroySelectize(social_post_flow.status_form),socialPostFlowPopulateStatusForm(t,s,o,a,e),socialPostFlowUpdatePostTypeOptions(s),socialPostFlowUpdateScheduleOptions(o),socialPostFlowUpdateImageOptions(),socialPostFlowUpdateStatusSections(),socialPostFlowDisplayStatusForm(t,o,a),socialPostFlowReinitAutosize(),socialPostFlowReinitAutocomplete(),socialPostFlowInitSelectize(social_post_flow.status_form,t,o,a)}function socialPostFlowDeleteStatus(t,s,o){!function($){if(confirm(social_post_flow.delete_status_message)){var a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"]'),e=$('tr[data-status-index="'+o+'"]',$(a));$(e).remove(),socialPostFlowReindexStatuses(a),socialPostFlowUpdateStatuses()}}(jQuery)}function socialPostFlowUpdateStatus(t,s,o){var $,a,e,i,l;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=-1,i=-1,(l=JSON.parse($(a).attr("data-status"))).conditions={},l.custom_fields={},l.authors_custom_fields={},l.terms={},$.each($(social_post_flow.status_form).find("input, select, textarea").serializeArray(),(function(t,s){switch(s.name=s.name.replace(social_post_flow.plugin_name+"_",""),s.name){case"custom_fields[key][]":if(e++,""==s.value)break;l.custom_fields[e]={},l.custom_fields[e].key=s.value;break;case"custom_fields[compare][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].compare=s.value;break;case"custom_fields[value][]":if(void 0===l.custom_fields[e])break;l.custom_fields[e].value=s.value;break;case"authors":case"authors_roles":if("false"==s.value)break;l[s.name]=s.value.split(",");break;case"authors_custom_fields[key][]":if(i++,""==s.value)break;l.authors_custom_fields[i]={},l.authors_custom_fields[i].key=s.value;break;case"authors_custom_fields[compare][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].compare=s.value;break;case"authors_custom_fields[value][]":if(void 0===l.authors_custom_fields[i])break;l.authors_custom_fields[i].value=s.value;break;default:var o=s.name.match(/conditions\[([^)]+)\]/);if(o){l.conditions[o[1]]=s.value;break}var a=s.name.match(/terms\[([^)]+)\]/);if(a){l.terms[a[1]]=s.value.split(",");break}"true"==s.value&&(s.value=!0),"false"==s.value&&(s.value=!1);var _=s.name.match(/(.*?)\[(.*?)\]/);null!=_?l[_[1]][_[2]]=s.value:l[s.name]=s.value}})),$(a).data("status",JSON.stringify(l)).attr("data-status",JSON.stringify(l)),socialPostFlowUpdateStatuses(),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.get_status_row_action,nonce:social_post_flow.get_status_row_nonce,post_type:social_post_flow.post_type,post_action:s,status:JSON.stringify(l)},error:function(t,s,o){alert("socialPostFlowUpdateStatus(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||alert(t.data),$("td.post_type",$(a)).text(t.data.post_type),$("td.text",$(a)).text(t.data.text),$("td.schedule",$(a)).text(t.data.schedule)}})}function socialPostFlowPopulateStatusForm(t,s,o,a,e){var $;($=jQuery)("div.conditional",$(social_post_flow.status_form)).addClass("hidden"),$("input, select, textarea",$(social_post_flow.status_form)).each((function(){var t=$(this).attr("name");if($(this).prop("nodeName").toLowerCase(),void 0!==t)switch(t=t.replace(social_post_flow.plugin_name+"_","")){case"text_to_image_background_image":void 0!==e[t]?$(this).val(e[t]):$(this).val("");break;case"text_to_image_background_image_url":void 0!==e.text_to_image_background_image_url?($(this).val(e[t]),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",e.text_to_image_background_image_url)):($(this).val(""),$(".wpzinc-media-library-insert img",$(social_post_flow.status_form)).attr("src",""));break;case"custom_fields[key][]":for(let t in e.custom_fields)$('input[name="'+social_post_flow.plugin_name+'_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.custom_fields[t].value),wpzinc_table_row_add("custom-field",$(this).closest("table"));break;case"custom_fields[compare][]":case"custom_fields[value][]":case"authors_custom_fields[compare][]":case"authors_custom_fields[value][]":break;case"authors":case"authors_roles":if(!e[t])break;$('input[name="'+$(this).attr("name")+'"]').val(e[t].join(","));break;case"authors_compare":case"authors_roles_compare":if(!e[t])break;$('select[name="'+$(this).attr("name")+'"]').val(e[t]);break;case"authors_custom_fields[key][]":for(let t in e.authors_custom_fields)$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[key][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].key),$('select[name="'+social_post_flow.plugin_name+'_authors_custom_fields[compare][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].compare),$('input[name="'+social_post_flow.plugin_name+'_authors_custom_fields[value][]"]',$(social_post_flow.status_form)).last().val(e.authors_custom_fields[t].value),wpzinc_table_row_add("authors-custom-field",$(this).closest("table"));break;default:var s=t.match(/conditions\[([^)]+)\]/);if(s){void 0!==e.conditions[s[1]]&&$(this).val(e.conditions[s[1]]);break}var o=t.match(/terms\[([^)]+)\]/);if(o){void 0!==e.terms[o[1]]&&$(this).val(e.terms[o[1]].join(","));break}var a=t.match(/(.*?)\[(.*?)\]/);if(null!=a){$(this).val(e[a[1]][a[2]]);break}$(this).val(e[t])}})),$(social_post_flow.status_form).data("profile-id",t).attr("data-profile-id",t),$(social_post_flow.status_form).data("action",o).attr("data-action",o),$(social_post_flow.status_form).data("status-index",a).attr("data-status-index",a),$("input, select",$(social_post_flow.status_form)).conditional()}function socialPostFlowDisplayStatusForm(t,s,o){var $,a,e;$=jQuery,a=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr[data-status-index="'+o+'"]'),e=$('div.statuses[data-profile-id="'+t+'"][data-action="'+s+'"] tr.status-form-container'),$("td",e).append($(social_post_flow.status_form).removeClass("hidden")),$(a).after($(e).removeClass("hidden"))}function socialPostFlowSaveAndHideStatusForm(){var $;($=jQuery)("div.statuses div.social-post-flow-status-form").length>0&&socialPostFlowUpdateStatus($("div.statuses tr.status-form-container #social-post-flow-status-form").data("profile-id"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("action"),$("div.statuses tr.status-form-container #social-post-flow-status-form").data("status-index")),$(social_post_flow.status_form).data("profile-id","").attr("data-profile-id",""),$(social_post_flow.status_form).data("action","").attr("data-action",""),$(social_post_flow.status_form).data("status-index","").attr("data-status-index",""),$(social_post_flow.status_form_container).append($(social_post_flow.status_form))}function socialPostFlowClearStatusForm(){var $;($=jQuery)("input, select, textarea",$(social_post_flow.status_form)).each((function(){$(this).val("")})),$("tr.custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()})),$("tr.authors-custom-field:not(.hide-delete-button)",$(social_post_flow.status_form)).each((function(){$(this).remove()}))}function socialPostFlowGetStatuses(){var $,t={};return($=jQuery)("li.wpzinc-nav-tab a").each((function(){var s=$(this).attr("href").split("#profile-").pop();"default"==s?t[s]={}:(t[s]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+'][enabled]"]').is(":checked")},$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').length>0?t[s].override=$('input[type="checkbox"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').is(":checked"):t[s].override="1"==$('input[type="hidden"][name="'+social_post_flow.plugin_name+"["+s+'][override]"]').val()),$("li.wpzinc-nav-tab-horizontal a","#profile-"+s).each((function(){var o=$(this).attr("href").split("#profile-"+s+"-").pop();t[s][o]={enabled:$('input[name="'+social_post_flow.plugin_name+"["+s+"]["+o+'][enabled]"]').is(":checked"),status:[]},$("tr.status","#profile-"+s+"-"+o).each((function(){t[s][o].status.push(JSON.parse($(this).attr("data-status")))}))}))})),t}function socialPostFlowUpdateStatuses(){var t,$;return $=jQuery,t=socialPostFlowGetStatuses(),$('input[name="'+social_post_flow.plugin_name+'[statuses]"][type="hidden"]').val(JSON.stringify(t)),t}function socialPostFlowSaveStatuses(t,s){var o,$;$=jQuery,o=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_type:t,statuses:JSON.stringify(o)},error:function(t,s,o){wpzinc_modal_show_error_message_and_exit("socialPostFlowSaveStatuses(): error: "+t.status+" "+t.statusText)},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),s.length&&(t.data.post_type_enabled?($(s).addClass("enabled"),$(".notice-warning").hide()):($(s).removeClass("enabled"),$(".notice-warning").show())),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}function socialPostFlowSavePostStatuses(t,s,o,a){var e,$;$=jQuery,e=socialPostFlowGetStatuses(),wpzinc_modal_open(social_post_flow.save_statuses_modal.title,""),$.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:social_post_flow.save_statuses_action,nonce:social_post_flow.save_statuses_nonce,post_id:t,override:s,featured_image:o,additional_images:a,statuses:JSON.stringify(e)},error:function(t,s,o){wpzinc_modal_close()},success:function(t){t.success||wpzinc_modal_show_error_message_and_exit(t.data),wpzinc_modal_show_success_and_exit(social_post_flow.save_statuses_modal.title_success)}})}var socialPostFlowCharacterCounting=!1;function socialPostFlowCharacterCount(t){var $;$=jQuery,socialPostFlowCharacterCounting||(socialPostFlowCharacterCounting=!0,$.post(social_post_flow.ajax,{action:social_post_flow.character_count_action,post_id:social_post_flow.post_id,status:$(t).val(),nonce:social_post_flow.character_count_nonce},(function(s){$("span.character-count",$(t).parent()).text(s.data.character_count),setTimeout((function(){socialPostFlowCharacterCounting=!1}),3e3)})))}function socialPostFlowEnableNotSavedPrompt(){social_post_flow.prompt_unsaved_changes&&(window.onbeforeunload=function(){return!0})}function socialPostFlowDisableNotSavedPrompt(){window.onbeforeunload=null}jQuery(document).ready((function($){socialPostFlowInitTags(),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.post_type",(function(t){socialPostFlowUpdateStatusSections()})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.schedule",(function(t){socialPostFlowUpdateScheduleOptions($(this).closest("div.statuses").data("action"))})),$(social_post_flow.status_form).on("change."+social_post_flow.status_form,"select.image",(function(t){socialPostFlowUpdateImageOptions()})),$("input.enable",$("#profiles-container")).on("change",(function(t){var s=$(this).data("tab");$(this).prop("checked")?$('a[href="#'+s+'"]').addClass("enabled"):$('a[href="#'+s+'"]').removeClass("enabled"),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$("input.override",$("#profiles-container")).on("change",(function(t){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()})),$(".wpzinc-js-tabs").on("click",(function(){socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm()})),$("#profiles-container").on("click","a.button.add-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowAddStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.edit-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowEditStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("profile"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index"),JSON.parse($(this).closest("tr").attr("data-status"))),socialPostFlowEnableNotSavedPrompt()})),$(social_post_flow.status_form).on("change","input, select, textarea",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("body").on("wpzinc-media-library-attachment-added",(function(t){void 0!==$(social_post_flow.status_form).data("profile-id")&&(socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt())})),$("body").on("wpzinc-table-row-delete",(function(t){socialPostFlowUpdateStatus($(social_post_flow.status_form).data("profile-id"),$(social_post_flow.status_form).data("action"),$(social_post_flow.status_form).data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container").on("click","a.delete-status",(function(t){t.preventDefault(),socialPostFlowSaveAndHideStatusForm(),socialPostFlowClearStatusForm(),socialPostFlowDeleteStatus($(this).closest("div.statuses").data("profile-id"),$(this).closest("div.statuses").data("action"),$(this).closest("tr").data("status-index")),socialPostFlowEnableNotSavedPrompt()})),$("#profiles-container div.statuses").length>0&&$("#profiles-container div.statuses").sortable({containment:"parent",items:".sortable",stop:function(t,s){var o=$(s.item),a=$(o).closest("div.statuses");socialPostFlowReindexStatuses($(a)),socialPostFlowUpdateStatuses(),socialPostFlowEnableNotSavedPrompt()}}),$("#profiles-container div.statuses").bind("click.sortable mousedown.sortable",(function(t){t.target.focus()})),social_post_flow.post_id>0&&$("textarea.text",$(social_post_flow.status_form)).on("keyup change",(function(t){socialPostFlowCharacterCount(this)})),$("form#social-post-flow").on("submit",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses(),socialPostFlowSaveStatuses(social_post_flow.post_type,$('h2.nav-tab-wrapper a[data-post-type="'+social_post_flow.post_type+'"]'))})),$("button."+social_post_flow.plugin_name+"-save-post-statuses").on("click",(function(t){t.preventDefault(),socialPostFlowDisableNotSavedPrompt(),socialPostFlowUpdateStatuses();var s=[];for(i=0;i<=10;i++)$('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').length&&s.push($('input[name="'+social_post_flow.plugin_name+"[additional_images]["+i+']"]').val());socialPostFlowSavePostStatuses(social_post_flow.post_id,$('select[name="'+social_post_flow.plugin_name+'[override]"]').val(),$('input[name="'+social_post_flow.plugin_name+'[featured_image]"]').val(),s)}))})); -
social-post-flow/trunk/assets/js/statuses.js
r3344663 r3345152 466 466 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 467 467 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 468 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 469 break; 470 471 case 'pinterest': 472 $( 'option[value="text"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 473 $( 'option[value="link"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 474 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 475 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 476 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 468 477 break; 469 478 … … 473 482 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 474 483 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 484 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 475 485 break; 476 486 … … 480 490 $( 'option[value="image"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', false ); 481 491 $( 'option[value="story"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 492 $( 'option[value="pin"]', $( 'select.post_type', $( social_post_flow.status_form ) ) ).attr( 'disabled', true ); 482 493 break; 483 494 } … … 510 521 case 'story': 511 522 $( '.link', $( social_post_flow.status_form ) ).hide(); 523 $( '.images', $( social_post_flow.status_form ) ).show(); 524 break; 525 526 case 'pin': 527 $( '.link', $( social_post_flow.status_form ) ).show(); 512 528 $( '.images', $( social_post_flow.status_form ) ).show(); 513 529 break; -
social-post-flow/trunk/assets/scss/admin.scss
r3336429 r3345152 249 249 } 250 250 } 251 &.pinterest { 252 a { 253 background-image: url(../../_modules/dashboard/feather/pinterest.svg); 254 background-size: 16px 16px; 255 } 256 } 251 257 } 252 258 } -
social-post-flow/trunk/includes/class-social-post-flow-admin.php
r3344663 r3345152 452 452 'input.url', 453 453 'textarea.text-to-image', 454 455 // Pinterest.456 'input#pinterest_title',457 'input#pinterest_source_url',458 459 // Google Business.460 'input#googlebusiness_title',461 'input#googlebusiness_code',462 'input#googlebusiness_terms',463 454 ), 464 455 'triggers' => array( -
social-post-flow/trunk/includes/class-social-post-flow-common.php
r3344663 r3345152 82 82 'conditions' => array( 83 83 'provider' => array( 'instagram' ), 84 ), 85 ), 86 'pin' => array( 87 'label' => __( 'Pin', 'social-post-flow' ), 88 'conditions' => array( 89 'provider' => array( 'pinterest' ), 84 90 ), 85 91 ), -
social-post-flow/trunk/includes/class-social-post-flow-publish.php
r3344663 r3345152 1611 1611 // Build API compatible arguments. 1612 1612 $args = array( 1613 'post_type' => $status['post_type'], 1613 'post_type' => ( $service === 'pinterest' ? 'pin' : $status['post_type'] ), 1614 'profile_ids' => array( $profile_id ), 1614 1615 'text' => $this->parse_text( $post, $status['text'] ), 1615 'first_comment' => $this->parse_text( $post, $status['first_comment'] ), 1616 'profile_ids' => array( $profile_id ), 1616 'first_comment' => ( $service !== 'mastodon' ? $this->parse_text( $post, $status['first_comment'] ) : null ), 1617 1617 ); 1618 1618 1619 // Remove first comment for Mastodon and Instagram Story posts. 1620 if ( $service === 'mastodon' || $status['post_type'] === 'story' ) { 1621 unset( $args['first_comment'] ); 1622 } 1623 1624 // URL and Image. 1625 switch ( $status['post_type'] ) { 1626 /** 1627 * Text 1628 */ 1629 case 'text': 1630 // No image or URL. 1631 break; 1632 1619 // URL. 1620 switch ( $args['post_type'] ) { 1633 1621 /** 1634 1622 * Link 1635 1623 */ 1636 1624 case 'link': 1637 $args['url'] = $this->get_permalink( $post ); 1625 $args['url'] = $this->parse_text( $post, $status['url'] ); 1626 1627 // If the URL is empty, use the Post's URL, as a URL is required. 1628 if ( empty( $args['url'] ) ) { 1629 $args['url'] = $this->get_permalink( $post ); 1630 } 1638 1631 break; 1639 1632 1640 1633 /** 1641 * Image 1642 * IG: Story 1634 * Pinterest 1643 1635 */ 1636 case 'pin': 1637 // Get URL. 1638 $url = $this->parse_text( $post, $status['url'] ); 1639 1640 // If URL is empty, don't include it in the args. 1641 if ( empty( $url ) ) { 1642 break; 1643 } 1644 1645 // Add URL to args. 1646 $args['url'] = $url; 1647 break; 1648 1649 /** 1650 * IG Story 1651 * - Remove first comment. 1652 */ 1653 case 'story': 1654 unset( $args['first_comment'] ); 1655 break; 1656 } 1657 1658 // Image(s). 1659 switch ( $args['post_type'] ) { 1660 case 'pin': 1661 case 'story': 1644 1662 case 'image': 1645 case 'story':1646 1663 switch ( $status['image'] ) { 1647 1664 /** … … 1721 1738 1722 1739 } 1723 break;1724 1740 } 1725 1741 … … 1994 2010 * Text 1995 2011 * Link 2012 * Pin 2013 * Story 1996 2014 */ 1997 2015 case 'text': 1998 2016 case 'link': 2017 case 'pin': 2018 case 'story': 1999 2019 // No additional images supported. 2000 2020 break; … … 2002 2022 /** 2003 2023 * Image 2004 * Story2005 2024 * Integrations (e.g. ACF) 2006 2025 */ 2007 2026 case 'image': 2008 case 'story':2009 2027 switch ( $status['image_additional'] ) { 2010 2028 case '': -
social-post-flow/trunk/readme.txt
r3344663 r3345152 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 14 14 == Description == 15 15 16 Auto matically publishyour Posts, Pages, Events, Products and more to Facebook, X / Twitter, Threads, Instagram, Mastodon and more with Social Post Flow.16 Auto post your Posts, Pages, Events, Products and more to Facebook, X / Twitter, Threads, Instagram, Mastodon and more with Social Post Flow. 17 17 18 18 Don't have a Social Post Flow account? Pricing starts at $99/year for 10 social accounts, and you can [sign up for a free 7 day trial](https://app.socialpostflow.com/register) 19 20 See our quick start tutorial to auto publish your WordPress content: 19 21 20 22 [youtube https://www.youtube.com/watch?v=IFjYKMjnRB4] … … 79 81 There's no need to mess around with App IDs, authorization tokens or complicated technical steps. 80 82 81 Connecting your social media profiles is done in a few clicks through Buffer, taking minutes.83 Connecting your social media profiles is done in a few clicks through Social Post Flow, taking minutes. 82 84 83 85 Then just choose which of those profiles to use in the plugin, set your status message and your social media scheduling is set. 84 86 87 === Supports Twitter / X === 88 89 If you're a Jetpack Social, Blog2Social or NextScripts Social Networks Auto-Poster user looking for a replacement to auto publish to Twitter / X, Social Post Flow is one of the best auto post to Twitter / X solutions that still works. 90 85 91 === What can I do with Social Post Flow? === 86 92 87 - Automatically share Posts, Pages and Custom Post Types to social media when scheduling, publishing or updating your WordPress content93 - Automatically share and auto post your WordPress Posts, Pages and Custom Post Types to social media when scheduling, publishing or updating your WordPress content 88 94 - Define the status text dynamically, pulling in your WordPress Post's Title, Content, Excerpt and more 89 95 - WordPress to Facebook Page Auto Post … … 123 129 Our aim is to provide a competitively priced, well featured Plugin and service without breaking the bank. 124 130 131 = Can I still auto publish to Twitter / X? = 132 133 Yes! You can still auto publish to Twitter / X with the Social Post Flow WordPress Plugin. 134 125 135 = Which Social Media Profiles can I auto post / auto publish to with Social Post Flow? = 126 136 … … 144 154 == Changelog == 145 155 156 = 1.0.2 (2025-08-15) = 157 * Fix: Status: Link: Honor value in Link field, instead of always using the Post's URL 158 146 159 = 1.0.1 (2025-08-14) = 147 160 * Added: Logs: Search: Search `Status Response` when performing a search -
social-post-flow/trunk/social-post-flow.php
r3344663 r3345152 9 9 * Plugin Name: Social Post Flow 10 10 * Plugin URI: http://www.socialpostflow.com/integrations/wordpress 11 * Version: 1.0. 111 * Version: 1.0.2 12 12 * Author: Social Post Flow 13 13 * Author URI: http://www.socialpostflow.com … … 28 28 29 29 // Define Plugin version and build date. 30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.0. 1' );31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-08-1 418:00:00' );30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.0.2' ); 31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-08-15 18:00:00' ); 32 32 33 33 // Define Plugin paths. -
social-post-flow/trunk/views/settings-post-actionheader.php
r3344663 r3345152 73 73 $override = $this->get_setting( $post_type, '[' . $profile_id . '][override]', 0 ); 74 74 $disabled = false; 75 if ( isset( $profile['provider'] ) && $profile['provider'] === 'pinterest' ) {76 if ( ! isset( $profile['can_be_subprofile'] ) || ! $profile['can_be_subprofile'] ) {77 // Subprofile is required.78 $override = 1;79 $disabled = true;80 }81 }82 75 83 76 // If Override is Disabled, store the value in a hidden field.
Note: See TracChangeset
for help on using the changeset viewer.