Changeset 1766858
- Timestamp:
- 11/15/2017 10:12:04 AM (8 years ago)
- Location:
- wp-to-buffer/trunk
- Files:
-
- 1 added
- 14 edited
-
assets/css/admin.css (modified) (1 diff)
-
assets/js/admin.js (modified) (10 diffs)
-
assets/js/min/admin-min.js (modified) (1 diff)
-
assets/scss/admin.scss (modified) (6 diffs)
-
includes/admin/admin.php (modified) (4 diffs)
-
includes/admin/install.php (added)
-
includes/admin/log.php (modified) (3 diffs)
-
includes/admin/publish.php (modified) (2 diffs)
-
includes/admin/settings.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
views/settings-post-action.php (modified) (2 diffs)
-
views/settings-post-actionheader.php (modified) (1 diff)
-
views/settings-post.php (modified) (2 diffs)
-
views/settings.php (modified) (3 diffs)
-
wp-to-buffer.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-to-buffer/trunk/assets/css/admin.css
r1735682 r1766858 1 .ui-datepicker{background:#fff;padding:5px}.ui-datepicker .ui-datepicker-header a span{visibility:hidden;display:inline-block;width:20px;height:20px}.ui-datepicker .ui-datepicker-header a span::before{visibility:visible;display:inline-block;width:20px;height:20px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top}.ui-datepicker .ui-datepicker-header a.ui-datepicker-prev{float:left}.ui-datepicker .ui-datepicker-header a.ui-datepicker-prev span.ui-icon-circle-triangle-w{float:left}.ui-datepicker .ui-datepicker-header a.ui-datepicker-prev span.ui-icon-circle-triangle-w::before{content:"\f341"}.ui-datepicker .ui-datepicker-header a.ui-datepicker-next{float:right}.ui-datepicker .ui-datepicker-header a.ui-datepicker-next span.ui-icon-circle-triangle-e{float:right}.ui-datepicker .ui-datepicker-header a.ui-datepicker-next span.ui-icon-circle-triangle-e::before{content:"\f345"}.ui-datepicker .ui-datepicker-header a.ui-state-disabled{color:#eee}.ui-datepicker div.ui-datepicker-title{font-size:12px;line-height:20px;text-align:center}.ui-datepicker table.ui-datepicker-calendar tbody tr td{text-align:center}.ui-datepicker table.ui-datepicker-calendar tbody tr td a{text-decoration:none}.option.progressbar .ui-progressbar{height:2em;text-align:left;overflow:hidden}.option.progressbar .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.option.progressbar .ui-progressbar .ui-progressbar-overlay{background:green;height:100%;filter:alpha(opacity=25);opacity:0.25}.option.progressbar .ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.option.progressbar .ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.option.progressbar .ui-widget .ui-widget{font-size:1em}.option.progressbar .ui-widget input,.option.progressbar .ui-widget select,.option.progressbar .ui-widget textarea,.option.progressbar .ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.option.progressbar .ui-widget-content{border:1px solid #dddddd;background:#eeeeee;color:#333333}.option.progressbar .ui-widget-content a{color:#333333}.option.progressbar .ui-widget-header{border:1px solid #e78f08;background:green;color:#ffffff;font-weight:bold}.option.progressbar .ui-widget-header a{color:#ffffff}li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image,li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image{background:url(../images/icons/buffer-dark.svg) center no-repeat;background-size:16px 16px}li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image img,li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image img{display:none}body.admin-color-fresh li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image,body.admin-color-fresh li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image,body.admin-color-midnight li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image,body.admin-color-midnight li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image{background:url(../images/icons/buffer-light.svg) center no-repeat;background-size:16px 16px}body.post-php #wp-to-buffer-pro:not(.closed),body.post-new-php #wp-to-buffer-pro:not(.closed){border:none;box-shadow:none;background:none}body.post-php #wp-to-buffer-pro>.hndle,body.post-new-php #wp-to-buffer-pro>.hndle{background:#fff;border-top:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #wp-to-buffer-pro div.inside,body.post-new-php #wp-to-buffer-pro div.inside{margin:0;padding:0}body.post-php #wp-to-buffer-pro div.inside>div.option,body.post-new-php #wp-to-buffer-pro div.inside>div.option{border-right:1px solid #dfdfdf;border-left:1px solid #dfdfdf}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override{display:none;margin:20px 0 0 0}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override h3.nav-tab-wrapper,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override h3.nav-tab-wrapper{margin-bottom:0 !important}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.option,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.option{margin:0 0 20px 0;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.panel>div.sub-panel,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.panel>div.sub-panel{background:#fff;padding:12px;border-right:1px solid #ccc;border-left:1px solid #ccc;border-bottom:1px solid #ccc}body.post-php #wp-to-buffer-pro-log div.inside,body.post-new-php #wp-to-buffer-pro-log div.inside{margin:0;padding:0}body.post-php #wp-to-buffer-pro-log div.inside div.option table thead tr th,body.post-new-php #wp-to-buffer-pro-log div.inside div.option table thead tr th{font-weight:700}body.post-php #wp-to-buffer-pro-log div.inside div.option table tbody tr td,body.post-new-php #wp-to-buffer-pro-log div.inside div.option table tbody tr td{border-bottom:1px solid #eee}body.post-php #wp-to-buffer-pro-log div.inside div.option table tbody tr.error td,body.post-new-php #wp-to-buffer-pro-log div.inside div.option table tbody tr.error td{background:red}body.post-php #wp-to-buffer-pro-image div.inside,body.post-new-php #wp-to-buffer-pro-image div.inside{margin:0;padding:0}body.wpzinc.wp-to-buffer div.wrap h1.wp-heading-inline,body.wpzinc.wp-to-buffer-pro div.wrap h1.wp-heading-inline{background-image:url(../images/icons/buffer-light.svg);background-position:25px 50%;background-repeat:no-repeat;background-size:32px 32px}#wp-to-buffer-pro h3.nav-tab-wrapper{margin-bottom:20px !important}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab{width:48px;padding:20px 14px 6px 14px}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab.image{width:48px;height:48px;margin-bottom:-10px;padding:5px}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span{position:absolute;display:inline-block;width:16px;height:16px;margin:0 0 0 -16px}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.facebook{background:url(../images/icons/facebook.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.twitter{background:url(../images/icons/twitter.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.linkedin{background:url(../images/icons/linkedin.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.google{background:url(../images/icons/google.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.pinterest{background:url(../images/icons/pinterest.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.instagram{background:url(../images/icons/instagram.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab img{position:relative;float:left;width:48px;height:48px}#wp-to-buffer-pro div.postbox{display:inline-block;width:100%}#wp-to-buffer-pro div.postbox h3.hndle label{float:right;font-weight:normal}#wp-to-buffer-pro div.postbox div.statuses{float:left;width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option{float:left;width:100%;box-sizing:border-box}#wp-to-buffer-pro div.postbox div.statuses div.option div.number{position:relative;z-index:2;float:left;width:52px;box-sizing:border-box;text-align:center}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.count{display:inline-block;width:32px;height:32px;line-height:32px;cursor:move;border:1px solid #bbb;border-radius:50%;text-decoration:none}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.delete{display:inline-block;width:32px;height:32px;line-height:32px}#wp-to-buffer-pro div.postbox div.statuses div.option div.status{position:relative;z-index:1;float:right;width:100%;box-sizing:border-box;margin:-65px 0 0 0;padding:0 0 0 60px}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.full textarea{float:left}#wp-to-buffer-pro div.postbox div.statuses div.option div.status select.tags{margin-bottom:5px}#wp-to-buffer-pro div.postbox div.statuses div.option div.status p:first-child{margin:0 0 10px 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions h3{margin:10px 0 0 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions hr{clear:both;float:left;width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions div.full{margin:0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions div.full div.right select{margin:0 0 5px 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions div.full div.right span.terms{display:block;width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option.first div.number a.delete{display:none}#wp-to-buffer-pro div.postbox div.statuses div.option.first div.status{margin:-32px 0 0 0}@media only screen and (max-width: 768px){#wp-to-buffer-pro div.postbox div.statuses div.option div.number{width:100%;margin:0 0 10px 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.count{float:left}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.delete{float:right}#wp-to-buffer-pro div.postbox div.statuses div.option div.status{clear:both;float:left;margin:0;padding:0}#wp-to-buffer-pro div.postbox div.statuses div.option.first div.status{margin:0}}@media only screen and (max-width: 480px){#wp-to-buffer-pro div.postbox div.statuses div.option div.status select.tags{width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option div.status select.right{clear:both;float:left;width:100%}}1 body.wpzinc .ui-datepicker{background:#fff;padding:5px}body.wpzinc .ui-datepicker .ui-datepicker-header a span{visibility:hidden;display:inline-block;width:20px;height:20px}body.wpzinc .ui-datepicker .ui-datepicker-header a span::before{visibility:visible;display:inline-block;width:20px;height:20px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top}body.wpzinc .ui-datepicker .ui-datepicker-header a.ui-datepicker-prev{float:left}body.wpzinc .ui-datepicker .ui-datepicker-header a.ui-datepicker-prev span.ui-icon-circle-triangle-w{float:left}body.wpzinc .ui-datepicker .ui-datepicker-header a.ui-datepicker-prev span.ui-icon-circle-triangle-w::before{content:"\f341"}body.wpzinc .ui-datepicker .ui-datepicker-header a.ui-datepicker-next{float:right}body.wpzinc .ui-datepicker .ui-datepicker-header a.ui-datepicker-next span.ui-icon-circle-triangle-e{float:right}body.wpzinc .ui-datepicker .ui-datepicker-header a.ui-datepicker-next span.ui-icon-circle-triangle-e::before{content:"\f345"}body.wpzinc .ui-datepicker .ui-datepicker-header a.ui-state-disabled{color:#eee}body.wpzinc .ui-datepicker div.ui-datepicker-title{font-size:12px;line-height:20px;text-align:center}body.wpzinc .ui-datepicker table.ui-datepicker-calendar tbody tr td{text-align:center}body.wpzinc .ui-datepicker table.ui-datepicker-calendar tbody tr td a{text-decoration:none}body.wpzinc .option.progressbar .ui-progressbar{height:2em;text-align:left;overflow:hidden}body.wpzinc .option.progressbar .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}body.wpzinc .option.progressbar .ui-progressbar .ui-progressbar-overlay{background:green;height:100%;filter:alpha(opacity=25);opacity:0.25}body.wpzinc .option.progressbar .ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}body.wpzinc .option.progressbar .ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}body.wpzinc .option.progressbar .ui-widget .ui-widget{font-size:1em}body.wpzinc .option.progressbar .ui-widget input,body.wpzinc .option.progressbar .ui-widget select,body.wpzinc .option.progressbar .ui-widget textarea,body.wpzinc .option.progressbar .ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}body.wpzinc .option.progressbar .ui-widget-content{border:1px solid #dddddd;background:#eeeeee;color:#333333}body.wpzinc .option.progressbar .ui-widget-content a{color:#333333}body.wpzinc .option.progressbar .ui-widget-header{border:1px solid #e78f08;background:green;color:#ffffff;font-weight:bold}body.wpzinc .option.progressbar .ui-widget-header a{color:#ffffff}li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image,li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image{background:url(../images/icons/buffer-dark.svg) center no-repeat;background-size:16px 16px}li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image img,li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image img{display:none}body.admin-color-fresh li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image,body.admin-color-fresh li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image,body.admin-color-midnight li.toplevel_page_wp-to-buffer-settings a div.wp-menu-image,body.admin-color-midnight li.toplevel_page_wp-to-buffer-pro a div.wp-menu-image{background:url(../images/icons/buffer-light.svg) center no-repeat;background-size:16px 16px}body.post-php #wp-to-buffer-pro:not(.closed),body.post-new-php #wp-to-buffer-pro:not(.closed){border:none;box-shadow:none;background:none}body.post-php #wp-to-buffer-pro>.hndle,body.post-new-php #wp-to-buffer-pro>.hndle{background:#fff;border-top:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #wp-to-buffer-pro div.inside,body.post-new-php #wp-to-buffer-pro div.inside{margin:0;padding:0}body.post-php #wp-to-buffer-pro div.inside>div.option,body.post-new-php #wp-to-buffer-pro div.inside>div.option{border-right:1px solid #dfdfdf;border-left:1px solid #dfdfdf}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override{display:none;margin:20px 0 0 0}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override h3.nav-tab-wrapper,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override h3.nav-tab-wrapper{margin-bottom:0 !important}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.option,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.option{margin:0 0 20px 0;border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5}body.post-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.panel>div.sub-panel,body.post-new-php #wp-to-buffer-pro div.inside #wp-to-buffer-pro-override>div.panel>div.sub-panel{background:#fff;padding:12px;border-right:1px solid #ccc;border-left:1px solid #ccc;border-bottom:1px solid #ccc}body.post-php #wp-to-buffer-pro-log div.inside,body.post-new-php #wp-to-buffer-pro-log div.inside{margin:0;padding:0}body.post-php #wp-to-buffer-pro-log div.inside div.option table thead tr th,body.post-new-php #wp-to-buffer-pro-log div.inside div.option table thead tr th{font-weight:700}body.post-php #wp-to-buffer-pro-log div.inside div.option table tbody tr td,body.post-new-php #wp-to-buffer-pro-log div.inside div.option table tbody tr td{border-bottom:1px solid #eee}body.post-php #wp-to-buffer-pro-log div.inside div.option table tbody tr.success td,body.post-new-php #wp-to-buffer-pro-log div.inside div.option table tbody tr.success td{background:lightgreen}body.post-php #wp-to-buffer-pro-log div.inside div.option table tbody tr.error td,body.post-new-php #wp-to-buffer-pro-log div.inside div.option table tbody tr.error td{background:orange}body.post-php #wp-to-buffer-pro-image div.inside,body.post-new-php #wp-to-buffer-pro-image div.inside{margin:0;padding:0}body.wpzinc.wp-to-buffer div.wrap h1.wp-heading-inline,body.wpzinc.wp-to-buffer-pro div.wrap h1.wp-heading-inline{background-image:url(../images/icons/buffer-light.svg);background-position:25px 50%;background-repeat:no-repeat;background-size:32px 32px}body.wpzinc.wp-to-buffer h2.nav-tab-wrapper a.nav-tab,body.wpzinc.wp-to-buffer-pro h2.nav-tab-wrapper a.nav-tab{position:relative;margin-right:5px}body.wpzinc.wp-to-buffer h2.nav-tab-wrapper a.nav-tab.enabled,body.wpzinc.wp-to-buffer-pro h2.nav-tab-wrapper a.nav-tab.enabled{color:green}body.wpzinc.wp-to-buffer h2.nav-tab-wrapper a.nav-tab.error,body.wpzinc.wp-to-buffer-pro h2.nav-tab-wrapper a.nav-tab.error{color:red}body.wpzinc.wp-to-buffer h2.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-yes,body.wpzinc.wp-to-buffer-pro h2.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-yes{position:absolute;display:inline-block;top:-8px;right:-8px;background-color:green;color:white;border-radius:50%}body.wpzinc.wp-to-buffer h2.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-yes::before,body.wpzinc.wp-to-buffer-pro h2.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-yes::before{margin-left:-2px}body.wpzinc.wp-to-buffer h2.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-warning,body.wpzinc.wp-to-buffer-pro h2.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-warning{position:absolute;display:inline-block;top:-8px;right:-8px;color:red;border-radius:50%}#wp-to-buffer-pro h3.nav-tab-wrapper{margin-bottom:20px !important}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab{position:relative;width:48px;margin-right:5px;padding:20px 14px 6px 14px}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab.image{width:48px;height:48px;margin-bottom:-10px;padding:5px}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-yes{position:absolute;z-index:2;display:inline-block;top:-8px;right:-8px;background-color:green;color:white;border-radius:50%}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.dashicons.dashicons-yes::before{margin-left:-2px}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.network{position:absolute;display:inline-block;width:16px;height:16px;top:0;left:0;z-index:2}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.network.facebook{background:url(../images/icons/facebook.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.network.twitter{background:url(../images/icons/twitter.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.network.linkedin{background:url(../images/icons/linkedin.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.network.google{background:url(../images/icons/google.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.network.pinterest{background:url(../images/icons/pinterest.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab span.network.instagram{background:url(../images/icons/instagram.png) top left no-repeat}#wp-to-buffer-pro h3.nav-tab-wrapper a.nav-tab img{position:relative;float:left;width:48px;height:48px;z-index:1}#wp-to-buffer-pro div.postbox{display:inline-block;width:100%}#wp-to-buffer-pro div.postbox h3.hndle label{float:right;font-weight:normal}#wp-to-buffer-pro div.postbox div.statuses{float:left;width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option{float:left;width:100%;box-sizing:border-box}#wp-to-buffer-pro div.postbox div.statuses div.option div.number{position:relative;z-index:2;float:left;width:52px;box-sizing:border-box;text-align:center}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.count{display:inline-block;width:32px;height:32px;line-height:32px;cursor:move;border:1px solid #bbb;border-radius:50%;text-decoration:none}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.delete{display:inline-block;width:32px;height:32px;line-height:32px}#wp-to-buffer-pro div.postbox div.statuses div.option div.status{position:relative;z-index:1;float:right;width:100%;box-sizing:border-box;margin:-65px 0 0 0;padding:0 0 0 60px}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.full textarea{float:left}#wp-to-buffer-pro div.postbox div.statuses div.option div.status select.tags{margin-bottom:5px}#wp-to-buffer-pro div.postbox div.statuses div.option div.status p:first-child{margin:0 0 10px 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions h3{margin:10px 0 0 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions hr{clear:both;float:left;width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions div.full{margin:0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions div.full div.right select{margin:0 0 5px 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.status div.conditions div.full div.right span.terms{display:block;width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option.first div.number a.delete{display:none}#wp-to-buffer-pro div.postbox div.statuses div.option.first div.status{margin:-32px 0 0 0}@media only screen and (max-width: 768px){#wp-to-buffer-pro div.postbox div.statuses div.option div.number{width:100%;margin:0 0 10px 0}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.count{float:left}#wp-to-buffer-pro div.postbox div.statuses div.option div.number a.delete{float:right}#wp-to-buffer-pro div.postbox div.statuses div.option div.status{clear:both;float:left;margin:0;padding:0}#wp-to-buffer-pro div.postbox div.statuses div.option.first div.status{margin:0}}@media only screen and (max-width: 480px){#wp-to-buffer-pro div.postbox div.statuses div.option div.status select.tags{width:100%}#wp-to-buffer-pro div.postbox div.statuses div.option div.status select.right{clear:both;float:left;width:100%}} -
wp-to-buffer/trunk/assets/js/admin.js
r1595732 r1766858 114 114 } 115 115 reinit_tags(); 116 117 /** 118 * select4 119 */ 120 var reinit_select4 = function() { 121 // Reinit select4 122 if ( typeof select4 !== 'undefined' ) { 123 $( '.wpzinc-select2' ).select4( { 124 ajax: { 125 url: wp_to_buffer_pro.ajax, 126 dataType: 'json', 127 delay: 250, 128 data: function( params ) { 129 130 return { 131 action: 'wp_to_buffer_pro_search_terms', 132 taxonomy: $( this ).data( 'taxonomy' ), 133 q: params.term, 134 page: params.page 135 }; 136 137 }, 138 processResults: function( data, params ) { 139 return { 140 results: data.data, 141 }; 142 }, 143 cache: false 144 }, 145 minimumInputLength: 3, 146 } ); 147 } 148 } 149 reinit_select4(); 116 150 117 151 /** … … 119 153 */ 120 154 $( 'a.button.add-status' ).on( 'click', function( e ) { 121 e.preventDefault(); 155 156 e.preventDefault(); 157 158 // Destroy select4 instances 159 $( '.wpzinc-select2' ).select4( 'destroy' ); 122 160 123 161 // Setup vars … … 134 172 135 173 // Reload sortable 136 $( 'div.statuses' ).sortable( 'refresh' ); 174 if ( typeof sortable !== 'undefined' ) { 175 $( 'div.statuses' ).sortable( 'refresh' ); 176 } 137 177 138 178 // Reload conditionals … … 142 182 reinit_tags(); 143 183 144 }); 184 // Reinit select4 185 reinit_select4(); 186 187 } ); 145 188 146 189 /** … … 163 206 164 207 /** 208 * Copy Conditional Select Dropdown values to hidden field 209 */ 210 $( 'body' ).on( 'select4:select', 'select', function( e ) { 211 212 // Implode into comma separated string 213 var term_ids = ( $( this ).val() === null ? '' : $( this ).val().join() ); 214 215 // Store term IDs in hidden field near to the select dropdown 216 $( 'input.term-ids', $( this ).closest( 'span.terms' ) ).val( term_ids ); 217 218 } ); 219 $( 'body' ).on( 'select4:unselect', 'select', function( e ) { 220 221 // Implode into comma separated string 222 var term_ids = ( $( this ).val() === null ? '' : $( this ).val().join() ); 223 224 // Store term IDs in hidden field near to the select dropdown 225 $( 'input.term-ids', $( this ).closest( 'span.terms' ) ).val( term_ids ); 226 227 } ); 228 229 /** 165 230 * Force focus on inputs, so they can be accessed on mobile. 166 231 * For some reason using jQuery UI sortable prevents us accessing textareas on mobile … … 175 240 */ 176 241 $( 'div.sub-panel' ).on( 'click', 'a.delete', function( e ) { 242 177 243 e.preventDefault(); 178 244 … … 193 259 reindex_statuses( $( statuses_container ) ); 194 260 195 }); 261 // Reload select4 262 $( '.wpzinc-select2' ).select4( 'destroy' ); 263 reinit_select4(); 264 265 } ); 196 266 197 267 /** … … 206 276 // Find all sortable options in the status container (these are individual statuses) 207 277 // and reindex them from 1 208 $( 'div.option.sortable', $( statuses_container ) ).each( function( i ) {278 $( 'div.option.sortable', $( statuses_container ) ).each( function( i ) { 209 279 $( 'div.number a.count ', $( this ) ).html( '#' + ( i + 1 ) ); 210 280 … … 215 285 $( this ).removeClass( 'first' ); 216 286 } 217 } );287 } ); 218 288 219 289 } … … 228 298 }); 229 299 } 300 301 /** 302 * Bulk Publishing: Add Table Row (Condition) 303 */ 304 $( 'a.button.add-table-row' ).on( 'click', function( e ) { 305 306 e.preventDefault(); 307 308 // Setup vars 309 var button = $( this ), 310 table = $( button ).closest( 'table' ), 311 row = $( 'tbody tr:first-child', $( table ) ); 312 313 // Clone row 314 $( 'tbody tr:last-child', $( table ) ).after( '<tr>' + $( row ).html() + '</tr>' ); 315 316 } ); 317 318 /** 319 * Bulk Publishing: Delete Table Row (Condition) 320 */ 321 $( document ).on( 'click', 'a.button.delete-table-row', function( e ) { 322 323 e.preventDefault(); 324 325 // Setup vars 326 var button = $( this ), 327 row = $( this ).closest( 'tr' ); 328 329 // Remove row 330 $( row ).remove(); 331 332 } ); 230 333 231 334 /** -
wp-to-buffer/trunk/assets/js/min/admin-min.js
r1595732 r1766858 1 jQuery(document).ready(function($){var t=!1,e=function(){t||$("div.sub-panel").each(function(){if("block"==$(this).css("display")){var e=this,o=[];$("div.status textarea",$(e)).each(function(){o.push($(this).val())}),t=!0,$.post(wp_to_buffer_pro.ajax,{action:"wp_to_buffer_pro_character_count",post_id:wp_to_buffer_pro.post_id,statuses:o,nonce:wp_to_buffer_pro.character_count_nonce},function(o){$("div.status textarea",$(e)).each(function(t){$("span.character-count",$(this).parent()).text(o.data.parsed_statuses[t].length)}),t=!1})}})};$("#wp-to-buffer-pro-override .nav-tab-wrapper a").on("click",function(t){e()}),$('#wp-to-buffer-pro-override input[type="checkbox"]').on("change",function(t){e()}),$("#wp-to-buffer-pro-override div.status textarea").on("change",function(t){e()}),$("#wp-to-buffer-pro-override a.button.add-status").on("change",function(t){e()}),$("#wp-to-buffer-pro-log a.clear-log").on("click",function(t){t.preventDefault() ;var e=confirm(wp_to_buffer_pro.clear_log_message);e&&$.post(wp_to_buffer_pro.ajax,{action:"wp_to_buffer_pro_clear_log",post:$("input[name=post_ID]").val(),"wp-to-buffer-pro-clear-log":1,nonce:wp_to_buffer_pro.clear_log_nonce},function(t){"1"==t&&$("#wp-to-buffer-pro-log table.widefat tbody").html('<tr><td colspan="3">'+wp_to_buffer_pro.clear_log_completed+"</td></tr>")})});var o=function(){$("select.tags").each(function(){$(this).unbind("change.wp-to-buffer-pro").on("change.wp-to-buffer-pro",function(t){var e=$(this).val(),o=$(this).closest("div.status"),a=$("textarea",$(o)),r=$(a).val();$(a).val(r+=" "+e).trigger("change")})})};o(),$("a.button.add-status").on("click",function(t){t.preventDefault();var e=$(this),r=$(e).parent(),n=$(e).closest("div.statuses"),s=$(r).prev().html();$(r).before('<div class="option sortable">'+s+"</div>"),a($(n)),$("div.statuses").sortable("refresh"),$("input,select").conditional(),o()}),"undefined"!=typeof sortable&&$("div.statuses").sortable({containment:"parent",items:".sortable",stop:function(t,e){var o=$(e.item),r=$(o).closest("div.statuses");a($(r))}}),$("div.statuses").bind("click.sortable mousedown.sortable",function(t){t.target.focus()}),$("div.sub-panel").on("click","a.delete",function(t){t.preventDefault();var e=confirm(wp_to_buffer_pro.delete_status_message);if(e){var o=$(this).closest("div.option"),r=$(o).closest("div.statuses");$(o).remove(),a($(r))}});var a=function(t){$("div.option.sortable",$(t)).each(function(t){$("div.number a.count ",$(this)).html("#"+(t+1)),0==t?$(this).addClass("first"):$(this).removeClass("first")})};"undefined"!=typeof datepicker&&$("input.datepicker").datepicker({dateFormat:"yy-mm-dd",maxDate:0}),$("body.wp-to-buffer-pro_page_wp-to-buffer-pro-bulk-publish").on("change","input[name=toggle]",function(t){$(this).is(":checked")?$("ul.categorychecklist input[type=checkbox]").prop("checked",!0):$("ul.categorychecklist input[type=checkbox]").prop("checked",!1)})});1 jQuery(document).ready(function($){var t=!1,e=function(){t||$("div.sub-panel").each(function(){if("block"==$(this).css("display")){var e=this,o=[];$("div.status textarea",$(e)).each(function(){o.push($(this).val())}),t=!0,$.post(wp_to_buffer_pro.ajax,{action:"wp_to_buffer_pro_character_count",post_id:wp_to_buffer_pro.post_id,statuses:o,nonce:wp_to_buffer_pro.character_count_nonce},function(o){$("div.status textarea",$(e)).each(function(t){$("span.character-count",$(this).parent()).text(o.data.parsed_statuses[t].length)}),t=!1})}})};$("#wp-to-buffer-pro-override .nav-tab-wrapper a").on("click",function(t){e()}),$('#wp-to-buffer-pro-override input[type="checkbox"]').on("change",function(t){e()}),$("#wp-to-buffer-pro-override div.status textarea").on("change",function(t){e()}),$("#wp-to-buffer-pro-override a.button.add-status").on("change",function(t){e()}),$("#wp-to-buffer-pro-log a.clear-log").on("click",function(t){t.preventDefault(),confirm(wp_to_buffer_pro.clear_log_message)&&$.post(wp_to_buffer_pro.ajax,{action:"wp_to_buffer_pro_clear_log",post:$("input[name=post_ID]").val(),"wp-to-buffer-pro-clear-log":1,nonce:wp_to_buffer_pro.clear_log_nonce},function(t){"1"==t&&$("#wp-to-buffer-pro-log table.widefat tbody").html('<tr><td colspan="3">'+wp_to_buffer_pro.clear_log_completed+"</td></tr>")})});var o=function(){$("select.tags").each(function(){$(this).unbind("change.wp-to-buffer-pro").on("change.wp-to-buffer-pro",function(t){var e=$(this).val(),o=$(this).closest("div.status"),a=$("textarea",$(o)),n=$(a).val();$(a).val(n+=" "+e).trigger("change")})})};o();var a=function(){"undefined"!=typeof select4&&$(".wpzinc-select2").select4({ajax:{url:wp_to_buffer_pro.ajax,dataType:"json",delay:250,data:function(t){return{action:"wp_to_buffer_pro_search_terms",taxonomy:$(this).data("taxonomy"),q:t.term,page:t.page}},processResults:function(t,e){return{results:t.data}},cache:!1},minimumInputLength:3})};a(),$("a.button.add-status").on("click",function(t){t.preventDefault(),$(".wpzinc-select2").select4("destroy");var e=$(this),s=$(e).parent(),r=$(e).closest("div.statuses"),c=$(s).prev().html();$(s).before('<div class="option sortable">'+c+"</div>"),n($(r)),"undefined"!=typeof sortable&&$("div.statuses").sortable("refresh"),$("input,select").conditional(),o(),a()}),"undefined"!=typeof sortable&&$("div.statuses").sortable({containment:"parent",items:".sortable",stop:function(t,e){var o=$(e.item),a=$(o).closest("div.statuses");n($(a))}}),$("body").on("select4:select","select",function(t){var e=null===$(this).val()?"":$(this).val().join();$("input.term-ids",$(this).closest("span.terms")).val(e)}),$("body").on("select4:unselect","select",function(t){var e=null===$(this).val()?"":$(this).val().join();$("input.term-ids",$(this).closest("span.terms")).val(e)}),$("div.statuses").bind("click.sortable mousedown.sortable",function(t){t.target.focus()}),$("div.sub-panel").on("click","a.delete",function(t){if(t.preventDefault(),confirm(wp_to_buffer_pro.delete_status_message)){var e=$(this).closest("div.option"),o=$(e).closest("div.statuses");$(e).remove(),n($(o)),$(".wpzinc-select2").select4("destroy"),a()}});var n=function(t){$("div.option.sortable",$(t)).each(function(t){$("div.number a.count ",$(this)).html("#"+(t+1)),0==t?$(this).addClass("first"):$(this).removeClass("first")})};"undefined"!=typeof datepicker&&$("input.datepicker").datepicker({dateFormat:"yy-mm-dd",maxDate:0}),$("a.button.add-table-row").on("click",function(t){t.preventDefault();var e=$(this),o=$(e).closest("table"),a=$("tbody tr:first-child",$(o));$("tbody tr:last-child",$(o)).after("<tr>"+$(a).html()+"</tr>")}),$(document).on("click","a.button.delete-table-row",function(t){t.preventDefault();var e=$(this),o=$(this).closest("tr");$(o).remove()}),$("body.wp-to-buffer-pro_page_wp-to-buffer-pro-bulk-publish").on("change","input[name=toggle]",function(t){$(this).is(":checked")?$("ul.categorychecklist input[type=checkbox]").prop("checked",!0):$("ul.categorychecklist input[type=checkbox]").prop("checked",!1)})}); -
wp-to-buffer/trunk/assets/scss/admin.scss
r1735682 r1766858 1 /** 2 * Datepicker 3 */ 4 @import "datepicker"; 5 6 /** 7 * Progress Bar 8 */ 9 .option.progressbar { 10 @import "progressbar"; 1 body.wpzinc { 2 /** 3 * Datepicker 4 */ 5 @import "datepicker"; 6 7 /** 8 * Progress Bar 9 */ 10 .option.progressbar { 11 @import "progressbar"; 12 } 11 13 } 12 14 … … 127 129 } 128 130 131 &.success { 132 td { 133 background: lightgreen; 134 } 135 } 136 129 137 &.error { 130 138 td { 131 background: red;139 background: orange; 132 140 } 133 141 } … … 168 176 * Settings (Post Meta and Settings Screen) 169 177 */ 178 /** 179 * Post Type Tabs 180 */ 181 body.wpzinc.wp-to-buffer, 182 body.wpzinc.wp-to-buffer-pro { 183 h2.nav-tab-wrapper { 184 a.nav-tab { 185 position: relative; 186 margin-right: 5px; 187 188 &.enabled { 189 color: green; 190 } 191 &.error { 192 color: red; 193 } 194 195 /** 196 * OK Icon 197 */ 198 span.dashicons.dashicons-yes { 199 position: absolute; 200 display: inline-block; 201 top: -8px; 202 right: -8px; 203 background-color: green; 204 color: white; 205 border-radius: 50%; 206 207 &::before { 208 margin-left: -2px; 209 } 210 } 211 212 /** 213 * Warning Icon 214 */ 215 span.dashicons.dashicons-warning { 216 position: absolute; 217 display: inline-block; 218 top: -8px; 219 right: -8px; 220 color: red; 221 border-radius: 50%; 222 } 223 } 224 } 225 } 170 226 #wp-to-buffer-pro { 171 227 /** 172 * Tabs228 * Social Media Profile Tabs 173 229 */ 174 230 h3.nav-tab-wrapper { … … 176 232 177 233 a.nav-tab { 234 position: relative; 178 235 width: 48px; 236 margin-right: 5px; 179 237 padding: 20px 14px 6px 14px; 238 239 &.enabled { 240 } 180 241 181 242 &.image { … … 187 248 188 249 /** 250 * OK Icon 251 */ 252 span.dashicons.dashicons-yes { 253 position: absolute; 254 z-index: 2; 255 display: inline-block; 256 top: -8px; 257 right: -8px; 258 background-color: green; 259 color: white; 260 border-radius: 50%; 261 262 &::before { 263 margin-left: -2px; 264 } 265 } 266 267 /** 189 268 * Social Network Icons 190 269 */ 191 span {270 span.network { 192 271 position: absolute; 193 272 display: inline-block; 194 273 width: 16px; 195 274 height: 16px; 196 margin: 0 0 0 -16px; 275 top: 0; 276 left: 0; 277 z-index: 2; 197 278 198 279 &.facebook { … … 224 305 width: 48px; 225 306 height: 48px; 307 z-index: 1; 226 308 } 227 309 } -
wp-to-buffer/trunk/includes/admin/admin.php
r1735682 r1766858 48 48 // Actions 49 49 add_action( 'init', array( $this, 'oauth' ) ); 50 add_action( 'admin_notices', array( $this, 'check_plugin_setup' ) ); 50 51 add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts_css' ) ); 51 52 add_action( 'admin_menu', array( $this, 'admin_menu' ) ); … … 127 128 128 129 /** 130 * Checks that the oAuth authorization flow has been completed, and that 131 * at least one Post Type with one Social Media account has been enabled. 132 * 133 * Displays a dismissible WordPress notification if this has not been done. 134 * 135 * @since 1.0.0 136 */ 137 public function check_plugin_setup() { 138 139 // Get base instance 140 $this->base = ( class_exists( 'WP_To_Buffer_Pro' ) ? WP_To_Buffer_Pro::get_instance() : WP_To_Buffer::get_instance() ); 141 142 // Check for access token 143 $access_token = WP_To_Buffer_Pro_Settings::get_instance()->get_access_token(); 144 if ( empty( $access_token ) ) { 145 ?> 146 <div class="notice notice-error"> 147 <p> 148 <?php 149 echo sprintf( 150 __( '%s needs to be authorized with Buffer before you can start sending Posts to Buffer. <a href="%s">Click here to Authorize.</a>', $this->base->plugin->name ), 151 $this->base->plugin->displayName, 152 WP_To_Buffer_Pro_Buffer_API::get_instance()->get_oauth_url() 153 ); 154 ?> 155 </p> 156 </div> 157 <?php 158 159 // Don't output any further errors 160 return; 161 } 162 163 } 164 165 /** 129 166 * Register and enqueue any JS and CSS for the WordPress Administration 130 167 * … … 206 243 public function settings_screen() { 207 244 208 // Notices209 $notices = array(210 'success' => array(),211 'error' => array(),212 );213 214 245 // Maybe disconnect from Buffer 215 246 $result = $this->disconnect(); 216 247 if ( is_string( $result ) ) { 217 248 // Error - add to array of errors for output 218 $ notices['error'][] = $result;249 $this->notices['error'][] = $result; 219 250 } elseif ( $result === true ) { 220 251 // Success 221 $ notices['success'][] = __( 'Buffer account disconnected successfully.', $this->base->plugin->name );252 $this->notices['success'][] = __( 'Buffer account disconnected successfully.', $this->base->plugin->name ); 222 253 } 223 254 … … 226 257 if ( is_string( $result ) ) { 227 258 // Error - add to array of errors for output 228 $ notices['error'][] = $result;259 $this->notices['error'][] = $result; 229 260 } elseif ( $result === true ) { 230 261 // Success 231 $ notices['success'][] = __( 'Settings saved successfully.', $this->base->plugin->name );262 $this->notices['success'][] = __( 'Settings saved successfully.', $this->base->plugin->name ); 232 263 } 233 264 -
wp-to-buffer/trunk/includes/admin/log.php
r1735682 r1766858 93 93 <th><?php _e( 'Plugin: Request Sent', $this->base->plugin->name ); ?></th> 94 94 <th><?php _e( 'Buffer: Status Created?', $this->base->plugin->name ); ?></th> 95 <th><?php _e( ' Buffer:Response', $this->base->plugin->name ); ?></th>95 <th><?php _e( 'Response', $this->base->plugin->name ); ?></th> 96 96 </tr> 97 97 </thead> … … 108 108 if ( ! $result['success'] ) { 109 109 // Show error 110 ?>111 <strong><?php _e( 'Buffer: ', $this->base->plugin->name ); ?></strong>112 <?php113 110 echo ( isset( $result['message'] ) ? $result['message'] : '' ); 114 111 } else { … … 126 123 <br /> 127 124 128 <strong><?php _e( 'Buffer: Profile: ', $this->base->plugin->name ); ?></strong>129 125 <?php 130 if ( is_array( $profiles ) ) { 131 echo $profiles[ $result['status']['profile_ids'][0] ]['formatted_service'] . ': ' . $profiles[ $result['status']['profile_ids'][0] ]['formatted_username']; 126 // Output Profile data, if available 127 if ( isset( $result['status'] ) ) { 128 ?> 129 <strong><?php _e( 'Buffer: Profile: ', $this->base->plugin->name ); ?></strong> 130 <?php 131 if ( is_array( $profiles ) ) { 132 echo $profiles[ $result['status']['profile_ids'][0] ]['formatted_service'] . ': ' . $profiles[ $result['status']['profile_ids'][0] ]['formatted_username']; 133 } 134 ?> 135 <br /> 136 137 <strong><?php _e( 'Buffer: Status Text: ', $this->base->plugin->name ); ?></strong> 138 <?php echo ( isset( $result['status_text'] ) ? $result['status_text'] : $result['status']['text'] ); ?><br /> 139 <?php 132 140 } 133 141 ?> 134 <br />135 136 <strong><?php _e( 'Buffer: Status Text: ', $this->base->plugin->name ); ?></strong>137 <?php echo ( isset( $result['status_text'] ) ? $result['status_text'] : $result['status']['text'] ); ?><br />138 139 142 </td> 140 143 </tr> -
wp-to-buffer/trunk/includes/admin/publish.php
r1705037 r1766858 71 71 // Publish 72 72 if ( $new_status == 'publish' && $new_status != $old_status ) { 73 $ this->publish( $post->ID, 'publish' );73 $result = $this->publish( $post->ID, 'publish' ); 74 74 } 75 75 76 76 // Update 77 77 if ( $new_status == 'publish' && $old_status == 'publish' ) { 78 $this->publish( $post->ID, 'update' ); 79 } 78 $result = $this->publish( $post->ID, 'update' ); 79 } 80 81 // If no errors, return 82 if ( ! is_wp_error( $result ) ) { 83 return; 84 } 85 86 // If logging is disabled, return 87 $settings = WP_To_Buffer_Pro_Settings::get_instance(); 88 $log_enabled = $settings->get_option( 'log' ); 89 if ( ! $log_enabled ) { 90 return; 91 } 92 93 // Add the error to the log so that the user can see why no statuses were sent to Buffer 94 WP_To_Buffer_Pro_Log::get_instance()->update_log( $post->ID, array( 95 array( 96 'date' => strtotime( 'now' ), 97 'success' => false, 98 'message' => $result->get_error_message(), 99 ), 100 ) ); 80 101 81 102 } … … 110 131 $access_token = WP_To_Buffer_Pro_Settings::get_instance()->get_access_token(); 111 132 if ( ! $access_token ) { 112 WP_To_Buffer_Pro_Log::get_instance()->update_log( $post_id, array( 113 'date' => strtotime( 'now' ), 114 'success' => false, 115 'message' => __( 'No access token was specified.', $this->plugin->name ), 116 ) ); 117 return new WP_Error( 'missing_access_token', __( 'No access token was specified', $this->base->plugin->name ) ); 133 return new WP_Error( 'no_access_token', sprintf( __( 'The Plugin has not been authorized with Buffer! Go to %s > Settings to setup the plugin.', $this->base->plugin->name ), $this->base->plugin->displayName ) ); 118 134 } 119 135 -
wp-to-buffer/trunk/includes/admin/settings.php
r1735682 r1766858 285 285 286 286 /** 287 * Returns an array of default settings for a new installation. 288 * 289 * @since 3.4.0 290 * 291 * @return array Settings 292 */ 293 public function default_installation_settings() { 294 295 // Define default settings 296 $settings = array( 297 'default' => array( 298 'publish' => array( 299 'enabled' => 1, 300 'status' => array( 301 'image' => array( 1 ), 302 'message' => array( 'New Post: {title} {url}' ), 303 'schedule' => array( 'queue_bottom' ), 304 ), 305 ), 306 ), 307 ); 308 309 // Allow devs to filter 310 $settings = apply_filters( 'wp_to_buffer_pro_default_installation_settings', $settings ); 311 312 // Return 313 return $settings; 314 315 } 316 317 /** 318 * Helper method to determine whether the given Post Type has at least 319 * one social media account enabled, and there is a publish or update 320 * action enabled in the Defaults for the Post Type or the Social Media account. 321 * 322 * @since 3.4.0 323 * 324 * @param string $post_type Post Type 325 * @return bool Enabled 326 */ 327 public function is_post_type_enabled( $post_type ) { 328 329 // Get Settings for Post Type 330 $settings = $this->get_settings( $post_type ); 331 332 // If no settings, bail 333 if ( ! $settings ) { 334 return false; 335 } 336 337 /** 338 * Default Publish or Update enabled 339 * 1+ Profiles enabled without override 340 */ 341 $default_publish_action_enabled = $this->get_setting( $post_type, '[default][publish][enabled]', 0 ); 342 $default_update_action_enabled = $this->get_setting( $post_type, '[default][update][enabled]', 0 ); 343 if ( $default_publish_action_enabled || $default_update_action_enabled ) { 344 foreach ( $settings as $profile_id => $profile_settings ) { 345 // Skip defaults 346 if ( $profile_id == 'default' ) { 347 continue; 348 } 349 350 // Profile enabled, no override 351 if ( isset( $profile_settings['enabled'] ) && $profile_settings['enabled'] ) { 352 if ( ! isset( $profile_settings['override'] ) || ! $profile_settings['override'] ) { 353 // Post Type is enabled with Defaults + 1+ Profile not using override settings 354 return true; 355 } 356 } 357 } 358 } 359 360 /** 361 * 1+ Profiles enabled with override and publish / update enabled 362 */ 363 foreach ( $settings as $profile_id => $profile_settings ) { 364 // Skip defaults 365 if ( $profile_id == 'default' ) { 366 continue; 367 } 368 369 // Skip if profile not enabled 370 if ( ! isset( $profile_settings['enabled'] ) || ! $profile_settings['enabled'] ) { 371 continue; 372 } 373 374 // Skip if override not enabled 375 if ( ! isset( $profile_settings['override'] ) || ! $profile_settings['override'] ) { 376 continue; 377 } 378 379 // Profile action enabled 380 if ( isset( $profile_settings['publish']['enabled'] ) && $profile_settings['publish']['enabled'] == '1' ) { 381 // Post Type is enabled with 1+ Profile with override and publish enabled 382 return true; 383 } 384 if ( isset( $profile_settings['update']['enabled'] ) && $profile_settings['update']['enabled'] == '1' ) { 385 // Post Type is enabled with 1+ Profile with override and update enabled 386 return true; 387 } 388 } 389 390 // If here, Post Type can't be sent to Buffer 391 return false; 392 393 } 394 395 /** 287 396 * Iterates through all associative statuses for a given Post Type, 288 397 * checking whether a profile and action combination have two or more statuses -
wp-to-buffer/trunk/readme.txt
r1735682 r1766858 4 4 Tags: buffer, bufferapp, buffer app, buffer my post, buffer old post, buffer post, post to buffer, promote old posts, promote posts, promote custom posts, promote selected posts, share posts, bulk share posts, share old posts, social, media, sharing, social media, social sharing, schedule, auto post, auto publish, publish, facebook, facebook post, facebook selected posts, facebook plugin, auto facebook post, post facebook, post to facebook, twitter, twitter post, tweet post twitter selected posts, tweet selected posts twitter plugin, auto twitter post, auto tweet post post twitter, post to twitter, linkedin, linkedin post, linkedin selected posts, linkedin plugin, auto linkedin post, post linkedin, post to linkedin, google, google post, google selected posts, google plugin, auto google post, post google, post to google, pinterest, pinterest post, pinterest selected posts, pinterest plugin, auto pinterest post, post pinterest, post to pinterest, best wordpress social plugin, best wordpress social sharing plugin, best social plugin, best social sharing plugin, best facebook social plugin, best twitter social plugin, best linkedin social plugin, best pinterest social plugin, best google+ social plugin, instagram, pinterest 5 5 Requires at least: 3.6 6 Tested up to: 4. 8.26 Tested up to: 4.9 7 7 Stable tag: trunk 8 8 License: GPLv2 or later … … 69 69 == Changelog == 70 70 71 = 3.3.2 = 72 * Added: Settings: Notice if Plugin is not authorized with Buffer 73 * Added: Settings: UI indicator for each Post Type denoting if enabled 74 * Added: Install: Enable on Post Publish by default for new installations 75 * Fix: Settings: DatePicker UI conflict with Advanced Custom Fields 76 71 77 = 3.3.1 = 72 78 * Added: Improved UI -
wp-to-buffer/trunk/views/settings-post-action.php
r1735682 r1766858 1 1 <!-- Action --> 2 2 <div id="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-<?php echo $action; ?>" class="postbox"> 3 <h3 class="hndle"> 4 <?php echo $action_label; ?> 5 <label for="<?php echo $profile_id; ?>_<?php echo $action; ?>_enabled"> 6 <input type="checkbox" id="<?php echo $profile_id; ?>_<?php echo $action; ?>_enabled" name="<?php echo $this->base->plugin->name; ?>[<?php echo $profile_id; ?>][<?php echo $action; ?>][enabled]" value="1"<?php checked( $this->get_setting( $post_type, '[' . $profile_id . '][' . $action .'][enabled]', 0 ), 1, true ); ?> data-conditional="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-<?php echo $action; ?>-statuses" /> 7 <?php _e( 'Enabled', $this->base->plugin->name ); ?> 8 </label> 9 </h3> 3 <h3 class="hndle"> 4 <?php 5 if ( $profile_id == 'default' ) { 6 echo 'Defaults: ' . $action_label; 7 } else { 8 echo sprintf( __( '%s: %s: %s', $this->base->plugin->name ), $profile['formatted_service'], $profile['formatted_username'], $action_label ); 9 } 10 ?> 10 11 11 <div id="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-<?php echo $action; ?>-statuses" class="statuses"> 12 <label for="<?php echo $profile_id; ?>_<?php echo $action; ?>_enabled"> 13 <input type="checkbox" id="<?php echo $profile_id; ?>_<?php echo $action; ?>_enabled" name="<?php echo $this->base->plugin->name; ?>[<?php echo $profile_id; ?>][<?php echo $action; ?>][enabled]" value="1"<?php checked( $this->get_setting( $post_type, '[' . $profile_id . '][' . $action .'][enabled]', 0 ), 1, true ); ?> data-conditional="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-<?php echo $action; ?>-statuses" /> 14 <?php _e( 'Enabled', $this->base->plugin->name ); ?> 15 </label> 16 </h3> 17 18 <div id="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-<?php echo $action; ?>-statuses" class="statuses"> 12 19 <?php 13 20 // Publish / Update Statuses … … 33 40 } 34 41 ?> 35 </div>42 </div> 36 43 </div> -
wp-to-buffer/trunk/views/settings-post-actionheader.php
r1735682 r1766858 1 1 <!-- Action Header --> 2 2 <div class="postbox"> 3 <h3 class="hndle">4 <?php echo _e( 'Settings', $this->base->plugin->name); ?>5 </h3>3 <h3 class="hndle"> 4 <?php echo sprintf( __( '%s: %s: Settings', $this->base->plugin->name ), $profile['formatted_service'], $profile['formatted_username'] ); ?> 5 </h3> 6 6 7 7 <!-- Account Enabled --> -
wp-to-buffer/trunk/views/settings-post.php
r1595094 r1766858 6 6 */ 7 7 ?> 8 8 9 9 <!-- Post Type --> 10 10 <div id="<?php echo $post_type; ?>-panel" class="panel"> 11 12 <!-- Second level tabs -->13 <h3 class="nav-tab-wrapper needs-js" data-panel="sub-panel">14 <!-- Default Settings -->15 <a href="#<?php echo $post_type; ?>-default" class="nav-tab nav-tab-active">16 <?php _e( 'Defaults', $this->base->plugin->name ); ?><br /><br />17 </a>18 19 <?php11 12 <!-- Second level tabs --> 13 <h3 class="nav-tab-wrapper needs-js" data-panel="sub-panel"> 14 <!-- Default Settings --> 15 <a href="#<?php echo $post_type; ?>-default" class="nav-tab nav-tab-active"> 16 <?php _e( 'Defaults', $this->base->plugin->name ); ?><br /><br /> 17 </a> 18 19 <?php 20 20 // Account tabs 21 foreach ( $profiles as $key => $profile ) { 22 ?> 23 <a href="#<?php echo $post_type; ?>-<?php echo $profile['id']; ?>" class="nav-tab image" title="<?php echo $profile['formatted_service'] . ': ' . $profile['formatted_username']; ?>" data-tooltip="<?php echo $profile['formatted_service'] . ': ' . $profile['formatted_username']; ?>"> 24 <img src="<?php echo $profile['avatar']; ?>" width="48" height="48" alt="<?php echo $profile['formatted_username']; ?>" /> 25 <span class="<?php echo $profile['service']; ?>"></span> 26 </a> 27 <?php 21 if ( ! is_wp_error( $profiles ) ) { 22 foreach ( $profiles as $key => $profile ) { 23 $profile_enabled = $this->get_setting( $post_type, '[' . $profile['id'] . '][enabled]', 0 ); 24 ?> 25 <a href="#<?php echo $post_type; ?>-<?php echo $profile['id']; ?>" class="nav-tab image <?php echo ( $profile_enabled ? ' enabled' : ' disabled' ); ?>" title="<?php echo $profile['formatted_service'] . ': ' . $profile['formatted_username']; ?>" data-tooltip="<?php echo $profile['formatted_service'] . ': ' . $profile['formatted_username']; ?>"> 26 <span class="network <?php echo $profile['service']; ?>"></span> 27 <img src="<?php echo $profile['avatar']; ?>" width="48" height="48" alt="<?php echo $profile['formatted_username']; ?>" /> 28 29 <?php 30 if ( $profile_enabled ) { 31 ?> 32 <span class="dashicons dashicons-yes"></span> 33 <?php 34 } 35 ?> 36 </a> 37 <?php 38 } 28 39 } 29 40 unset( $profile ); 30 ?>31 </h3>32 33 <!-- Defaults -->41 ?> 42 </h3> 43 44 <!-- Defaults --> 34 45 <?php 35 46 $profile_id = 'default'; 36 47 ?> 37 <div id="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-panel" class="sub-panel">48 <div id="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-panel" class="sub-panel"> 38 49 <?php 39 50 // Iterate through Post Actions (Publish, Update etc) … … 47 58 <!-- Profiles --> 48 59 <?php 49 foreach ( $profiles as $key => $profile ) { 50 $profile_id = $profile['id']; 51 ?> 52 <div id="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-panel" class="sub-panel"> 60 if ( ! is_wp_error( $profiles ) ) { 61 foreach ( $profiles as $key => $profile ) { 62 $profile_id = $profile['id']; 63 ?> 64 <div id="<?php echo $post_type; ?>-<?php echo $profile_id; ?>-panel" class="sub-panel"> 65 <?php 66 require( $this->base->plugin->folder . 'views/settings-post-actionheader.php' ); 67 ?> 68 </div> 53 69 <?php 54 require( $this->base->plugin->folder . 'views/settings-post-actionheader.php' ); 55 ?> 56 </div> 57 <?php 70 } 58 71 } 59 72 ?> -
wp-to-buffer/trunk/views/settings.php
r1735682 r1766858 26 26 <?php 27 27 } 28 29 // Get access token 30 $access_token = $this->get_setting( '', 'access_token' ); 28 31 ?> 29 32 … … 33 36 <h2 class="nav-tab-wrapper"> 34 37 <!-- Settings --> 35 <a href="admin.php?page=<?php echo $this->base->plugin->name; ?>-settings" class="nav-tab<?php echo ( $tab == 'auth' ? ' nav-tab-active' : ''); ?>">38 <a href="admin.php?page=<?php echo $this->base->plugin->name; ?>-settings" class="nav-tab<?php echo ( $tab == 'auth' ? ' nav-tab-active' : '' ) . ( ! empty( $access_token ) ? ' enabled' : ' error' ); ?>"> 36 39 <span class="dashicons dashicons-lock"></span> 37 <?php _e( 'Settings', $this->base->plugin->name ); ?> 40 <?php 41 if ( ! empty( $access_token ) ) { 42 ?> 43 <span class="dashicons dashicons-yes"></span> 44 <?php 45 } else { 46 ?> 47 <span class="dashicons dashicons-warning"></span> 48 <?php 49 } 50 51 _e( 'Settings', $this->base->plugin->name ); 52 ?> 38 53 </a> 39 54 … … 53 68 } 54 69 } 70 71 // Determine if the Post Type is set to post to Buffer 72 $is_post_type_enabled = WP_To_Buffer_Pro_Settings::get_instance()->is_post_type_enabled( $type ); 55 73 ?> 56 <a href="admin.php?page=<?php echo $this->base->plugin->name; ?>-settings&tab=post&type=<?php echo $type; ?>" class="nav-tab<?php echo ( $post_type == $type ? ' nav-tab-active' : '' ) ; ?>">74 <a href="admin.php?page=<?php echo $this->base->plugin->name; ?>-settings&tab=post&type=<?php echo $type; ?>" class="nav-tab<?php echo ( $post_type == $type ? ' nav-tab-active' : '' ) . ( $is_post_type_enabled ? ' enabled' : ' disabled' ); ?>"> 57 75 <span class="<?php echo $icon; ?>"></span> 58 <?php echo $post_type_obj->labels->name; ?> 76 <?php 77 // Show indicator to denote whether the Post Type is enabled 78 if ( $is_post_type_enabled ) { 79 ?> 80 <span class="dashicons dashicons-yes"></span> 81 <?php 82 } 83 84 echo $post_type_obj->labels->name; 85 ?> 59 86 </a> 60 87 <?php -
wp-to-buffer/trunk/wp-to-buffer.php
r1735682 r1766858 3 3 * Plugin Name: WP to Buffer 4 4 * Plugin URI: http://www.wpzinc.com/plugins/wp-to-buffer-pro 5 * Version: 3.3. 15 * Version: 3.3.2 6 6 * Author: WP Zinc 7 7 * Author URI: http://www.wpzinc.com … … 58 58 $this->plugin->settingsName = 'wp-to-buffer'; // Settings key - ensures upgrade users don't lose settings 59 59 $this->plugin->displayName = 'WP to Buffer'; 60 $this->plugin->version = '3.3. 1';61 $this->plugin->buildDate = '2017- 09-25 18:00:00';60 $this->plugin->version = '3.3.2'; 61 $this->plugin->buildDate = '2017-11-15 18:00:00'; 62 62 $this->plugin->requires = 3.6; 63 $this->plugin->tested = '4. 8.2';63 $this->plugin->tested = '4.9'; 64 64 $this->plugin->folder = plugin_dir_path( __FILE__ ); 65 65 $this->plugin->url = plugin_dir_url( __FILE__ ); … … 133 133 require_once( $this->plugin->folder . 'includes/admin/buffer-api.php' ); 134 134 require_once( $this->plugin->folder . 'includes/admin/common.php' ); 135 require_once( $this->plugin->folder . 'includes/admin/install.php' ); 135 136 require_once( $this->plugin->folder . 'includes/admin/log.php' ); 136 137 require_once( $this->plugin->folder . 'includes/admin/post.php' ); … … 166 167 // Initialise class 167 168 $wp_to_buffer = WP_To_Buffer::get_instance(); 169 170 // Register activation hooks 171 register_activation_hook( __FILE__, array( 'WP_To_Buffer_Pro_Install', 'activate' ) ); 172 add_action( 'activate_wpmu_site', array( 'WP_To_Buffer_Pro_Install', 'activate_wpmu_site' ) );
Note: See TracChangeset
for help on using the changeset viewer.