PowerPress Podcasting plugin by Blubrry - Version 9.6

Version Description

  • Released on 10/10/2022
  • Redesign pages for tools, channels, categories, taxonomies, and post types
  • Add Buzzsprout import option
Download this release

Release Info

Developer benbeecroft
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 9.6
Comparing to
See all releases

Code changes from version 9.5.1 to 9.6

css/admin.css CHANGED
@@ -1,5 +1,4 @@
1
  /* admin.css */
2
-
3
  .powerpress_save_button_other {
4
  float: right;
5
  background-color: #2278CF;
@@ -1042,4 +1041,101 @@ a.hosting-marketing-text {
1042
  .hosting-marketing-button {
1043
  margin-left: 0;
1044
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1045
  }
1
  /* admin.css */
 
2
  .powerpress_save_button_other {
3
  float: right;
4
  background-color: #2278CF;
1041
  .hosting-marketing-button {
1042
  margin-left: 0;
1043
  }
1044
+ }
1045
+
1046
+ .pp-page-header {
1047
+ font-size: 30px;
1048
+ font-weight: 500;
1049
+ margin-bottom: 10px;
1050
+ }
1051
+ .pp-page-sub-header{
1052
+ font-size: 25px;
1053
+ font-weight: 500;
1054
+ margin-bottom: 10px;
1055
+ margin-top: 10px;
1056
+ }
1057
+ .pp-page-h3 {
1058
+ font-weight: 400;
1059
+ }
1060
+ .pp-page-h3-bold {
1061
+ font-weight: 500;
1062
+ }
1063
+ .pp-card-body {
1064
+ background-color: white;
1065
+ border-radius: 4px;
1066
+ padding: 35px 25px 25px 25px;
1067
+ }
1068
+ .pp-tools-item, .pp-tools-text {
1069
+ float: left;
1070
+ }
1071
+ .pp-tools-text {
1072
+ margin: 0 0 30px 0;
1073
+ }
1074
+ .pp-tools-button {
1075
+ margin-left: auto;
1076
+ margin-top: 15px;
1077
+ height: fit-content;
1078
+ padding: 10px 30px 10px 30px !important;
1079
+ cursor: pointer;
1080
+ text-decoration: none;
1081
+ min-width: 10%;
1082
+ text-align: center;
1083
+ }
1084
+ .pp-tools-button:hover {
1085
+ color: white;
1086
+ background: #4e93d9;
1087
+ }
1088
+
1089
+ .pp-row {
1090
+ display: flex;
1091
+ flex-wrap: wrap;
1092
+ }
1093
+
1094
+ .pp-tools-row {
1095
+ padding-left: 30px;
1096
+ padding-right: 30px;
1097
+ }
1098
+
1099
+ .pp-page-back-link{
1100
+ margin: 0 0 10px 0;
1101
+ }
1102
+
1103
+ .find-and-replace-input {
1104
+ margin-top: 6px;
1105
+ width: 50% !important;
1106
+ height: 50%;
1107
+ }
1108
+ .preview-changes-list {
1109
+ border: 1px solid black;
1110
+ }
1111
+ .preview-changes-row {
1112
+ padding: 10px;
1113
+ }
1114
+ .colored-row {
1115
+ background: #eeeeee;
1116
+ }
1117
+ .hosting-platform-button {
1118
+ border: 1px solid black;
1119
+ padding: 10px 5px;
1120
+ text-decoration: none;
1121
+ color: black;
1122
+ margin-right: 15px;
1123
+ text-align: center;
1124
+ }
1125
+ .hosting-platform-button:hover {
1126
+ color: black;
1127
+ background: #eeeeee;
1128
+ }
1129
+ .diagnostics-message {
1130
+ border: 1px solid black;
1131
+ padding: 0 20px;
1132
+ margin: 0 30px 30px 30px;
1133
+ }
1134
+ .hosting-platform-img{
1135
+ width: 25%;
1136
+ float: left;
1137
+ margin-left: 15px;
1138
+ }
1139
+ .hosting-platform-text {
1140
+ margin-top: 10px;
1141
  }
css/admin.min.css CHANGED
@@ -1 +1 @@
1
- .powerpress_save_button_other{float:right;background-color:#2278cf;color:#fff;box-shadow:none;border-radius:4px;border:none;padding:1ch 1em}#powerpress_settings .form-table th{padding-left:1em}.pp-migrate-container{background:#fff 0 0 no-repeat padding-box;border:1px solid #444;border-radius:4px;opacity:1;margin:0 auto 1em auto}#powerpreess_step_1b{padding-left:3em}.divider-left{border-left:1px solid #707070}.pp-migrate-container .pp_button{border-radius:4px;float:left}.powerpress-step-blue{height:4ex;width:4ex;background-color:#1976d2;color:#fff;border-radius:2ex;padding:1ex;display:inline-block;text-align:center;vertical-align:bottom;font-size:70%;margin-right:1em}.pp-migrate-container-heading{padding:1em 2em;width:100%;border-bottom:1px solid #444}.pp-migrate-content{padding:2em 3em;width:100%}#pp-migrate-page{color:#444;margin-left:2em;margin-right:2em}#pp-migrate-page .pp-migrate-subtitle{display:inline-block;width:calc(100% - 10em);vertical-align:top;margin-left:1em;color:#747474}.pp-migrate-container input[type=checkbox]{display:inline-block}.pp-migrate-container img{height:7em;display:inline-block}.pp-migrate-container img.loading{height:10px;width:100%;margin:auto auto 1ch auto;display:block}.pp-migrate-container .migrate-status-yellow{color:#ffb92e;font-weight:600}.pp-migrate-container .migrate-status-blue{color:#1976d2;font-weight:600}.pp-migrate-container .migrate-status-red{color:#ff3939}.pp-migrate-container a{color:#1976d2;text-decoration:underline;display:inline-block;margin-top:1em}.powerpress-notice,.wrap div.powerpress-notice,div.powerpress-notice{margin:20px 0 10px;padding:0 5px;line-height:29px}.powerpress-error,.wrap div.powerpress-error,div.powerpress-error{margin:20px 5px 10px;padding:0 10px;line-height:29px;font-size:12px;border-width:1px;border-style:solid;font-weight:700}#powerpress_settings{background-image:url(//images.blubrry.com/powerpress/blubrry_logo7.png);background-repeat:no-repeat;background-position:bottom right}#powerpress_settings ul li ul{list-style:disc}#powerpress_settings ul li ul li{margin-left:50px;font-size:90%}#powerpress_settings td{padding-top:12px}#powerpress_settings td p{padding-bottom:10px}.bpp_input_sm{width:120px}.bpp_input_med{width:250px}.bpp-input-normal{width:80%}.powerpress_color_box{float:left;width:16px;height:16px;cursor:pointer;margin:4px 1px;border:1px solid #666}#powerpress_support li{margin-left:70px;list-style-type:disc;margin-top:0;margin-bottom:0}.powerpress-welcome-news>div{margin:0 10px 0 0}.powerpress-welcome-news a{text-decoration:none}.powerpress-welcome-news .rssSummary{font-size:95%}.powerpress-welcome-news .powerpressNewsPlayer{margin-top:5px}.powerpress-welcome-highlighted{margin:10px 0 0 0;float:left;width:39%}.powerpress-welcome-highlighted>div{margin:0 0 0 10px}.powerpress-welcome-highlighted a{text-decoration:none}.powerpress-welcome-highlighted .rsswidget{font-size:115%;font-weight:700}.powerpress-welcome-highlighted .rssSummary{font-size:95%}.powerpress-welcome-highlighted ul li,.powerpress-welcome-news ul li{margin:15px 0 10px 0}.powerpress-welcome-highlighted h2,.powerpress-welcome-news h2{padding:0}#powerpress_settings label.powerpress-normal-font{font-size:11px}#powerpress_admin_header{vertical-align:text-bottom}#powerpress_admin_header h2{display:inline-block}#powerpress_admin_header h2,#powerpress_admin_header h3,#powerpress_admin_header h4{line-height:1.1;margin:10px 0 0 0;padding:0;font-weight:700}#powerpress_admin_header p{line-height:1.1;margin:5px 0 10px 0;padding:0}#powerpress_admin_header .powerpress-admin-heading{font-weight:700}#powerpress_admin_header .powerpress-mode{margin-left:14px;display:inline-block;color:#f60;font-size:15px;font-weight:700}#pp-getting-started-box{max-width:1200px}#pp-getting-started-box h2{font-size:200%;margin-bottom:20px;font-style:oblique;line-height:1.2em}#pp-getting-started-box>p{font-size:125%}.powerpress-required{font-size:85%;color:#c00;margin-left:12px;font-style:italic}.powerpress-step{display:inline-block;float:left;vertical-align:top;position:relative;padding:8px}.blubrry-services{color:#337ec9;font-size:18px;line-height:1.2}.blubrry-services p{margin:0 70px 0 0;padding:0}.blubrry-services strong{color:#f60;font-weight:400}.blubrry-services p.top-lines{margin-right:0}.blubrry-services a{color:#f60;font-size:20px;line-height:2}.blubrry-services .blubrry-hosting,.blubrry-services .blubrry-stats{float:left;width:230px;height:140px;background-color:#ececec;padding:10px;margin-top:10px}.blubrry-services .blubrry-stats{background-image:url('../images/StatsIcon.png');background-repeat:no-repeat;background-position:bottom right}.blubrry-services .blubrry-hosting{margin-right:50px;background-image:url('../images/blubrry_icon.png');background-repeat:no-repeat;background-position:bottom right}@media screen and (min-width:1px) and (max-width:819px){.powerpress-step{width:170px}#powerpress_steps p{font-size:16px;margin:20px 4px}.blubrry-services .blubrry-hosting{margin-right:20px}}@media screen and (min-width:1px) and (max-width:729px){#powerpreess_step_1{background-position:1px bottom}#powerpress_steps p{margin:10px 4px}.blubrry-services .blubrry-hosting{margin-right:10px}}@media screen and (min-width:1px) and (max-width:729px){.powerpress-step{width:24%;margin-left:30px}}.numberCircle{border-radius:50%;behavior:url(PIE.htc);width:36px;height:36px;padding:8px;background:#fff;border:2px solid #666;color:#666;text-align:center;font:32px Arial,sans-serif}#powerpress_settings_page{background:0 0;background-color:inherit;border:none}#powerpress_settings_page .ui-widget-header{background:0 0;border:none}#powerpress_settings_page .ui-state-default,#powerpress_settings_page .ui-widget-content .ui-state-default,#powerpress_settings_page .ui-widget-header .ui-state-default{background:0 0;border:none}#powerpress_settings_page .ui-tabs-nav li{margin-bottom:0;border-bottom:none}#powerpress_settings_page .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}#powerpress_settings_page .ui-tabs-nav li a{padding:4px 5px 2px}#powerpress_settings_page .ui-tabs-nav li.ui-tabs-active a{padding:4px 5px 3px}#powerpress_settings_page .powerpress_tab{background-color:#fff;border-collapse:separate;border-style:solid;border-width:1px;border-color:#dfdfdf;border-color:#b3b3b3}.pp-section{clear:both;padding:0;margin:0}.pp-section dt{font-weight:700}.pp-expand-section{text-decoration:none}a.pp-expand-section,a.pp-expand-section:focus,a.pp-expand-section:hover,a.pp-expand-section:visited{color:#1976d2}.pp-expand-section-expanded:before,.pp-expand-section:before{background-color:#1976d2;border:1px solid #1976d2;border-radius:3px;font-weight:700;color:#fff;height:20px;width:20px;display:inline-block;margin-right:10px;text-align:center;font-size:20px}.pp-expand-section:before{content:' \25C4';content:'+';line-height:20px}.pp-expand-section-expanded:before{content:' \25BC';content:'-';line-height:16px}.bbplayer_settings .form-table th{padding-bottom:0}.bbplayer_settings h3{color:#036;font-weight:700}.wp-core-ui .button-blubrry{background:#1976d2;border-color:#1976d2;color:#fff}.wp-core-ui .button-blubrry-gray{background:#f7f7f7;border-color:#ccc;color:#555}.wp-core-ui .button-blubrry:focus,.wp-core-ui .button-blubrry:hover{background:#0d87e9;border-color:#0d87e9;color:#fff}.pp-form-error{border:red solid 1px}table{width:60%;margin-top:1%;margin-bottom:1%;border-radius:4px;background-color:#f8f8f8;border:solid #ddd;border-collapse:separate}input,textarea{border-radius:4px}ul{clear:both}th{background-color:#fff;color:#000;border-radius:4px 4px 0 0}tr{line-height:12px}td,th{border-collapse:separate;border-bottom:solid #ddd;padding:2.5%}td{text-align:left;font-size:115%}td:hover{background-color:#fff}th{text-align:center;font-size:100%}td.networkTable{text-align:left}th.pendingApply{background-color:grey}td.pendingApply{color:grey}th.processedApply{background-color:#8fbc8f}td.processedApply{color:green}td.approvedApply{color:green}th.approvedApply{background-color:#8fbc8f}td.disapprovedApply{color:red}th.disapprovedApply{background-color:#8b0000}input[type=email],input[type=password],input[type=text],input[type=url],textarea{width:100%;padding:.6% .6%;display:inline-block;border:1px solid #ccc;box-sizing:border-box}.linkInput{width:50%!important}input[type=radio]{transform:scale(1)}select{width:100%}.ppn-back-button{background:0 0;margin:5px 10px 5px 10px;padding:5px;color:#069;cursor:pointer}#signinButton,.backButton,.primaryButton,.subToggleButton,.toggleButton{display:inline-block;border:none;box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);border-radius:4px;background-color:#0c74d5;color:#fff;font-family:Roboto,sans-serif;font-size:13px;font-weight:500;padding:1ch 2em 1ch 2em;cursor:pointer;text-align:center}.warningButton{display:inline-block;box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);border:none;border-radius:4px;background-color:#b00000;color:#fff;font-family:Roboto,sans-serif;font-size:13px;font-weight:500;padding:1ch 2em 1ch 2em;margin-right:1em;cursor:pointer;text-align:center}.cacheButton{background-color:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);color:#000;display:inline-block;border-radius:4px;font-family:Roboto,sans-serif;font-size:13px;font-weight:700;padding:1ch 2em 1ch 2em;margin-right:1em;cursor:pointer;text-align:center;border:0}#signinButton{width:100%;border-radius:0}.toggleButton{display:inline;width:10%;height:60%;margin:0}.subToggleButton{display:inline;width:7.5%;height:6%;background-color:#696969}.applicantButton{box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);border:none;border-radius:4px;color:#fff;font-family:Roboto,sans-serif;font-size:13px;font-weight:500;padding:1ch 2em 1ch 2em;margin-right:1em;cursor:pointer;text-align:center}.cancelButton{background-color:#0c74d5;color:#fff;padding:1% 1%;margin:0 auto;cursor:pointer;border-radius:4px;font-size:90%;width:auto;vertical-align:top;border:1px solid #000}.cancelButton:hover{cursor:pointer;text-decoration:underline}#choiceForm{margin-top:2%}.tab{background-color:#fff;border-bottom:1px solid grey;max-width:80%}.tabInactive{padding:1.4% 1.4% 2% 1.4%;background-color:#fff;color:#a9a9a9;border:none;cursor:pointer;font-size:150%}.tabActive{padding:1.4% 1.4% 2% 1.4%;background-color:#fff;color:#000;border:none;border-bottom:2px solid #00f;cursor:pointer;font-size:150%;font-weight:700}.tabContent{max-width:80%}.programRow{padding:1% 5% 1% 1%;background-color:#fff;border-bottom:1px #000 solid}.programRow:hover{background-color:#d3d3d3}button:hover{opacity:.8}.pageTitle{padding:0 auto;font-size:220%;letter-spacing:1px;line-height:100%}h3.baseChoice{text-decoration:underline #0C74D5;display:block;font-size:150%;color:#0c74d5}p{margin:5px auto;display:inline-block;font-size:105%}.container{padding:1.8% 15% 1.8% 10%;margin:.08% .08% .08% .08%}ul.choiceList{list-style-type:square;padding-left:5%}ul.subChoiceList{list-style-type:circle;padding-left:10%}ul.mainChoiceList{list-style-type:none;max-width:850px}li.material-list{border-radius:4px;padding:2px 15px 20px 15px;margin-bottom:25px;background-color:#fff}.alert{font-size:130%;padding:.5%;background-color:#f44336;color:#fff;display:inline-block;width:99%}.alert.alert-danger{background-color:#fef7f8;border-left-color:#e36f58;color:#444;border-left-width:4px;max-width:100%}.alert-success{font-size:130%;padding:.5%;background-color:#8fbc8f;color:#fff;display:inline-block;width:99%}.closebtn{color:#fff;font-weight:700;float:right;vertical-align:middle;line-height:normal;cursor:pointer;transition:.3s}.alertMessage{float:left;vertical-align:middle;line-height:normal}small{font-size:100%;padding:0 auto;margin-bottom:10%;color:grey;font-style:italic}.closebtn:hover{color:#000}label{font-size:85%}br{height:10%}figure{width:6px;height:6px;border-radius:5px;background:#000;margin:3px 0}#choiceBox,.confirmUnlink,.selectPageBox{background-color:#fff;padding:0 0 2% 0;width:50%;text-align:center;margin-bottom:5%;border-radius:4%}.settingBox{background-color:#fff;padding:2% 2% 2% 2%;width:100%;margin-top:2%;margin-bottom:2%;border-radius:4px;border:1px solid #f5f5f5}.boxTitle{padding:2%;background-color:#0c74d5;color:#fff;border-radius:4px}.thickboxTitle{color:navy}.dropdownChoice{width:50%!important}.material-icons:hover{cursor:pointer}@media only screen and (max-width:980px){.alert,.alert-success{font-size:80%}input[type=checkbox],input[type=radio]{transform:scale(.7)}}@media only screen and (max-width:1092px){table{width:100%}#choiceBox{width:100%}td{font-size:70%}th{font-size:80%}}@media only screen and (max-width:500px){table{width:100%}#choiceBox{width:100%}td{font-size:70%}th{font-size:80%}input[type=checkbox],input[type=radio]{transform:scale(.5)}}.powerpress-blubrry-hosting-marketing{max-width:80rem;margin:0 auto 2rem auto;padding:2ch 2em;background-color:#fff;border-radius:4px;border-top:2px solid rgba(144,144,144,.25)}.hosting-marketing-blubrry-logo{display:inline-block;width:20%;vertical-align:middle}.hosting-marketing-text-container{display:inline-block;margin-left:2em;height:100%;vertical-align:middle}.hosting-marketing-title{color:#0c74d5;font-weight:700}.hosting-marketing-text{text-decoration:none}a.hosting-marketing-text{color:#0c74d5}.hosting-marketing-button{display:inline-block;border-radius:4px;background-color:#0c74d5;color:#fff;font-family:Roboto,sans-serif;font-size:16px;padding:1ch 2em 1ch 2em;cursor:pointer;text-align:center;font-weight:700;width:20%;border:none;margin-left:1em;vertical-align:middle}@media (max-width:1110px){.hosting-marketing-button{width:95%;padding-top:1em;padding-bottom:1em;margin-right:1em}.hosting-marketing-text-container{width:70%!important}.hosting-marketing-blubrry-logo{margin-left:1em}}@media (max-width:799px){#destinations-blubrry .hosting-marketing-blubrry-logo{width:70%;margin-right:1em;margin-bottom:1em;margin-left:0}#destinations-blubrry .hosting-marketing-text-container{width:90%!important;margin-left:0}}@media (max-width:599px){#destinations-blubrry .hosting-marketing-blubrry-logo{width:80%}}@media (max-width:480px){.hosting-marketing-blubrry-logo{width:90%;margin-right:1em;margin-bottom:1em;margin-left:0}.hosting-marketing-text-container{width:90%!important;margin-left:0}.hosting-marketing-button{margin-left:0}}
1
+ #powerpress_settings,.blubrry-services .blubrry-hosting,.blubrry-services .blubrry-stats{background-repeat:no-repeat;background-position:bottom right}table,td,th{border-collapse:separate}td,td.networkTable{text-align:left}.tab,.tabContent{max-width:80%}.powerpress_save_button_other{float:right;background-color:#2278cf;color:#fff;box-shadow:none;border-radius:4px;border:none;padding:1ch 1em;cursor:pointer}#powerpress_settings .form-table th{padding-left:1em}.pp-migrate-container{background:no-repeat padding-box #fff;border:1px solid #444;border-radius:4px;opacity:1;margin:0 auto 1em}#powerpreess_step_1b{padding-left:3em}.divider-left{border-left:1px solid #707070}.pp-migrate-container .pp_button{border-radius:4px;float:left}.powerpress-step-blue{height:4ex;width:4ex;background-color:#1976d2;color:#fff;border-radius:2ex;padding:1ex;display:inline-block;text-align:center;vertical-align:bottom;font-size:70%;margin-right:1em}.pp-migrate-container-heading{padding:1em 2em;width:100%;border-bottom:1px solid #444}.pp-migrate-content{padding:2em 3em;width:100%}#pp-migrate-page{color:#444;margin-left:2em;margin-right:2em}#pp-migrate-page .pp-migrate-subtitle{display:inline-block;width:calc(100% - 10em);vertical-align:top;margin-left:1em;color:#747474}#powerpress_admin_header h2,.pp-migrate-container input[type=checkbox]{display:inline-block}.pp-migrate-container img{height:7em;display:inline-block}.pp-migrate-container img.loading{height:10px;width:100%;margin:auto auto 1ch;display:block}.pp-migrate-container .migrate-status-yellow{color:#ffb92e;font-weight:600}.pp-migrate-container .migrate-status-blue{color:#1976d2;font-weight:600}.pp-migrate-container .migrate-status-red{color:#ff3939}.pp-migrate-container a{color:#1976d2;text-decoration:underline;display:inline-block;margin-top:1em}.hosting-marketing-text,.powerpress-welcome-highlighted a,.powerpress-welcome-news a,.pp-expand-section,.pp-tools-button{text-decoration:none}.powerpress-notice,.wrap div.powerpress-notice,div.powerpress-notice{margin:20px 0 10px;padding:0 5px;line-height:29px}.powerpress-error,.wrap div.powerpress-error,div.powerpress-error{margin:20px 5px 10px;padding:0 10px;line-height:29px;font-size:12px;border-width:1px;border-style:solid;font-weight:700}#powerpress_settings{background-image:url(//images.blubrry.com/powerpress/blubrry_logo7.png)}#powerpress_settings ul li ul{list-style:disc}#powerpress_settings ul li ul li{margin-left:50px;font-size:90%}#powerpress_settings td{padding-top:12px}#powerpress_settings td p{padding-bottom:10px}.bpp_input_sm{width:120px}.bpp_input_med{width:250px}.bpp-input-normal{width:80%}.powerpress_color_box{float:left;width:16px;height:16px;cursor:pointer;margin:4px 1px;border:1px solid #666}#powerpress_support li{margin-left:70px;list-style-type:disc;margin-top:0;margin-bottom:0}.powerpress-welcome-news>div{margin:0 10px 0 0}.powerpress-welcome-highlighted .rssSummary,.powerpress-welcome-news .rssSummary{font-size:95%}.powerpress-welcome-news .powerpressNewsPlayer{margin-top:5px}.powerpress-welcome-highlighted{margin:10px 0 0;float:left;width:39%}.powerpress-welcome-highlighted>div{margin:0 0 0 10px}.powerpress-welcome-highlighted .rsswidget{font-size:115%;font-weight:700}.powerpress-welcome-highlighted ul li,.powerpress-welcome-news ul li{margin:15px 0 10px}.powerpress-welcome-highlighted h2,.powerpress-welcome-news h2{padding:0}#powerpress_settings label.powerpress-normal-font{font-size:11px}#powerpress_admin_header{vertical-align:text-bottom}#powerpress_admin_header h2,#powerpress_admin_header h3,#powerpress_admin_header h4{line-height:1.1;margin:10px 0 0;padding:0;font-weight:700}#powerpress_admin_header p{line-height:1.1;margin:5px 0 10px;padding:0}#powerpress_admin_header .powerpress-admin-heading,.pp-section dt{font-weight:700}#powerpress_admin_header .powerpress-mode{margin-left:14px;display:inline-block;color:#f60;font-size:15px;font-weight:700}#pp-getting-started-box{max-width:1200px}#pp-getting-started-box h2{font-size:200%;margin-bottom:20px;font-style:oblique;line-height:1.2em}#pp-getting-started-box>p{font-size:125%}.powerpress-required{font-size:85%;color:#c00;margin-left:12px;font-style:italic}.powerpress-step{display:inline-block;float:left;vertical-align:top;position:relative;padding:8px}.blubrry-services{color:#337ec9;font-size:18px;line-height:1.2}.blubrry-services p{margin:0 70px 0 0;padding:0}.blubrry-services strong{color:#f60;font-weight:400}.blubrry-services p.top-lines{margin-right:0}.blubrry-services a{color:#f60;font-size:20px;line-height:2}.blubrry-services .blubrry-hosting,.blubrry-services .blubrry-stats{float:left;width:230px;height:140px;background-color:#ececec;padding:10px;margin-top:10px}.blubrry-services .blubrry-stats{background-image:url('../images/StatsIcon.png')}.blubrry-services .blubrry-hosting{margin-right:50px;background-image:url('../images/blubrry_icon.png')}@media screen and (min-width:1px) and (max-width:819px){.powerpress-step{width:170px}#powerpress_steps p{font-size:16px;margin:20px 4px}.blubrry-services .blubrry-hosting{margin-right:20px}}@media screen and (min-width:1px) and (max-width:729px){#powerpreess_step_1{background-position:1px bottom}#powerpress_steps p{margin:10px 4px}.blubrry-services .blubrry-hosting{margin-right:10px}.powerpress-step{width:24%;margin-left:30px}}.numberCircle{border-radius:50%;behavior:url(PIE.htc);width:36px;height:36px;padding:8px;background:#fff;border:2px solid #666;color:#666;text-align:center;font:32px Arial,sans-serif}#powerpress_settings_page,#powerpress_settings_page .ui-state-default,#powerpress_settings_page .ui-widget-content .ui-state-default,#powerpress_settings_page .ui-widget-header,#powerpress_settings_page .ui-widget-header .ui-state-default{border:none;background:0 0}#powerpress_settings_page{background-color:inherit}td:hover,th{background-color:#fff}#powerpress_settings_page .ui-tabs-nav li{margin-bottom:0;border-bottom:none}#powerpress_settings_page .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}#powerpress_settings_page .ui-tabs-nav li a{padding:4px 5px 2px}#powerpress_settings_page .ui-tabs-nav li.ui-tabs-active a{padding:4px 5px 3px}#powerpress_settings_page .powerpress_tab{background-color:#fff;border-collapse:separate;border:1px solid #b3b3b3}.pp-section{clear:both;padding:0;margin:0}a.pp-expand-section,a.pp-expand-section:focus,a.pp-expand-section:hover,a.pp-expand-section:visited{color:#1976d2}.pp-expand-section-expanded:before,.pp-expand-section:before{background-color:#1976d2;border:1px solid #1976d2;border-radius:3px;font-weight:700;color:#fff;height:20px;width:20px;display:inline-block;margin-right:10px;text-align:center;font-size:20px}.pp-expand-section:before{content:' \25C4';content:'+';line-height:20px}.pp-expand-section-expanded:before{content:' \25BC';content:'-';line-height:16px}.bbplayer_settings .form-table th{padding-bottom:0}.bbplayer_settings h3{color:#036;font-weight:700}small,td.pendingApply{color:grey}.wp-core-ui .button-blubrry{background:#1976d2;border-color:#1976d2;color:#fff}.wp-core-ui .button-blubrry-gray{background:#f7f7f7;border-color:#ccc;color:#555}.wp-core-ui .button-blubrry:focus,.wp-core-ui .button-blubrry:hover{background:#0d87e9;border-color:#0d87e9;color:#fff}.pp-form-error{border:1px solid red}table{width:60%;margin-top:1%;margin-bottom:1%;border-radius:4px;background-color:#f8f8f8;border:solid #ddd}input,textarea{border-radius:4px}ul{clear:both}tr{line-height:12px}td,th{border-bottom:solid #ddd;padding:2.5%}td{font-size:115%}th{color:#000;border-radius:4px 4px 0 0;text-align:center;font-size:100%}th.pendingApply{background-color:grey}th.approvedApply,th.processedApply{background-color:#8fbc8f}td.approvedApply,td.processedApply{color:green}td.disapprovedApply{color:red}th.disapprovedApply{background-color:#8b0000}input[type=email],input[type=password],input[type=text],input[type=url],textarea{width:100%;padding:.6%;display:inline-block;border:1px solid #ccc;box-sizing:border-box}.dropdownChoice,.linkInput{width:50%!important}input[type=radio]{transform:scale(1)}select{width:100%}.ppn-back-button{background:0 0;margin:5px 10px;padding:5px;color:#069;cursor:pointer}#signinButton,.backButton,.primaryButton,.subToggleButton,.toggleButton,.warningButton{color:#fff;font-weight:500;box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);font-size:13px;padding:1ch 2em;cursor:pointer;display:inline-block;font-family:Roboto,sans-serif;text-align:center}#signinButton,.backButton,.primaryButton,.subToggleButton,.toggleButton{border:none;border-radius:4px;background-color:#0c74d5}.warningButton{border:none;border-radius:4px;background-color:#b00000;margin-right:1em}.cacheButton,.tab{background-color:#fff}.cacheButton{box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);color:#000;display:inline-block;border-radius:4px;font-family:Roboto,sans-serif;font-size:13px;font-weight:700;padding:1ch 2em;margin-right:1em;cursor:pointer;text-align:center;border:0}#signinButton{width:100%;border-radius:0}.toggleButton{display:inline;width:10%;height:60%;margin:0}.subToggleButton{display:inline;width:7.5%;height:6%;background-color:#696969}.applicantButton{box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);border:none;border-radius:4px;color:#fff;font-family:Roboto,sans-serif;font-size:13px;font-weight:500;padding:1ch 2em;margin-right:1em;cursor:pointer;text-align:center}.cancelButton{background-color:#0c74d5;color:#fff;padding:1%;margin:0 auto;cursor:pointer;border-radius:4px;font-size:90%;width:auto;vertical-align:top;border:1px solid #000}.cancelButton:hover{cursor:pointer;text-decoration:underline}#choiceForm{margin-top:2%}.tab{border-bottom:1px solid grey}.tabActive,.tabInactive{padding:1.4% 1.4% 2%;border:none;font-size:150%;background-color:#fff;cursor:pointer}.tabInactive{color:#a9a9a9}.tabActive{color:#000;border-bottom:2px solid #00f;font-weight:700}.programRow{padding:1% 5% 1% 1%;background-color:#fff;border-bottom:1px solid #000}.programRow:hover{background-color:#d3d3d3}button:hover{opacity:.8}.pageTitle{padding:0 auto;font-size:220%;letter-spacing:1px;line-height:100%}.alertMessage,.closebtn{vertical-align:middle;line-height:normal}h3.baseChoice{text-decoration:underline #0C74D5;display:block;font-size:150%;color:#0c74d5}p{margin:5px auto;display:inline-block;font-size:105%}.container{padding:1.8% 15% 1.8% 10%;margin:.08%}.alert,.alert-success{font-size:130%;padding:.5%;display:inline-block;width:99%;color:#fff}ul.choiceList{list-style-type:square;padding-left:5%}ul.subChoiceList{list-style-type:circle;padding-left:10%}ul.mainChoiceList{list-style-type:none;max-width:850px}li.material-list{border-radius:4px;padding:2px 15px 20px;margin-bottom:25px;background-color:#fff}.alert{background-color:#f44336}.alert.alert-danger{background-color:#fef7f8;border-left-color:#e36f58;color:#444;border-left-width:4px;max-width:100%}.alert-success{background-color:#8fbc8f}.closebtn{color:#fff;font-weight:700;float:right;cursor:pointer;transition:.3s}.alertMessage{float:left}small{font-size:100%;padding:0 auto;margin-bottom:10%;font-style:italic}.closebtn:hover{color:#000}label{font-size:85%}br{height:10%}figure{width:6px;height:6px;border-radius:5px;background:#000;margin:3px 0}#choiceBox,.confirmUnlink,.selectPageBox{background-color:#fff;padding:0 0 2%;width:50%;text-align:center;margin-bottom:5%;border-radius:4%}.settingBox{background-color:#fff;padding:2%;width:100%;margin-top:2%;margin-bottom:2%;border-radius:4px;border:1px solid #f5f5f5}.hosting-marketing-blubrry-logo,.hosting-marketing-button{display:inline-block;width:20%;vertical-align:middle}.boxTitle{padding:2%;background-color:#0c74d5;color:#fff;border-radius:4px}.thickboxTitle{color:navy}.material-icons:hover{cursor:pointer}@media only screen and (max-width:980px){.alert,.alert-success{font-size:80%}input[type=checkbox],input[type=radio]{transform:scale(.7)}}@media only screen and (max-width:1092px){#choiceBox,table{width:100%}td{font-size:70%}th{font-size:80%}}@media only screen and (max-width:500px){#choiceBox,table{width:100%}td{font-size:70%}th{font-size:80%}input[type=checkbox],input[type=radio]{transform:scale(.5)}}.powerpress-blubrry-hosting-marketing{max-width:80rem;margin:0 auto 2rem;padding:2ch 2em;background-color:#fff;border-radius:4px;border-top:2px solid rgba(144,144,144,.25)}.hosting-marketing-text-container{display:inline-block;margin-left:2em;height:100%;vertical-align:middle}.hosting-marketing-title{color:#0c74d5;font-weight:700}a.hosting-marketing-text{color:#0c74d5}.hosting-marketing-button{border-radius:4px;background-color:#0c74d5;color:#fff;font-family:Roboto,sans-serif;font-size:16px;padding:1ch 2em;cursor:pointer;text-align:center;font-weight:700;border:none;margin-left:1em}@media (max-width:1110px){.hosting-marketing-button{width:95%;padding-top:1em;padding-bottom:1em;margin-right:1em}.hosting-marketing-text-container{width:70%!important}.hosting-marketing-blubrry-logo{margin-left:1em}}@media (max-width:799px){#destinations-blubrry .hosting-marketing-blubrry-logo{width:70%;margin-right:1em;margin-bottom:1em;margin-left:0}#destinations-blubrry .hosting-marketing-text-container{width:90%!important;margin-left:0}}@media (max-width:599px){#destinations-blubrry .hosting-marketing-blubrry-logo{width:80%}}@media (max-width:480px){.hosting-marketing-blubrry-logo{width:90%;margin-right:1em;margin-bottom:1em;margin-left:0}.hosting-marketing-text-container{width:90%!important;margin-left:0}.hosting-marketing-button{margin-left:0}}.pp-page-header{font-size:30px;font-weight:500;margin-bottom:10px}.pp-page-sub-header{font-size:25px;font-weight:500;margin-bottom:10px;margin-top:10px}.pp-page-h3{font-weight:400}.pp-page-h3-bold{font-weight:500}.pp-card-body{background-color:#fff;border-radius:4px;padding:35px 25px 25px}.diagnostics-message,.preview-changes-list{border:1px solid #000}.pp-tools-item,.pp-tools-text{float:left}.pp-tools-text{margin:0 0 30px}.pp-tools-button{margin-left:auto;margin-top:15px;height:fit-content;padding:10px 30px!important;cursor:pointer;min-width:10%;text-align:center}.pp-tools-button:hover{color:#fff;background:#4e93d9}.pp-row{display:flex;flex-wrap:wrap}.pp-tools-row{padding-left:30px;padding-right:30px}.pp-page-back-link{margin:0 0 10px}.find-and-replace-input{margin-top:6px;width:50%!important;height:50%}.preview-changes-row{padding:10px}.colored-row{background:#eee}.hosting-platform-button{border:1px solid #000;padding:10px 5px;text-decoration:none;color:#000;margin-right:15px;text-align:center}.hosting-platform-button:hover{color:#000;background:#eee}.diagnostics-message{padding:0 20px;margin:0 30px 30px}.hosting-platform-img{width:25%;float:left;margin-left:15px}.hosting-platform-text{margin-top:10px}
images/anchor.png ADDED
Binary file
images/buzzsprout.png ADDED
Binary file
images/libsyn.png ADDED
Binary file
images/podbean.png ADDED
Binary file
images/rss.png ADDED
Binary file
images/soundcloud.png ADDED
Binary file
images/squarespace.png ADDED
Binary file
powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
- Version: 9.5.1
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
@@ -35,7 +35,7 @@ if( !function_exists('add_action') ) {
35
  }
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
- define('POWERPRESS_VERSION', '9.5.1' );
39
 
40
  // Translation support:
41
  if ( !defined('POWERPRESS_ABSPATH') )
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
+ Version: 9.6
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
35
  }
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
+ define('POWERPRESS_VERSION', '9.6' );
39
 
40
  // Translation support:
41
  if ( !defined('POWERPRESS_ABSPATH') )
powerpressadmin-basic.php CHANGED
@@ -42,7 +42,7 @@ function powerpress_admin_basic()
42
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
43
 
44
  ?>
45
- <script type="text/javascript"><!--
46
 
47
  jQuery(document).ready(function($) {
48
 
@@ -154,6 +154,11 @@ jQuery(document).ready(function($) {
154
  ?>
155
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
156
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
 
157
  </div>
158
  </div>
159
  <button style="display: none;" id="welcome-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'welcome-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
@@ -179,6 +184,10 @@ jQuery(document).ready(function($) {
179
  ?>
180
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
181
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
182
  </div>
183
  </div>
184
  <div id="feeds-feeds" class="pp-sidenav-tab active">
@@ -241,6 +250,10 @@ jQuery(document).ready(function($) {
241
  ?>
242
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
243
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
244
  </div>
245
  </div>
246
 
@@ -338,6 +351,10 @@ jQuery(document).ready(function($) {
338
  ?>
339
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
340
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
341
  </div>
342
  </div>
343
  <?php
@@ -354,6 +371,10 @@ jQuery(document).ready(function($) {
354
  ?>
355
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
356
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
357
  </div>
358
  </div>
359
  <?php
@@ -427,6 +448,27 @@ function goToPodcastSEO() {
427
  <button style="display: none;" id="advanced-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'advanced-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
428
  <div id="advanced-all" class="pp-sidenav-tab active">
429
  <h1 class="pp-heading"><?php echo __('Advanced Settings', 'powerpress'); ?></h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
  <div>
431
  <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="NULL[import_podcast]" value="1" checked disabled />
432
  <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
42
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
43
 
44
  ?>
45
+ <script type="text/javascript">
46
 
47
  jQuery(document).ready(function($) {
48
 
154
  ?>
155
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
156
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
157
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
158
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
159
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
160
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
161
+
162
  </div>
163
  </div>
164
  <button style="display: none;" id="welcome-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'welcome-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
184
  ?>
185
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
186
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
187
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
188
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
189
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
190
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
191
  </div>
192
  </div>
193
  <div id="feeds-feeds" class="pp-sidenav-tab active">
250
  ?>
251
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
252
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
253
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
254
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
255
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
256
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
257
  </div>
258
  </div>
259
 
351
  ?>
352
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
353
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
354
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
355
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
356
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
357
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
358
  </div>
359
  </div>
360
  <?php
371
  ?>
372
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
373
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
374
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
375
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
376
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
377
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
378
  </div>
379
  </div>
380
  <?php
448
  <button style="display: none;" id="advanced-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'advanced-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
449
  <div id="advanced-all" class="pp-sidenav-tab active">
450
  <h1 class="pp-heading"><?php echo __('Advanced Settings', 'powerpress'); ?></h1>
451
+
452
+ <div>
453
+ <input type="hidden" name="General[network_mode]" value="0" />
454
+ <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[network_mode]" value="1" <?php echo ( !empty($General['network_mode']) ?' checked':''); ?>/>
455
+ <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
456
+ <p class="pp-main"><?php echo __('Multi-Program Mode', 'powerpress'); ?></p>
457
+ <p class="pp-sub"><?php echo __('This feature allows you to publish to multiple Blubrry-hosted shows from a single user account.', 'powerpress'); ?></p>
458
+ </div>
459
+ </div>
460
+
461
+ <div>
462
+ <input type="hidden" name="General[use_caps]" value="0" />
463
+ <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[use_caps]" value="1" <?php echo ( !empty($General['use_caps']) ?' checked':''); ?>/>
464
+ <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
465
+ <p class="pp-main"><?php echo __('User Role Management', 'powerpress'); ?></p>
466
+ <p class="pp-sub"><?php echo __('Adding User Role Management will allow administrators, editors and authors access to create and configure podcast episodes.
467
+ This feature is supported by WordPress Roles and Capabilities.', 'powerpress'); ?>
468
+ </p>
469
+ </div>
470
+ </div>
471
+
472
  <div>
473
  <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="NULL[import_podcast]" value="1" checked disabled />
474
  <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
powerpressadmin-categoryfeeds.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
 
3
- if( !function_exists('add_action') )
4
- die("access denied.");
5
-
6
- function powerpress_admin_customfeeds_columns($data=array())
7
- {
8
  $data['name'] = __('Category Name', 'powerpress');
9
  $data['feed-slug'] = __('Slug', 'powerpress');
10
  $data['url'] = __('Feed URL', 'powerpress');
@@ -13,225 +13,209 @@ function powerpress_admin_customfeeds_columns($data=array())
13
 
14
  add_filter('manage_powerpressadmin_categoryfeeds_columns', 'powerpress_admin_customfeeds_columns');
15
 
16
- function powerpress_admin_categoryfeeds()
17
- {
18
  $General = powerpress_get_settings('powerpress_general');
19
 
20
  // If we have powerpress credentials, check if the account has been verified
21
  $creds = get_option('powerpress_creds');
22
  powerpress_check_credentials($creds);
23
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
24
- ?>
25
- <h2><?php echo __('Category Podcasting', 'powerpress'); ?></h2>
26
- <p>
27
- <?php echo __('Category Podcasting adds custom podcast settings to specific blog category feeds, allowing you to organize episodes by topic.', 'powerpress'); ?>
28
- </p>
29
- <style type="text/css">
30
- .column-url {
31
- width: 40%;
32
- }
33
- .column-name {
34
- width: 30%;
35
- }
36
- .column-feed-slug {
37
- width: 15%;
38
- }
39
- .column-episode-count {
40
- width: 15%;
41
- }
42
- .category-list {
43
- width: 100%;
44
- }
45
- </style>
46
- <div id="col-container">
47
-
48
- <div id="col-right">
49
- <table class="widefat fixed" cellspacing="0">
50
- <thead>
51
- <tr>
52
- <?php
53
- print_column_headers('powerpressadmin_categoryfeeds');
54
- ?>
55
- </tr>
56
- </thead>
57
-
58
- <tfoot>
59
- <tr>
60
- <?php
61
- print_column_headers('powerpressadmin_categoryfeeds', false);
62
- ?>
63
- </tr>
64
- </tfoot>
65
- <tbody>
66
- <?php
67
-
68
-
69
- $Feeds = array();
70
- if( isset($General['custom_cat_feeds']) )
71
- $Feeds = $General['custom_cat_feeds'];
72
-
73
- $count = 0;
74
- foreach( $Feeds as $null => $cat_ID )
75
- {
76
- if( empty($cat_ID) )
77
- continue;
78
- $category = get_category_to_edit($cat_ID);
79
- if( is_wp_error($category) ) {
80
- // $cat_ID does not existing
81
- continue;
82
- }
83
-
84
- $columns = powerpress_admin_customfeeds_columns();
85
- $hidden = array();
86
-
87
- if( $count % 2 == 0 )
88
- echo '<tr valign="middle" class="alternate">';
89
- else
90
- echo '<tr valign="middle">';
91
-
92
- $edit_link = admin_url('admin.php?page='. powerpress_admin_get_page() .'&amp;action=powerpress-editcategoryfeed&amp;cat=') . $cat_ID;
93
-
94
- $feed_title = $category->name;
95
-
96
- if( !empty($General['cat_casting_podcast_feeds']) )
97
- $url = get_category_feed_link($cat_ID, 'podcast');
98
- else
99
- $url = get_category_feed_link($cat_ID);
100
-
101
- $short_url = str_replace('http://', '', $url);
102
- $short_url = str_replace('www.', '', $short_url);
103
- if (strlen($short_url) > 35)
104
- $short_url = substr($short_url, 0, 32).'...';
105
-
106
- foreach($columns as $column_name=>$column_display_name) {
107
- $class = "class=\"column-$column_name\"";
108
-
109
-
110
-
111
- //$short_url = '';
112
-
113
- switch($column_name) {
114
- case 'feed-slug': {
115
-
116
- echo "<td $class>{$category->slug}";
117
- echo "</td>";
118
-
119
- }; break;
120
- case 'name': {
121
-
122
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_html($feed_title) .'</a></strong><br />';
123
- $actions = array();
124
- $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
125
- $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=". powerpress_admin_get_page() ."&amp;action=powerpress-delete-category-feed&amp;cat=$cat_ID", 'powerpress-delete-category-feed-' . $cat_ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for category feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_html($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
126
- $action_count = count($actions);
127
- $i = 0;
128
- echo '<div class="row-actions">';
129
- foreach ( $actions as $action => $linkaction ) {
130
- ++$i;
131
- ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
132
- echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
133
- }
134
- echo '</div>';
135
- echo '</td>';
136
-
137
- }; break;
138
-
139
- case 'url': {
140
-
141
- echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
142
- echo '<div class="row-actions">';
143
- if( defined('POWERPRESS_FEEDVALIDATOR_URL') ) {
144
- echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
145
- }
146
- echo '</div>';
147
- echo "</td>";
148
-
149
- }; break;
150
-
151
- case 'episode-count': {
152
-
153
- echo "<td $class>$episode_total";
154
- echo "</td>";
155
-
156
- }; break;
157
- default: {
158
-
159
- }; break;
160
- }
161
- }
162
- echo "\n </tr>\n";
163
- $count++;
164
- }
165
- ?>
166
- </tbody>
167
- </table>
168
- </div> <!-- col-right -->
169
-
170
- <div id="col-left">
171
- <div class="col-wrap">
172
- <div class="form-wrap">
173
- <h3><?php echo __('Add Podcast Settings to existing Category Feed', 'powerpress'); ?></h3>
174
- <input type="hidden" name="action" value="powerpress-addcategoryfeed" />
175
- <input type="hidden" name="taxonomy" value="category" />
176
- <?php
177
- //wp_original_referer_field(true, 'previous');
178
- wp_nonce_field('powerpress-add-taxonomy-feed');
179
- ?>
180
-
181
- <div class="form-field form-required">
182
- <label for="feed_name"><?php echo __('Category', 'powerpress') ?></label>
183
- <?php
184
- wp_dropdown_categories( array('class'=>'category-list', 'show_option_none'=>__('Select Category', 'powerpress'), 'orderby'=>'name', 'hide_empty'=>0, 'hierarchical'=>1, 'name'=>'term', 'id'=>'term_id' ) );
185
- ?>
186
-
187
-
188
- </div>
189
-
190
- <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo __('Add Podcast Settings to Category Feed', 'powerpress'); ?>" /></p>
191
-
192
- </div>
193
- </div>
194
-
195
- </div> <!-- col-left -->
196
-
197
- </div> <!-- col-container -->
198
-
199
- <h3><?php echo __('Example Usage', 'powerpress'); ?></h3>
200
- <p>
201
- <?php echo __('Example 1: You have a podcast that covers two topics that sometimes share same posts and sometimes do not. Use your main podcast feed as a combined feed of both topics and use category feeds to distribute topic specific episodes.', 'powerpress'); ?>
202
- </p>
203
- <p>
204
- <?php echo __('Example 2: You want to use categories to keep episodes separate from each other. Each category can be used to distribute separate podcasts with the main podcast feed combining all categories to provide a network feed.', 'powerpress'); ?>
205
- </p>
206
- </form>
207
- <br />
208
-
209
- <form enctype="multipart/form-data" method="post" action="<?php echo admin_url( 'admin.php?page='. powerpress_admin_get_page() ) ?>">
210
- <input type="hidden" name="action" value="powerpress-category-settings" />
211
- <?php wp_nonce_field('powerpress-category-settings'); ?>
212
- <h3><?php echo __('Category Podcasting Settings', 'powerpress'); ?></h3>
213
- <table class="form-table">
214
- <tr valign="top">
215
- <th scope="row">
216
- <?php echo __('Strict Categories', 'powerpress'); ?></th>
217
- <td>
218
- <p><input type="hidden" name="cat_casting_strict" value="0" />
219
- <label><input type="checkbox" name="cat_casting_strict" value="1" <?php echo ( !empty($General['cat_casting_strict']) ?'checked ':''); ?>/>
220
- <?php echo __('Select a specific category to each episode for statistics tracking and subscription links.', 'powerpress'); ?></label></p>
221
- </td>
222
- </tr>
223
- <tr valign="top">
224
- <th scope="row">
225
- <?php echo __('Podcast Only Feeds', 'powerpress'); ?></th>
226
- <td>
227
- <p><input type="hidden" name="cat_casting_podcast_feeds" value="0" />
228
- <label><input type="checkbox" name="cat_casting_podcast_feeds" value="1" <?php echo ( !empty($General['cat_casting_podcast_feeds']) ?'checked ':''); ?>/>
229
- <?php echo __('Enable to separate blog posts from podcast episodes.', 'powerpress'); ?></label></p>
230
- </td>
231
- </tr>
232
- </table>
233
- <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo __('Save Settings', 'powerpress'); ?>" /></p>
234
- <?php
235
- }
236
-
237
- // eof
1
  <?php
2
 
3
+ if(!function_exists('add_action')){
4
+ die("access denied.");
5
+ }
6
+
7
+ function powerpress_admin_customfeeds_columns($data=array()){
8
  $data['name'] = __('Category Name', 'powerpress');
9
  $data['feed-slug'] = __('Slug', 'powerpress');
10
  $data['url'] = __('Feed URL', 'powerpress');
13
 
14
  add_filter('manage_powerpressadmin_categoryfeeds_columns', 'powerpress_admin_customfeeds_columns');
15
 
16
+ function powerpress_admin_categoryfeeds(){
 
17
  $General = powerpress_get_settings('powerpress_general');
18
 
19
  // If we have powerpress credentials, check if the account has been verified
20
  $creds = get_option('powerpress_creds');
21
  powerpress_check_credentials($creds);
22
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
23
+ ?>
24
+
25
+ <h2 class="pp-page-header"><?php echo __('Category Podcasting', 'powerpress'); ?></h2>
26
+ <h3 class="pp-page-h3"><?php echo __('Category Podcasting adds custom podcast settings to specific blog category feeds, allowing you to organize episodes by topic.', 'powerpress'); ?></h3>
27
+
28
+ <div class="pp-card-body">
29
+ <div class="pp-row pp-tools-row">
30
+ <div class="pp-col-50">
31
+ <div class="pp-row">
32
+ <h2 class="pp-page-sub-header">Add Podcast Category</h2>
33
+ </div>
34
+
35
+ <div class="form-field form-required">
36
+ <h3><label for="feed_name"><?php echo __('Select Category', 'powerpress') ?></label></h3>
37
+ <?php wp_dropdown_categories(array('class'=>'category-list', 'show_option_none'=>__('Select Category', 'powerpress'), 'orderby'=>'name', 'hide_empty'=>0, 'hierarchical'=>1, 'name'=>'term', 'id'=>'term_id')); ?>
38
+ </div>
39
+
40
+ <p class="submit"><input style="background-color: white; color: #4e93d9; border: 1px solid #4e93d9" type="submit" class="powerpress_save_button_other pp-tools-button" name="submit" value="<?php echo __('ADD SETTINGS TO CATEGORY FEED', 'powerpress'); ?>"/></p>
41
+
42
+
43
+ </div>
44
+ <div class="pp-col-50">
45
+ <div class="pp-row">
46
+ <h2 class="pp-page-sub-header">Why would I use Podcast Categories?</h2>
47
+ </div>
48
+
49
+ <ul style="list-style: unset; padding-left: 20px;">
50
+ <li>
51
+ <h3 style="font-weight: 400;">You have a podcast that covers two topics that sometimes share same posts and sometimes do not. Use your main podcast feed as a combined feed of both topics and use category feeds to distribute topic specific episodes.</h3>
52
+ </li>
53
+ <li>
54
+ <h3 style="font-weight: 400;">You want to use categories to keep episodes separate from each other. Each category can be used to distribute separate podcasts with the main podcast feed combining all categories to provide a network feed</h3>
55
+ </li>
56
+ </ul>
57
+ </div>
58
+ </div>
59
+
60
+
61
+ <div class="pp-row pp-tools-row">
62
+ <div class="pp-row" style="width: 100%;">
63
+ <h2 class="pp-page-sub-header">Category Podcast Settings</h2>
64
+ </div>
65
+
66
+ <h3 style="width: 100%;">Strict Categories</h3>
67
+ <p style="margin: 0;">
68
+ <input type="hidden" name="cat_casting_strict" value="0" />
69
+
70
+ <label>
71
+ <input type="checkbox" name="cat_casting_strict" value="1" <?php echo ( !empty($General['cat_casting_strict']) ?'checked ':''); ?>/>
72
+ <?php echo __('Select a specific category to each episode for statistics tracking and subscription links.', 'powerpress'); ?>
73
+ </label>
74
+ </p>
75
+
76
+
77
+ <h3 style="width: 100%;">Podcast Only Feeds</h3>
78
+ <p style="margin: 0;">
79
+ <input type="hidden" name="cat_casting_podcast_feeds" value="0" />
80
+
81
+ <label>
82
+ <input type="checkbox" name="cat_casting_podcast_feeds" value="1" <?php echo ( !empty($General['cat_casting_podcast_feeds']) ?'checked ':''); ?>/>
83
+ <?php echo __('Enable to separate blog posts from podcast episodes.', 'powerpress'); ?>
84
+ </label>
85
+ </p>
86
+ </div>
87
+
88
+ <div class="pp-row pp-tools-row">
89
+ <p class="submit" style="margin: 0;"><input type="submit" class="powerpress_save_button_other pp-tools-button" name="submit" value="<?php echo __('Save Settings', 'powerpress'); ?>" /></p>
90
+ </div>
91
+
92
+ <hr>
93
+
94
+ <div class="pp-row pp-tools-row" style="margin-top: 20px;">
95
+ <div class="pp-row">
96
+ <h2 class="pp-page-sub-header">List of Categories</h2>
97
+ </div>
98
+ </div>
99
+
100
+ <div class="pp-row pp-tools-row" style="margin-top: 20px;">
101
+ <table class="widefat fixed">
102
+ <thead>
103
+ <tr>
104
+ <?php print_column_headers('powerpressadmin_categoryfeeds'); ?>
105
+ </tr>
106
+ </thead>
107
+
108
+ <tfoot>
109
+ <tr>
110
+ <?php print_column_headers('powerpressadmin_categoryfeeds', false); ?>
111
+ </tr>
112
+ </tfoot>
113
+
114
+ <tbody>
115
+ <?php
116
+ $Feeds = array();
117
+ if(isset($General['custom_cat_feeds'])){
118
+ $Feeds = $General['custom_cat_feeds'];
119
+ }
120
+
121
+ $count = 0;
122
+ foreach($Feeds as $null => $cat_ID){
123
+ if(empty($cat_ID)){
124
+ continue;
125
+ }
126
+ $category = get_category_to_edit($cat_ID);
127
+ if(is_wp_error($category)){
128
+ // $cat_ID does not existing
129
+ continue;
130
+ }
131
+
132
+ $columns = powerpress_admin_customfeeds_columns();
133
+ $hidden = array();
134
+
135
+ if($count % 2 == 0){
136
+ echo '<tr class="alternate">';
137
+ } else {
138
+ echo '<tr>';
139
+ }
140
+
141
+ $edit_link = admin_url('admin.php?page='. powerpress_admin_get_page() .'&amp;action=powerpress-editcategoryfeed&amp;cat=') . $cat_ID;
142
+
143
+ $feed_title = $category->name;
144
+
145
+ if(!empty($General['cat_casting_podcast_feeds'])){
146
+ $url = get_category_feed_link($cat_ID, 'podcast');
147
+ } else {
148
+ $url = get_category_feed_link($cat_ID);
149
+ }
150
+
151
+ $short_url = str_replace('http://', '', $url);
152
+ $short_url = str_replace('www.', '', $short_url);
153
+ if(strlen($short_url) > 35){
154
+ $short_url = substr($short_url, 0, 32).'...';
155
+ }
156
+
157
+ foreach($columns as $column_name=>$column_display_name){
158
+ $class = "class=\"column-$column_name\"";
159
+
160
+ switch($column_name){
161
+ case 'feed-slug': {
162
+ echo "<td $class>{$category->slug}";
163
+ echo "</td>";
164
+
165
+ } break;
166
+
167
+ case 'name': {
168
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_html($feed_title) .'</a></strong><br />';
169
+ $actions = array();
170
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
171
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=". powerpress_admin_get_page() ."&amp;action=powerpress-delete-category-feed&amp;cat=$cat_ID", 'powerpress-delete-category-feed-' . $cat_ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for category feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_html($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
172
+ $action_count = count($actions);
173
+ $i = 0;
174
+ echo '<div class="row-actions">';
175
+ foreach($actions as $action => $linkaction){
176
+ ++$i;
177
+ ($i == $action_count) ? $sep = '' : $sep = ' | ';
178
+ echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
179
+ }
180
+ echo '</div>';
181
+ echo '</td>';
182
+
183
+ } break;
184
+
185
+ case 'url': {
186
+ echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
187
+ echo '<div class="row-actions">';
188
+ if(defined('POWERPRESS_FEEDVALIDATOR_URL')){
189
+ echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
190
+ }
191
+ echo '</div>';
192
+ echo "</td>";
193
+
194
+ } break;
195
+
196
+ case 'episode-count': {
197
+ echo "<td $class>$episode_total";
198
+ echo "</td>";
199
+
200
+ } break;
201
+ default: {
202
+
203
+ } break;
204
+ }
205
+ }
206
+ echo "\n </tr>\n";
207
+ $count++;
208
+ }
209
+ ?>
210
+ </tbody>
211
+ </table>
212
+ </div>
213
+ </div>
214
+
215
+ <style>
216
+ .pp-col-50 {
217
+ width: 50%;
218
+ }
219
+ </style>
220
+
221
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
powerpressadmin-customfeeds.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
 
3
- if( !function_exists('add_action') )
4
- die("access denied.");
5
-
6
- function powerpress_admin_customfeeds_columns($data=array())
7
- {
8
  $data['name'] = __('Name', 'powerpress');
9
  $data['feed-slug'] = __('Slug', 'powerpress');
10
  $data['episode-count'] = __('Episodes', 'powerpress');
@@ -14,204 +14,196 @@ function powerpress_admin_customfeeds_columns($data=array())
14
 
15
  add_filter('manage_powerpressadmin_customfeeds_columns', 'powerpress_admin_customfeeds_columns');
16
 
17
- function powerpress_admin_customfeeds()
18
- {
19
  $General = powerpress_get_settings('powerpress_general');
20
 
21
-
22
  // If we have powerpress credentials, check if the account has been verified
23
  $creds = get_option('powerpress_creds');
24
  powerpress_check_credentials($creds);
25
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
26
- ?>
27
- <h2><?php echo __('Custom Podcast Channels', 'powerpress'); ?></h2>
28
- <p>
29
- <?php echo __('Custom podcast Channels allow you to associate multiple media files and/or formats to one blog post.', 'powerpress'); ?>
30
- </p>
31
-
32
- <style type="text/css">
33
-
34
- .column-url {
35
- width: 40%;
36
- }
37
- .column-name {
38
- width: 30%;
39
- }
40
- .column-feed-slug {
41
- width: 15%;
42
- }
43
- .column-episode-count {
44
- width: 15%;
45
- }
46
- </style>
47
- <div id="col-container">
48
-
49
- <div id="col-right">
50
- <table class="widefat fixed" cellspacing="0">
51
- <thead>
52
- <tr>
53
- <?php
54
- print_column_headers('powerpressadmin_customfeeds');
55
- ?>
56
- </tr>
57
- </thead>
58
-
59
- <tfoot>
60
- <tr>
61
- <?php
62
- print_column_headers('powerpressadmin_customfeeds', false);
63
- ?>
64
- </tr>
65
- </tfoot>
66
- <tbody>
67
- <?php
68
-
69
-
70
- $Feeds = array('podcast'=>__('Podcast', 'powerpress') );
71
- if( isset($General['custom_feeds']['podcast']) )
72
- $Feeds = $General['custom_feeds'];
73
- else if( is_array($General['custom_feeds']) )
74
- $Feeds += $General['custom_feeds'];
75
-
76
- asort($Feeds, SORT_STRING); // Sort feeds
77
-
78
- $count = 0;
79
- foreach( $Feeds as $feed_slug => $feed_title )
80
- {
81
- $feed_slug = esc_attr($feed_slug); // Precaution
82
- $episode_total = powerpress_admin_episodes_per_feed($feed_slug);
83
- $columns = powerpress_admin_customfeeds_columns();
84
- $hidden = array();
85
- if( $feed_slug == 'podcast' )
86
- $feed_title = __('Podcast', 'powerpress');
87
- if( $count % 2 == 0 )
88
- echo '<tr valign="middle" class="alternate">';
89
- else
90
- echo '<tr valign="middle">';
91
-
92
- foreach($columns as $column_name=>$column_display_name) {
93
- $class = "class=\"column-$column_name\"";
94
-
95
- $edit_link = admin_url('admin.php?page='. powerpress_admin_get_page() .'&amp;action=powerpress-editfeed&amp;feed_slug=') . $feed_slug;
96
-
97
- $url = get_feed_link($feed_slug);
98
- $short_url = str_replace('http://', '', $url);
99
- $short_url = str_replace('www.', '', $short_url);
100
- //if ('/' == substr($short_url, -1))
101
- // $short_url = substr($short_url, 0, -1);
102
- if (strlen($short_url) > 35)
103
- $short_url = substr($short_url, 0, 32).'...';
104
-
105
- //$short_url = '';
106
-
107
- switch($column_name) {
108
- case 'feed-slug': {
109
-
110
- echo "<td $class>$feed_slug";
111
- echo "</td>";
112
-
113
- }; break;
114
- case 'name': {
115
-
116
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_html($feed_title) .'</a></strong>'. ( $feed_slug == 'podcast' ?' ('. __('default channel', 'powerpress') .')':'').'<br />';
117
- $actions = array();
118
- $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
119
- $actions['delete'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=". powerpress_admin_get_page() ."&amp;action=powerpress-delete-feed&amp;feed_slug=$feed_slug", 'powerpress-delete-feed-' . $feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to delete feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Delete', 'powerpress') . "</a>";
120
- if( !isset($General['custom_feeds'][ $feed_slug ]) )
121
- {
122
- unset($actions['delete']);
123
- }
124
- $action_count = count($actions);
125
- $i = 0;
126
- echo '<div class="row-actions">';
127
- foreach ( $actions as $action => $linkaction ) {
128
- ++$i;
129
- ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
130
- echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
131
- }
132
- echo '</div>';
133
- echo '</td>';
134
-
135
- }; break;
136
-
137
- case 'url': {
138
-
139
- echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">". esc_html($short_url) ."</a>";
140
- echo '<div class="row-actions">';
141
- if( defined('POWERPRESS_FEEDVALIDATOR_URL') ) {
142
- echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode($url) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
143
- }
144
- echo '</div>';
145
- echo "</td>";
146
-
147
- }; break;
148
-
149
- case 'episode-count': {
150
-
151
- echo "<td $class>$episode_total";
152
- echo "</td>";
153
-
154
- }; break;
155
- default: {
156
-
157
- }; break;
158
- }
159
- }
160
- echo "\n </tr>\n";
161
- $count++;
162
- }
163
- ?>
164
- </tbody>
165
- </table>
166
- <?php if( !isset($General['custom_feeds'][ $feed_slug ]) ) { ?>
167
- <p><?php echo sprintf( __('Note: The default channel "Podcast" is currently using global PowerPress settings. Click %s to customize the default "Podcast" channel.', 'powerpress'),
168
- '<a href="'. admin_url('admin.php?page='. powerpress_admin_get_page() .'&amp;action=powerpress-editfeed&amp;feed_slug=podcast') .'">'. __('Edit', 'powerpress') .'</a>'); ?></p>
169
- <?php } ?>
170
- </div> <!-- col-right -->
171
-
172
- <div id="col-left">
173
- <div class="col-wrap">
174
- <div class="form-wrap">
175
- <h3><?php echo __('Add Podcast Channel', 'powerpress'); ?></h3>
176
- <div id="ajax-response"></div>
177
- <input type="hidden" name="action" value="powerpress-addfeed" />
178
- <?php
179
- //wp_original_referer_field(true, 'previous');
180
- //wp_nonce_field('powerpress-add-feed');
181
- ?>
182
-
183
- <div class="form-field form-required">
184
- <label for="feed_name"><?php echo __('Feed Name', 'powerpress') ?></label>
185
- <input name="feed_name" id="feed_name" type="text" value="" size="40" />
186
- <p><?php echo __('The name is used for use within the administration area only.', 'powerpress'); ?></p>
187
- </div>
188
-
189
- <div class="form-field">
190
- <label for="feed_slug"><?php echo __('Feed Slug', 'powerpress') ?></label>
191
- <input name="feed_slug" id="feed_slug" type="text" value="" size="40" />
192
- <p><?php echo __('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'powerpress'); ?></p>
193
- </div>
194
-
195
- <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo __('Add Podcast Channel', 'powerpress'); ?>" /></p>
196
-
197
- </div>
198
- </div>
199
-
200
- </div> <!-- col-left -->
201
-
202
- </div> <!-- col-container -->
203
-
204
- <h3><?php echo __('Example Usage', 'powerpress'); ?></h3>
205
- <p>
206
- <?php echo __('Example 1: You want to distribute both an mp3 and an ogg version of your podcast. Use the default podcast channel for your mp3 media and create a custom channel for your ogg media.', 'powerpress'); ?>
207
- </p>
208
- <p>
209
- <?php echo __('Example 2: You have a video podcast with multiple file formats. Use the default podcast channel for the main media that you want to appear on your blog (e.g. m4v). Create additional channels for the remaining formats (e.g. wmv, mov, mpeg).', 'powerpress'); ?>
210
- </p>
211
- <p>
212
- <?php echo __('Example 3: You create two versions of your podcast, a 20 minute summary and a full 2 hour episode. Use the default channel for your 20 minute summary episodes and create a new custom channel for your full length episodes.', 'powerpress'); ?>
213
- </p>
214
-
215
- <?php
216
- }
217
- ?>
1
  <?php
2
 
3
+ if(!function_exists('add_action')){
4
+ die("access denied.");
5
+ }
6
+
7
+ function powerpress_admin_customfeeds_columns($data=array()){
8
  $data['name'] = __('Name', 'powerpress');
9
  $data['feed-slug'] = __('Slug', 'powerpress');
10
  $data['episode-count'] = __('Episodes', 'powerpress');
14
 
15
  add_filter('manage_powerpressadmin_customfeeds_columns', 'powerpress_admin_customfeeds_columns');
16
 
17
+ function powerpress_admin_customfeeds(){
 
18
  $General = powerpress_get_settings('powerpress_general');
19
 
 
20
  // If we have powerpress credentials, check if the account has been verified
21
  $creds = get_option('powerpress_creds');
22
  powerpress_check_credentials($creds);
23
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
24
+ ?>
25
+
26
+ <h2 class="pp-page-header"><?php echo __('Custom Podcast Channels', 'powerpress'); ?></h2>
27
+ <h3 class="pp-page-h3"><?php echo __('Custom podcast channels allow you to associate multiple media files and/or formats to one blog post.', 'powerpress'); ?></h3>
28
+
29
+ <div class="pp-card-body">
30
+ <div class="pp-row pp-tools-row">
31
+ <div class="pp-col-50">
32
+ <div class="pp-row">
33
+ <h2 class="pp-page-sub-header">Add Podcast Channel</h2>
34
+ </div>
35
+
36
+ <div class="form-field form-required">
37
+ <h3><label for="feed_name">Channel Name</label></h3>
38
+ <input name="feed_name" id="feed_name" type="text" value="" size="40" style="width: 92%;"/>
39
+ <p><?php echo __('The name is used for use within the administration area only.', 'powerpress'); ?></p>
40
+ </div>
41
+
42
+ <div class="form-field">
43
+ <h3><label for="feed_slug">Feed Slug</label></h3>
44
+ <div class="pp-row">
45
+ <h4 style="margin: 0; padding-top: 10px;">MyPodcast.com/</h4>
46
+ <input name="feed_slug" id="feed_slug" type="text" value="" size="40" style="width: 80%;"/>
47
+ </div>
48
+ <p><?php echo __('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'powerpress'); ?></p>
49
+ </div>
50
+ </div>
51
+ <div class="pp-col-50">
52
+ <div class="pp-row">
53
+ <h2 class="pp-page-sub-header">Why would I use Channels?</h2>
54
+ </div>
55
+
56
+ <ul style="list-style: unset; padding-left: 20px;">
57
+ <li>
58
+ <h3 style="font-weight: 400;">You want to distribute both an mp3 and an ogg version of your podcast. Use the default podcast channel for your mp3 media and create a custom channel for your ogg media.</h3>
59
+ </li>
60
+ <li>
61
+ <h3 style="font-weight: 400;">You have a video podcast with multiple file formats. Use the default podcast channel for the main media that you want to appear on your blog (e.g. m4v). Create additional channels for the remaining formats (e.g. wmv, mov, mpeg).</h3>
62
+ </li>
63
+ <li>
64
+ <h3 style="font-weight: 400;">You create two versions of your podcast, a 20 minute summary and a full 2 hour episode. Use the default channel for your 20 minute summary episodes and create a new custom channel for your full length episodes.</h3>
65
+ </li>
66
+ </ul>
67
+ </div>
68
+ </div>
69
+
70
+ <div class="pp-row pp-tools-row" style="margin-top: 20px; width: 50%;">
71
+ <?php if(!empty($General['premium_caps'])){ ?>
72
+ <p style="margin: 0;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_customfeeds.php&amp;action=powerpress-remove-feed-caps", 'powerpress-remove-feed-caps'); ?>"><?php echo __('Remove Password Protection Capabilities for Control of Which Users can Access Your Podcasts', 'powerpress'); ?></a></strong> (<?php echo __('Also kown as Premium Content', 'powerpress'); ?>)</p>
73
+
74
+ <p>
75
+ <?php echo __('Password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
76
+ podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
77
+ Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
78
+ channels. Due to this feature\'s complexity, it is not supported by Blubrry.com.', 'powerpress'); ?>
79
+ </p>
80
+ <?php } else { ?>
81
+ <p style="margin: 0;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_customfeeds.php&amp;action=powerpress-add-feed-caps", 'powerpress-add-feed-caps'); ?>"><?php echo __('Add Password Protection Capabilities for Control of Which Users can Access Your Podcasts', 'powerpress'); ?></a></strong> (<?php echo __('Also known as Premium Content', 'powerpress'); ?>)</p>
82
+ <p>
83
+ <?php echo __('Adding password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
84
+ podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
85
+ Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
86
+ channels. Due to this feature\'s complexity, it is not supported by Blubrry.com.', 'powerpress'); ?>
87
+ </p>
88
+ <?php } ?>
89
+ </div>
90
+
91
+ <div class="pp-row pp-tools-row">
92
+ <p class="submit"><input type="submit" class="powerpress_save_button_other pp-tools-button" name="submit" value="<?php echo __('Add Podcast Channel', 'powerpress'); ?>" /></p>
93
+ </div>
94
+
95
+ <table class="widefat fixed">
96
+ <thead>
97
+ <tr><?php print_column_headers('powerpressadmin_customfeeds'); ?></tr>
98
+ </thead>
99
+
100
+ <tfoot>
101
+ <tr><?php print_column_headers('powerpressadmin_customfeeds', false); ?></tr>
102
+ </tfoot>
103
+
104
+ <tbody>
105
+ <?php
106
+ $Feeds = array('podcast'=>__('Podcast', 'powerpress') );
107
+
108
+ if(isset($General['custom_feeds']['podcast'])){
109
+ $Feeds = $General['custom_feeds'];
110
+ } elseif( is_array($General['custom_feeds'])){
111
+ $Feeds += $General['custom_feeds'];
112
+ }
113
+
114
+ asort($Feeds, SORT_STRING); // Sort feeds
115
+ $count = 0;
116
+
117
+ foreach($Feeds as $feed_slug => $feed_title){
118
+ $feed_slug = esc_attr($feed_slug); // Precaution
119
+ $episode_total = powerpress_admin_episodes_per_feed($feed_slug);
120
+ $columns = powerpress_admin_customfeeds_columns();
121
+ $hidden = array();
122
+
123
+ if($feed_slug == 'podcast'){
124
+ $feed_title = __('Podcast', 'powerpress');
125
+ }
126
+
127
+ if($count % 2 == 0){
128
+ echo '<tr class="alternate">';
129
+ } else {
130
+ echo '<tr>';
131
+ }
132
+
133
+ foreach($columns as $column_name=>$column_display_name){
134
+ $class = "class=\"column-$column_name\"";
135
+ $edit_link = admin_url('admin.php?page='. powerpress_admin_get_page() .'&amp;action=powerpress-editfeed&amp;feed_slug=') . $feed_slug;
136
+ $url = get_feed_link($feed_slug);
137
+ $short_url = str_replace('http://', '', $url);
138
+ $short_url = str_replace('www.', '', $short_url);
139
+
140
+
141
+ if(strlen($short_url) > 35){
142
+ $short_url = substr($short_url, 0, 32).'...';
143
+ }
144
+
145
+ switch($column_name){
146
+ case 'feed-slug': {
147
+ echo "<td $class>$feed_slug";
148
+ echo "</td>";
149
+ } break;
150
+
151
+ case 'name': {
152
+
153
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_html($feed_title) .'</a></strong>'. ( $feed_slug == 'podcast' ?' ('. __('default channel', 'powerpress') .')':'').'<br />';
154
+ $actions = array();
155
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
156
+ $actions['delete'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=". powerpress_admin_get_page() ."&amp;action=powerpress-delete-feed&amp;feed_slug=$feed_slug", 'powerpress-delete-feed-' . $feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to delete feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Delete', 'powerpress') . "</a>";
157
+ if(!isset($General['custom_feeds'][ $feed_slug ])){
158
+ unset($actions['delete']);
159
+ }
160
+ $action_count = count($actions);
161
+ $i = 0;
162
+ echo '<div class="row-actions">';
163
+ foreach ($actions as $action => $linkaction){
164
+ ++$i;
165
+ ($i == $action_count) ? $sep = '' : $sep = ' | ';
166
+ echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
167
+ }
168
+ echo '</div>';
169
+ echo '</td>';
170
+ } break;
171
+
172
+ case 'url': {
173
+ echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">". esc_html($short_url) ."</a>";
174
+ echo '<div class="row-actions">';
175
+ if(defined('POWERPRESS_FEEDVALIDATOR_URL')){
176
+ echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode($url) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
177
+ }
178
+ echo '</div>';
179
+ echo "</td>";
180
+
181
+ } break;
182
+
183
+ case 'episode-count': {
184
+
185
+ echo "<td $class>$episode_total";
186
+ echo "</td>";
187
+
188
+ } break;
189
+
190
+ default: {
191
+ } break;
192
+ }
193
+ }
194
+
195
+ echo "\n </tr>\n";
196
+ $count++;
197
+ }
198
+ ?>
199
+ </tbody>
200
+ </table>
201
+ </div>
202
+
203
+ <style>
204
+ .pp-col-50 {
205
+ width: 50%;
206
+ }
207
+ </style>
208
+
209
+ <?php } ?>
 
 
 
 
 
 
powerpressadmin-diagnostics.php CHANGED
@@ -1,488 +1,472 @@
1
  <?php
2
- // powerpressadmin-ping-sites.php
3
 
4
- function powerpressadmin_diagnostics_process()
5
- {
6
- global $powerpress_diags;
7
- $powerpress_diags = array();
8
-
9
- // First, see if the user has cURL and/or allow_url_fopen enabled...
10
- $powerpress_diags['detecting_media'] = array();
11
- $powerpress_diags['detecting_media']['success'] = true;
12
- $powerpress_diags['detecting_media']['warning'] = false;
13
- $powerpress_diags['detecting_media']['allow_url_fopen'] = (ini_get( 'allow_url_fopen' ) != false); // fopen
14
- $powerpress_diags['detecting_media']['curl'] = function_exists( 'curl_init' ); // cURL
15
- $powerpress_diags['detecting_media']['message2'] = ''; // if ( !ini_get('open_basedir') )
16
- $powerpress_diags['detecting_media']['message3'] = ''; // ssl checks
17
-
18
- // Testing:
19
- //$powerpress_diags['detecting_media']['allow_url_fopen'] = false;
20
- //$powerpress_diags['detecting_media']['curl'] = false;
21
-
22
- if( $powerpress_diags['detecting_media']['curl'] )
23
- {
24
- $powerpress_diags['detecting_media']['message'] = __('Your web server supports the PHP cURL library.', 'powerpress');
25
- if( $powerpress_diags['detecting_media']['allow_url_fopen'] )
26
- $powerpress_diags['detecting_media']['message'] .= ' '. __('Your web server is also configured with the php.ini setting \'allow_url_fopen\' enabled, but the cURL library takes precedence.', 'powerpress');
27
-
28
- if( ini_get('open_basedir') )
29
- {
30
- $powerpress_diags['detecting_media']['warning'] = true;
31
- $powerpress_diags['detecting_media']['message2'] = __('Warning: The php.ini setting \'open_basedir\' will prevent the cURL library from following redirects in URLs.', 'powerpress');
32
- }
33
- }
34
- else if( $powerpress_diags['detecting_media']['allow_url_fopen'] )
35
- {
36
- $powerpress_diags['detecting_media']['message'] = __('Your web server is configured with the php.ini setting \'allow_url_fopen\' enabled.', 'powerpress');
37
- }
38
- else
39
- {
40
- $powerpress_diags['detecting_media']['success'] = false;
41
- $powerpress_diags['detecting_media']['message'] = __('Your server must either have the php.ini setting \'allow_url_fopen\' enabled or have the PHP cURL library installed in order to detect media information.', 'powerpress');
42
- }
43
-
44
- // OpenSSL or curl SSL is required
45
- $powerpress_diags['detecting_media']['openssl'] = extension_loaded('openssl');
46
- $powerpress_diags['detecting_media']['curl_ssl'] = false;
47
- if( function_exists('curl_version') )
48
- {
49
- $curl_info = curl_version();
50
- $powerpress_diags['detecting_media']['curl_ssl'] = ($curl_info['features'] & CURL_VERSION_SSL );
51
- }
52
-
53
- if( $powerpress_diags['detecting_media']['openssl'] == false && $powerpress_diags['detecting_media']['curl_ssl'] == false ) {
54
- $powerpress_diags['detecting_media']['warning'] = true;
55
- $powerpress_diags['detecting_media']['message3'] = __('WARNING: Your server should support SSL either openssl or curl_ssl.', 'powerpress');
56
- }
57
-
58
- // testing:
59
- //$powerpress_diags['pinging_itunes']['openssl'] = false;
60
- //$powerpress_diags['pinging_itunes']['curl_ssl'] = false;
61
-
62
-
63
- // Third, see if the uploads/powerpress folder is writable
64
- $UploadArray = wp_upload_dir();
65
- $powerpress_diags['uploading_artwork'] = array();
66
- $powerpress_diags['uploading_artwork']['success'] = false;
67
- $powerpress_diags['uploading_artwork']['file_uploads'] = ini_get( 'file_uploads' );
68
- $powerpress_diags['uploading_artwork']['writable'] = false;
69
- $powerpress_diags['uploading_artwork']['upload_path'] = '';
70
- $powerpress_diags['uploading_artwork']['message'] = '';
71
-
72
- // Testing:
73
- //$UploadArray['error'] = 'WordPres broke';
74
- //$powerpress_diags['uploading_artwork']['file_uploads'] = false;
75
- //$UploadArray['error'] = true;
76
-
77
- if( $powerpress_diags['uploading_artwork']['file_uploads'] == false )
78
- {
79
- $powerpress_diags['uploading_artwork']['message'] = __('Your server requires the php.ini setting \'file_uploads\' enabled in order to upload podcast artwork.', 'powerpress');
80
- }
81
- else if( $UploadArray['error'] === false )
82
- {
83
- $powerpress_diags['uploading_artwork']['upload_path'] = $UploadArray['basedir'] . '/powerpress/';
84
-
85
- if ( !is_dir($powerpress_diags['uploading_artwork']['upload_path']) && ! wp_mkdir_p( rtrim($powerpress_diags['uploading_artwork']['upload_path'], '/') ) )
86
- {
87
- $powerpress_diags['uploading_artwork']['message'] = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?', 'powerpress'), rtrim($powerpress_diags['uploading_artwork']['upload_path'], '/') );
88
- }
89
- else
90
- {
91
- $powerpress_diags['uploading_artwork']['writable'] = powerpressadmin_diagnostics_is_writable($powerpress_diags['uploading_artwork']['upload_path']);
92
- if( $powerpress_diags['uploading_artwork']['writable'] == false )
93
- {
94
- $powerpress_diags['uploading_artwork']['message'] = sprintf(__('PowerPress is unable to write to the %s directory.', 'powerpress'), $powerpress_diags['uploading_artwork']['upload_path']);
95
- }
96
- else
97
- {
98
- $powerpress_diags['uploading_artwork']['success'] = true;
99
- $powerpress_diags['uploading_artwork']['message'] = __('You are able to upload and save artwork images for your podcasts.', 'powerpress');
100
- }
101
- }
102
- }
103
- else
104
- {
105
- if( strlen($UploadArray['error']) > 2 )
106
- $powerpress_diags['uploading_artwork']['message'] = $UploadArray['error'];
107
- else
108
- $powerpress_diags['uploading_artwork']['message'] = __('An error occurred obtaining the uploads directory from WordPress.', 'powerpress');
109
- }
110
-
111
- // Fourth, see if we have enough memory and we're running an appropriate version of PHP
112
- $powerpress_diags['system_info'] = array();
113
- $powerpress_diags['system_info']['warning'] = false;
114
- $powerpress_diags['system_info']['success'] = true;
115
- $powerpress_diags['system_info']['php_version'] = phpversion();
116
- $powerpress_diags['system_info']['php_cgi'] = (function_exists('php_sapi_name') && preg_match('/cgi/i', php_sapi_name())? true : false );
117
- $powerpress_diags['system_info']['memory_limit'] = (int) ini_get('memory_limit');
118
- $powerpress_diags['system_info']['temp_directory'] = get_temp_dir(); // Function available since WP2.5+
119
-
120
- // testing:
121
- //$powerpress_diags['system_info']['memory_limit'] = -1;
122
- //$powerpress_diags['system_info']['memory_limit'] = 0;
123
- //$powerpress_diags['system_info']['memory_limit'] = 16;
124
-
125
- if( $powerpress_diags['system_info']['memory_limit'] == 0 )
126
- {
127
- if( version_compare($powerpress_diags['system_info']['php_version'], '5.2') > 0 )
128
- $powerpress_diags['system_info']['memory_limit'] = 128;
129
- else if( version_compare($powerpress_diags['system_info']['php_version'], '5.2') == 0 )
130
- $powerpress_diags['system_info']['memory_limit'] = 16;
131
- else
132
- $powerpress_diags['system_info']['memory_limit'] = 8;
133
- }
134
- $powerpress_diags['system_info']['memory_used'] = 0;
135
-
136
- if( version_compare($powerpress_diags['system_info']['php_version'], '7.0') > -1 )
137
- {
138
- $powerpress_diags['system_info']['message'] = sprintf( __('Your version of PHP (%s) is OK!', 'powerpress'), $powerpress_diags['system_info']['php_version'] );
139
- }
140
- else if( version_compare($powerpress_diags['system_info']['php_version'], '5.4') > -1 )
141
- {
142
- $powerpress_diags['system_info']['message'] = sprintf( __('Your version of PHP (%s) is OK, though PHP 7.0 or newer is recommended.', 'powerpress'), $powerpress_diags['system_info']['php_version'] );
143
- }
144
- else
145
- {
146
- $powerpress_diags['system_info']['message'] = sprintf( __('Your version of PHP (%s) will work, but PHP 7.0 or newer is recommended.', 'powerpress'), $powerpress_diags['system_info']['php_version'] );
147
- }
148
-
149
- $used = 0;
150
- $total = $powerpress_diags['system_info']['memory_limit'];
151
-
152
- if( $total == -1 )
153
- {
154
- $powerpress_diags['system_info']['message2'] = __('Your scripts have no limit to the amount of memory they can use.', 'powerpress');
155
- $used = (function_exists('memory_get_peak_usage')? memory_get_peak_usage() : ( function_exists('memory_get_usage') ? memory_get_usage() : 0 ) );
156
- if( $used )
157
- $powerpress_diags['system_info']['memory_used'] = round($used / 1024 / 1024, 2);
158
- }
159
- else if( function_exists('memory_get_peak_usage') )
160
- {
161
- $used = round(memory_get_peak_usage() / 1024 / 1024, 2);
162
- $powerpress_diags['system_info']['memory_used'] = $used;
163
- $percent = ($used/$total)*100;
164
- $powerpress_diags['system_info']['message2'] = sprintf(__('You are using %d%% (%.01fM of %.01dM) of available memory.', 'powerpress'), $percent, $used, $total);
165
- }
166
- else if( function_exists('memory_get_usage') )
167
- {
168
- $used = round(memory_get_usage() / 1024 / 1024, 2);
169
- $powerpress_diags['system_info']['memory_used'] = $used;
170
- $percent = ($used/$total)*100;
171
- $powerpress_diags['system_info']['message2'] = sprintf(__('You are using %d%% (%.01fM of %dM) of available memory. Versions of PHP 5.2 or newer will give you a more accurate total of memory usage.', 'powerpress'), $percent, $used, $total);
172
- }
173
- else
174
- {
175
- $powerpress_diags['system_info']['message2'] = sprintf(__('Your scripts have a total of %dM.', 'powerpress'), $total );
176
- }
177
-
178
- if( $total > 0 && ($used + 4) > $total )
179
- {
180
- $powerpress_diags['system_info']['warning'] = true;
181
- $powerpress_diags['system_info']['message2'] = __('Warning:', 'powerpress') .' '. $powerpress_diags['system_info']['message2'];
182
- $powerpress_diags['system_info']['message2'] .= ' ';
183
- $powerpress_diags['system_info']['message2'] .= sprintf(__('We recommend that you have at least %dM (4M more that what is currently used) or more memory to accomodate all of your installed plugins.', 'powerpress'), ceil($used)+4 );
184
- }
185
-
186
- if( empty($powerpress_diags['system_info']['temp_directory']) )
187
- {
188
- $powerpress_diags['system_info']['success'] = false;
189
- $powerpress_diags['system_info']['message3'] = __('Error:', 'powerpress') .' '. __('No temporary directory available.', 'powerpress');
190
- }
191
- else if( is_dir($powerpress_diags['system_info']['temp_directory']) && is_writable($powerpress_diags['system_info']['temp_directory']) )
192
- {
193
- $powerpress_diags['system_info']['message3'] = sprintf(__('Temporary directory %s is writable.', 'powerpress'), $powerpress_diags['system_info']['temp_directory']);
194
- }
195
- else
196
- {
197
- $powerpress_diags['system_info']['success'] = false;
198
- $powerpress_diags['system_info']['message3'] = __('Error:', 'powerpress') .' '. sprintf(__('Temporary directory %s is not writable.', 'powerpress'), $powerpress_diags['system_info']['temp_directory']);
199
- }
200
-
201
- if( empty($powerpress_diags['system_info']['php_cgi']) )
202
- {
203
- $powerpress_diags['system_info']['message4'] = '';
204
- }
205
- else
206
- {
207
- $powerpress_diags['system_info']['message4'] = __('Warning:', 'powerpress') .' '. __('PHP running in CGI mode.', 'powerpress');
208
- }
209
-
210
- if( isset($_GET['Email']) && strlen($_GET['Email']) > 4 )
211
- {
212
- check_admin_referer('powerpress-diagnostics');
213
- $email = $_GET['Email'];
214
- powerpressadmin_diagnostics_email($email);
215
- powerpress_page_message_add_notice( sprintf(__('Diagnostic results sent to %s.', 'powerpress'), $email) );
216
- }
217
- }
218
 
219
- function powerpressadmin_diagnostics_email($email)
220
- {
221
- global $powerpress_diags, $wpmu_version, $wp_version, $powerpress_diag_message;
222
- $SettingsGeneral = get_option('powerpress_general');
223
-
224
- // First we need some basic information about the blog...
225
- $message = __('Blog Title:', 'powerpress') .' '. get_bloginfo('name') . "<br />\n";
226
- $message .= __('Blog URL:', 'powerpress') .' '. get_bloginfo('url') . "<br />\n";
227
- $message .= __('WordPress Version:', 'powerpress') .' '. $wp_version . "<br />\n";
228
- if( !empty($wpmu_version) )
229
- $message .= __('WordPress MU Version:', 'powerpress') .' '. $wpmu_version . "<br />\n";
230
- $message .= __('System:', 'powerpress') .' '. $_SERVER['SERVER_SOFTWARE'] . "<br />\n";
231
- $message .= __('Open basedir:', 'powerpress') .' '. ini_get('open_basedir') ."<br />\n";
232
-
233
- // Crutial PowerPress Settings
234
- $message .= "<br />\n";
235
- $message .= '<strong>'. __('Important PowerPress Settings', 'powerpress') ."</strong><br />\n";
236
- $message .= " &nbsp; \t &nbsp; ". __('PowerPress version:', 'powerpress') .' '. POWERPRESS_VERSION ."<br />\n";
237
- $message .= " &nbsp; \t &nbsp; ". __('episode box file size/duration fields:', 'powerpress') .' '. ( empty($SettingsGeneral['episode_box_mode']) ?__('yes', 'powerpress'): ($SettingsGeneral['episode_box_mode']==1?__('no', 'powerpress'):__('yes', 'powerpress')) ) ."<br />\n";
238
- $message .= " &nbsp; \t &nbsp; ". __('Podcasting capability:', 'powerpress') .' '. ( empty($SettingsGeneral['use_caps'])?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
239
- $message .= " &nbsp; \t &nbsp; ". __('Feed capability:', 'powerpress') .' '. ( empty($SettingsGeneral['feed_caps'])?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
240
- $message .= " &nbsp; \t &nbsp; ". __('Category Podcasting:', 'powerpress') .' '. ( empty($SettingsGeneral['cat_casting']) ?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
241
- $message .= " &nbsp; \t &nbsp; ". __('Podcast Channels:', 'powerpress') .' '. ( empty($SettingsGeneral['channels']) ?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
242
- $message .= " &nbsp; \t &nbsp; ". __('Additional Player Options:', 'powerpress') .' '. ( empty($SettingsGeneral['player_options'])?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
243
-
244
- // Detecting Media Information
245
- $message .= "<br />\n";
246
- $message .= '<strong>'.__('Detecting Media Information', 'powerpress') ."</strong><br />\n";
247
- $message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['success']?'true':'false') ."<br />\n";
248
- $message .= " &nbsp; \t &nbsp; ". __('warning:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['warning']?'true':'false') ."<br />\n";
249
- $message .= " &nbsp; \t &nbsp; ". __('allow_url_fopen:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false') ."<br />\n";
250
- $message .= " &nbsp; \t &nbsp; ". __('curl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl']?'true':'false') ."<br />\n";
251
- $message .= " &nbsp; \t &nbsp; ". __('curl_ssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl_ssl']?'true':'false') ."<br />\n";
252
- $message .= " &nbsp; \t &nbsp; ". __('openssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['openssl']?'true':'false') ."<br />\n";
253
- $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message'] ."<br />\n";
254
- $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message2'] ."<br />\n";
255
- $message .= " &nbsp; \t &nbsp; ". __('message 3:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message3'] ."<br />\n";
256
-
257
- // Pinging iTunes
258
- //$message .= "<br />\n";
259
- //$message .= '<strong>'.__('Pinging iTunes', 'powerpress') ."</strong><br />\n";
260
- //$message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['pinging_itunes']['success']?'true':'false') ."<br />\n";
261
- //$message .= " &nbsp; \t &nbsp; ". __('curl_ssl:', 'powerpress') .' '. ($powerpress_diags['pinging_itunes']['curl_ssl']?'true':'false') ."<br />\n";
262
- //$message .= " &nbsp; \t &nbsp; ". __('openssl:', 'powerpress') .' '. ($powerpress_diags['pinging_itunes']['openssl']?'true':'false') ."<br />\n";
263
- //$message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['pinging_itunes']['message'] ."<br />\n";
264
-
265
- // Uploading Artwork
266
- $message .= "<br />\n";
267
- $message .= '<strong>'.__('Uploading Artwork', 'powerpress') ."</strong><br />\n";
268
- $message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['uploading_artwork']['success']?'true':'false') ."<br />\n";
269
- $message .= " &nbsp; \t &nbsp; ". __('file_uploads:', 'powerpress') .' '. ($powerpress_diags['uploading_artwork']['file_uploads']?'true':'false') ."<br />\n";
270
- $message .= " &nbsp; \t &nbsp; ". __('writable:', 'powerpress') .' '. ($powerpress_diags['uploading_artwork']['writable']?'true':'false') ."<br />\n";
271
- $message .= " &nbsp; \t &nbsp; ". __('upload_path:', 'powerpress') .' '. $powerpress_diags['uploading_artwork']['upload_path'] ."<br />\n";
272
- $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['uploading_artwork']['message'] ."<br />\n";
273
-
274
- // System Information
275
- $message .= "<br />\n";
276
- $message .= '<strong>'.__('System Information', 'powerpress') ."</strong><br />\n";
277
- $message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['system_info']['success']?'true':'false') ."<br />\n";
278
- $message .= " &nbsp; \t &nbsp; ". __('warning:', 'powerpress') .' '. ($powerpress_diags['system_info']['warning']?'yes':'no') ."<br />\n";
279
- $message .= " &nbsp; \t &nbsp; ". __('php_version:', 'powerpress') .' '. $powerpress_diags['system_info']['php_version'] ."<br />\n";
280
- $message .= " &nbsp; \t &nbsp; ". __('memory_limit:', 'powerpress') .' '. $powerpress_diags['system_info']['memory_limit'] ."M\n";
281
- $message .= " &nbsp; \t &nbsp; ". __('memory_used:', 'powerpress') .' '. sprintf('%.01fM',$powerpress_diags['system_info']['memory_used']) ."<br />\n";
282
- $message .= " &nbsp; \t &nbsp; ". __('temp directory:', 'powerpress') .' '. $powerpress_diags['system_info']['temp_directory'] ."<br />\n";
283
- $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['system_info']['message'] ."<br />\n";
284
- $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['system_info']['message2'] ."<br />\n";
285
- $message .= " &nbsp; \t &nbsp; ". __('message 3:', 'powerpress') .' '. $powerpress_diags['system_info']['message3'] ."<br />\n";
286
- if( !empty($powerpress_diags['system_info']['message4']) )
287
- $message .= " &nbsp; \t &nbsp; ". __('message 4:', 'powerpress') .' '. $powerpress_diags['system_info']['message4'] ."<br />\n";
288
-
289
- if( !empty($_GET['ap']) )
290
- {
291
- $current_plugins = get_option('active_plugins');
292
- $message .= "<br />\n";
293
- $message .= '<strong>'.__('Active Plugins', 'powerpress') ."</strong><br />\n";
294
- foreach( $current_plugins as $null=> $plugin_path )
295
- {
296
- $plugin_data = get_plugin_data( rtrim(WP_PLUGIN_DIR, '/\\'). '/'. rtrim($plugin_path, '\\/'), false, false ); //Do not apply markup/translate as it'll be cached.
297
-
298
- $message .= " &nbsp; \t &nbsp; " . __('Title:', 'powerpress') .' '. $plugin_data['Title']. "<br />\n";
299
- $message .= " &nbsp; \t &nbsp; " . __('Relative Path:', 'powerpress') .' '. $plugin_path. "<br />\n";
300
- $message .= " &nbsp; \t &nbsp; " . __('Version:', 'powerpress') .' '. $plugin_data['Version']. "<br />\n";
301
- $message .= " &nbsp; \t &nbsp; " . __('Web Site:', 'powerpress') .' '. $plugin_data['PluginURI']. "<br />\n";
302
- //$message .= " &nbsp; \t &nbsp; " . __('Description:', 'powerpress') .' '. $plugin_data['Description']. "<br />\n";
303
- //$message .= " &nbsp; \t &nbsp; " . __('Author Name:', 'powerpress') .' '. $plugin_data['Author']. "<br />\n";
304
- //$message .= " &nbsp; \t &nbsp; " . __('Author Web Site:', 'powerpress') .' '. $plugin_data['AuthorURI']. "<br />\n";
305
- //print_r($plugin_data);
306
- $message .= "<br />\n";
307
- }
308
- }
309
- //$message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['system_info']['success']?'true':'false') ."<br />\n";
310
-
311
- // Now lets loop through each section of diagnostics
312
- $user_info = wp_get_current_user();
313
- $from_email = $user_info->user_email;
314
- $from_name = $user_info->user_nicename;
315
- $headers = 'From: "'.$from_name.'" <'.$from_email.'>'."\n"
316
- .'Reply-To: "'.$from_name.'" <'.$from_email.'>'."\n"
317
- .'Return-Path: "'.$from_name.'" <'.$from_email.'>'."\n";
318
- if( !empty($_GET['CC']) )
319
- $headers .= 'CC: "'.$from_name.'" <'.$from_email.'>'."\n";
320
- $headers .= "Content-Type: text/html\n";
321
-
322
- @wp_mail($email, sprintf(__('Blubrry PowerPress diagnostic results for %s', 'powerpress'), get_bloginfo('name')), $message, $headers);
323
- $powerpress_diag_message = $message;
324
- }
325
 
326
- function powerpressadmin_diagnostics_is_writable($dir)
327
- {
328
- // Make sure we can create a file in the specified directory...
329
- if( is_dir($dir) )
330
- {
331
- return is_writable($dir);
332
- }
333
- return false;
334
- }
335
 
336
- function powerpressadmin_diagnostics_status($success=true, $warning=false)
337
- {
338
- $img = 'yes.png';
339
- $color = '#458045';
340
- $text = __('Success', 'powerpress');
341
- if( $success == false ) // Failed takes precedence over warning
342
- {
343
- $img = 'no.png';
344
- $color = '#CC0000';
345
- $text = __('Failed', 'powerpress');
346
- }
347
- else if( $warning )
348
- {
349
- $img = '../../../wp-includes/images/smilies/icon_exclaim.gif';
350
- $color = '#D98500';
351
- $text = __('Warning', 'powerpress');
352
- }
353
- ?>
354
- <img src="<?php echo admin_url(); ?>/images/<?php echo $img; ?>" style="vertical-align:text-top;" />
355
- <strong style="color:<?php echo $color; ?>;"><?php echo $text; ?></strong>
356
- <?php
357
- }
358
 
359
- function powerpressadmin_diagnostics()
360
- {
361
- global $powerpress_diags, $powerpress_diag_message;
362
- $GeneralSettings = get_option('powerpress_general');
363
-
364
- if( empty($powerpress_diags) )
365
- {
366
- powerpressadmin_diagnostics_process();
367
- powerpress_page_message_print();
368
- }
369
- ?>
370
-
371
- <h2><?php echo __('Blubrry PowerPress Diagnostics', 'powerpress'); ?></h2>
372
- <p>
373
- <?php echo __('The Diagnostics page checks to see if your server is configured to support all of the available features in Blubrry PowerPress.', 'powerpress'); ?>
374
- </p>
375
 
376
- <?php
377
- if( !empty($powerpress_diag_message) )
378
- {
379
- ?>
380
- <h3 style="margin-bottom: 2px;"><?php echo __('Diagnostics Email Message', 'powerpress'); ?></h3>
381
- <div style="border: 2px inset #000000; padding: 10px; margin-right: 20px; font-size: 85%;">
382
- <?php echo $powerpress_diag_message; ?>
383
- </div>
384
- <?php } ?>
385
-
386
- <h3 style="margin-bottom: 0;"><?php echo __('Detecting Media Information', 'powerpress'); ?></h3>
387
- <p style="margin: 0;">
388
- <?php echo __('The following test checks to see if your web server can make connections with other web servers to obtain file size and media duration information. The test checks to see if either the PHP cURL library is installed or the php.ini setting \'allow_url_fopen\' enabled.', 'powerpress'); ?>
389
- </p>
390
- <table class="form-table">
391
- <tr valign="top">
392
- <th scope="row">
393
- <?php powerpressadmin_diagnostics_status($powerpress_diags['detecting_media']['success'],$powerpress_diags['detecting_media']['warning']); ?>
394
- </th>
395
- <td>
396
- <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message']); ?></p>
397
- <?php if( $powerpress_diags['detecting_media']['message2'] ) { ?>
398
- <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message2']); ?></p><?php } ?>
399
- <?php if( $powerpress_diags['detecting_media']['message3'] ) { ?>
400
- <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message3']); ?></p><?php } ?>
401
- <?php if( $powerpress_diags['detecting_media']['success'] ) { ?>
402
- <p><?php echo __('If you are still having problems detecting media information, check with your web hosting provider if there is a firewall blocking your server.', 'powerpress'); ?></p>
403
- <?php } else { ?>
404
- <p><?php echo __('Contact your web hosting provider with the information above.', 'powerpress'); ?></p>
405
- <?php } ?>
406
- <ul><li><ul>
407
- <li><?php echo __('allow_url_fopen:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false'); ?></li>
408
- <li><?php echo __('curl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl']?'true':'false'); ?></li>
409
- <li><?php echo __('curl_ssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl_ssl']?'true':'false'); ?></li>
410
- <li><?php echo __('openssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['openssl']?'true':'false'); ?></li>
411
- </ul></li></ul>
412
- </td>
413
- </tr>
414
- </table>
415
-
416
- <h3 style="margin-bottom: 0;"><?php echo __('Uploading Artwork', 'powerpress'); ?></h3>
417
- <p style="margin: 0;"><?php echo __('The following test checks to see that you can upload and store files on your web server.', 'powerpress'); ?></p>
418
- <table class="form-table">
419
- <tr valign="top">
420
- <th scope="row">
421
- <?php powerpressadmin_diagnostics_status($powerpress_diags['uploading_artwork']['success']); ?>
422
- </th>
423
- <td>
424
- <p><?php echo htmlspecialchars($powerpress_diags['uploading_artwork']['message']); ?></p>
425
- </td>
426
- </tr>
427
- </table>
428
-
429
- <h3 style="margin-bottom: 0;"><?php echo __('System Information', 'powerpress'); ?></h3>
430
- <p style="margin: 0;"><?php echo __('The following test checks your version of PHP, memory usage and temporary directory access.', 'powerpress'); ?></p>
431
- <table class="form-table">
432
- <tr valign="top">
433
- <th scope="row">
434
- <?php powerpressadmin_diagnostics_status($powerpress_diags['system_info']['success'], ($powerpress_diags['system_info']['warning'] || $powerpress_diags['system_info']['php_cgi']) ); ?>
435
- </th>
436
- <td>
437
- <p><?php echo htmlspecialchars( sprintf(__('WordPress Version %s'), $GLOBALS['wp_version']) ); ?></p>
438
- <p><?php echo htmlspecialchars($powerpress_diags['system_info']['message']); ?></p>
439
- <p><?php echo htmlspecialchars($powerpress_diags['system_info']['message2']); ?></p>
440
- <p><?php echo htmlspecialchars($powerpress_diags['system_info']['message3']); ?></p>
441
- <?php if( !empty($powerpress_diags['system_info']['php_cgi']) ) { ?>
442
- <p><?php echo __('Warning:', 'powerpress') .' '. __('PHP running in CGI mode.', 'powerpress'); ?></p>
443
- <?php } if( $powerpress_diags['system_info']['warning'] ) { ?>
444
- <p><?php echo __('Contact your web hosting provider to inquire how to increase the PHP memory limit on your web server.', 'powerpress'); ?></p>
445
- <?php } ?>
446
-
447
- </td>
448
- </tr>
449
- </table>
450
-
451
- <form enctype="multipart/form-data" method="get" action="<?php echo admin_url('admin.php'); ?>">
452
- <input type="hidden" name="action" value="powerpress-diagnostics" />
453
- <input type="hidden" name="page" value="powerpress/powerpressadmin_tools.php" />
454
- <?php
455
- // Print nonce
456
- wp_nonce_field('powerpress-diagnostics');
457
- ?>
458
-
459
- <h3 style="margin-bottom: 0;"><?php echo __('Email Results', 'powerpress'); ?></h3>
460
- <p style="margin: 0;"><?php echo __('Send the results above to the specified Email address.', 'powerpress'); ?></p>
461
- <table class="form-table">
462
- <tr valign="top">
463
- <th scope="row">
464
- <?php echo __('Email', 'powerpress'); ?>
465
- </th>
466
- <td>
467
- <div style="margin-top: 5px;">
468
- <input type="text" name="Email" value="" style="width: 50%;" />
469
- <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary button-blubrry" value="Send Results" />
470
- </div>
471
- <div>
472
- <input type="checkbox" name="CC" value="1" style="vertical-align: text-top;" checked /> CC: <?php $user_info = wp_get_current_user(); echo "&quot;{$user_info->user_nicename}&quot; &lt;{$user_info->user_email}&gt;"; ?>
473
- </div>
474
- <div>
475
- <input type="checkbox" name="ap" value="1" style="vertical-align: text-top;" checked /> <?php echo __('Include list of active plugins in diagnostics results.', 'powerpress') ?>
476
- </div>
477
- </td>
478
- </tr>
479
- </table>
480
- </form>
481
-
482
- <p>&nbsp;</p>
483
-
484
- <!-- start footer -->
485
- <?php
486
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
487
 
488
- ?>
 
 
 
 
 
1
  <?php
2
+ // powerpressadmin-ping-sites.php
3
 
4
+ function powerpressadmin_diagnostics_process(){
5
+ global $powerpress_diags;
6
+ $powerpress_diags = array();
7
+
8
+ // First, see if the user has cURL and/or allow_url_fopen enabled...
9
+ $powerpress_diags['detecting_media'] = array();
10
+ $powerpress_diags['detecting_media']['success'] = true;
11
+ $powerpress_diags['detecting_media']['warning'] = false;
12
+ $powerpress_diags['detecting_media']['allow_url_fopen'] = (ini_get( 'allow_url_fopen' ) != false); // fopen
13
+ $powerpress_diags['detecting_media']['curl'] = function_exists( 'curl_init' ); // cURL
14
+ $powerpress_diags['detecting_media']['message2'] = ''; // if ( !ini_get('open_basedir') )
15
+ $powerpress_diags['detecting_media']['message3'] = ''; // ssl checks
16
+
17
+ // Testing:
18
+ //$powerpress_diags['detecting_media']['allow_url_fopen'] = false;
19
+ //$powerpress_diags['detecting_media']['curl'] = false;
20
+
21
+ if($powerpress_diags['detecting_media']['curl']) {
22
+ $powerpress_diags['detecting_media']['message'] = __('Your web server supports the PHP cURL library.', 'powerpress');
23
+ if($powerpress_diags['detecting_media']['allow_url_fopen']){
24
+ $powerpress_diags['detecting_media']['message'] .= ' '. __('Your web server is also configured with the php.ini setting \'allow_url_fopen\' enabled, but the cURL library takes precedence.', 'powerpress');
25
+ }
26
+
27
+ if(ini_get('open_basedir')){
28
+ $powerpress_diags['detecting_media']['warning'] = true;
29
+ $powerpress_diags['detecting_media']['message2'] = __('Warning: The php.ini setting \'open_basedir\' will prevent the cURL library from following redirects in URLs.', 'powerpress');
30
+ }
31
+ }
32
+ elseif($powerpress_diags['detecting_media']['allow_url_fopen']){
33
+ $powerpress_diags['detecting_media']['message'] = __('Your web server is configured with the php.ini setting \'allow_url_fopen\' enabled.', 'powerpress');
34
+ } else {
35
+ $powerpress_diags['detecting_media']['success'] = false;
36
+ $powerpress_diags['detecting_media']['message'] = __('Your server must either have the php.ini setting \'allow_url_fopen\' enabled or have the PHP cURL library installed in order to detect media information.', 'powerpress');
37
+ }
38
+
39
+ // OpenSSL or curl SSL is required
40
+ $powerpress_diags['detecting_media']['openssl'] = extension_loaded('openssl');
41
+ $powerpress_diags['detecting_media']['curl_ssl'] = false;
42
+ if(function_exists('curl_version')){
43
+ $curl_info = curl_version();
44
+ $powerpress_diags['detecting_media']['curl_ssl'] = ($curl_info['features'] & CURL_VERSION_SSL );
45
+ }
46
+
47
+ if($powerpress_diags['detecting_media']['openssl'] == false && $powerpress_diags['detecting_media']['curl_ssl'] == false){
48
+ $powerpress_diags['detecting_media']['warning'] = true;
49
+ $powerpress_diags['detecting_media']['message3'] = __('WARNING: Your server should support SSL either openssl or curl_ssl.', 'powerpress');
50
+ }
51
+
52
+ // testing:
53
+ //$powerpress_diags['pinging_itunes']['openssl'] = false;
54
+ //$powerpress_diags['pinging_itunes']['curl_ssl'] = false;
55
+
56
+ // Third, see if the uploads/powerpress folder is writable
57
+ $UploadArray = wp_upload_dir();
58
+ $powerpress_diags['uploading_artwork'] = array();
59
+ $powerpress_diags['uploading_artwork']['success'] = false;
60
+ $powerpress_diags['uploading_artwork']['file_uploads'] = ini_get( 'file_uploads' );
61
+ $powerpress_diags['uploading_artwork']['writable'] = false;
62
+ $powerpress_diags['uploading_artwork']['upload_path'] = '';
63
+ $powerpress_diags['uploading_artwork']['message'] = '';
64
+
65
+ // Testing:
66
+ //$UploadArray['error'] = 'WordPres broke';
67
+ //$powerpress_diags['uploading_artwork']['file_uploads'] = false;
68
+ //$UploadArray['error'] = true;
69
+
70
+ if($powerpress_diags['uploading_artwork']['file_uploads'] == false){
71
+ $powerpress_diags['uploading_artwork']['message'] = __('Your server requires the php.ini setting \'file_uploads\' enabled in order to upload podcast artwork.', 'powerpress');
72
+ }
73
+ elseif($UploadArray['error'] === false){
74
+ $powerpress_diags['uploading_artwork']['upload_path'] = $UploadArray['basedir'] . '/powerpress/';
75
+
76
+ if(!is_dir($powerpress_diags['uploading_artwork']['upload_path']) && ! wp_mkdir_p( rtrim($powerpress_diags['uploading_artwork']['upload_path'], '/'))){
77
+ $powerpress_diags['uploading_artwork']['message'] = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?', 'powerpress'), rtrim($powerpress_diags['uploading_artwork']['upload_path'], '/') );
78
+ } else {
79
+ $powerpress_diags['uploading_artwork']['writable'] = powerpressadmin_diagnostics_is_writable($powerpress_diags['uploading_artwork']['upload_path']);
80
+ if($powerpress_diags['uploading_artwork']['writable'] == false){
81
+ $powerpress_diags['uploading_artwork']['message'] = sprintf(__('PowerPress is unable to write to the %s directory.', 'powerpress'), $powerpress_diags['uploading_artwork']['upload_path']);
82
+ } else {
83
+ $powerpress_diags['uploading_artwork']['success'] = true;
84
+ $powerpress_diags['uploading_artwork']['message'] = __('You are able to upload and save artwork images for your podcasts.', 'powerpress');
85
+ }
86
+ }
87
+ } else {
88
+ if(strlen($UploadArray['error']) > 2){
89
+ $powerpress_diags['uploading_artwork']['message'] = $UploadArray['error'];
90
+ } else {
91
+ $powerpress_diags['uploading_artwork']['message'] = __('An error occurred obtaining the uploads directory from WordPress.', 'powerpress');
92
+ }
93
+ }
94
+
95
+ // Fourth, see if we have enough memory and we're running an appropriate version of PHP
96
+ $powerpress_diags['system_info'] = array();
97
+ $powerpress_diags['system_info']['warning'] = false;
98
+ $powerpress_diags['system_info']['success'] = true;
99
+ $powerpress_diags['system_info']['php_version'] = phpversion();
100
+ $powerpress_diags['system_info']['php_cgi'] = (function_exists('php_sapi_name') && preg_match('/cgi/i', php_sapi_name())? true : false );
101
+ $powerpress_diags['system_info']['memory_limit'] = (int) ini_get('memory_limit');
102
+ $powerpress_diags['system_info']['temp_directory'] = get_temp_dir(); // Function available since WP2.5+
103
+
104
+ // testing:
105
+ //$powerpress_diags['system_info']['memory_limit'] = -1;
106
+ //$powerpress_diags['system_info']['memory_limit'] = 0;
107
+ //$powerpress_diags['system_info']['memory_limit'] = 16;
108
+
109
+ if($powerpress_diags['system_info']['memory_limit'] == 0){
110
+ if(version_compare($powerpress_diags['system_info']['php_version'], '5.2') > 0){
111
+ $powerpress_diags['system_info']['memory_limit'] = 128;
112
+ } elseif(version_compare($powerpress_diags['system_info']['php_version'], '5.2') == 0){
113
+ $powerpress_diags['system_info']['memory_limit'] = 16;
114
+ } else {
115
+ $powerpress_diags['system_info']['memory_limit'] = 8;
116
+ }
117
+ }
118
+
119
+ $powerpress_diags['system_info']['memory_used'] = 0;
120
+
121
+ if(version_compare($powerpress_diags['system_info']['php_version'], '7.0') > -1){
122
+ $powerpress_diags['system_info']['message'] = sprintf( __('Your version of PHP (%s) is OK!', 'powerpress'), $powerpress_diags['system_info']['php_version']);
123
+ } elseif(version_compare($powerpress_diags['system_info']['php_version'], '5.4') > -1){
124
+ $powerpress_diags['system_info']['message'] = sprintf( __('Your version of PHP (%s) is OK, though PHP 7.0 or newer is recommended.', 'powerpress'), $powerpress_diags['system_info']['php_version'] );
125
+ } else {
126
+ $powerpress_diags['system_info']['message'] = sprintf( __('Your version of PHP (%s) will work, but PHP 7.0 or newer is recommended.', 'powerpress'), $powerpress_diags['system_info']['php_version'] );
127
+ }
128
+
129
+ $used = 0;
130
+ $total = $powerpress_diags['system_info']['memory_limit'];
131
+
132
+ if($total == -1){
133
+ $powerpress_diags['system_info']['message2'] = __('Your scripts have no limit to the amount of memory they can use.', 'powerpress');
134
+ $used = (function_exists('memory_get_peak_usage')? memory_get_peak_usage() : ( function_exists('memory_get_usage') ? memory_get_usage() : 0 ) );
135
+ if($used){
136
+ $powerpress_diags['system_info']['memory_used'] = round($used / 1024 / 1024, 2);
137
+ }
138
+ } elseif(function_exists('memory_get_peak_usage')){
139
+ $used = round(memory_get_peak_usage() / 1024 / 1024, 2);
140
+ $powerpress_diags['system_info']['memory_used'] = $used;
141
+ $percent = ($used/$total)*100;
142
+ $powerpress_diags['system_info']['message2'] = sprintf(__('You are using %d%% (%.01fM of %.01dM) of available memory.', 'powerpress'), $percent, $used, $total);
143
+ } elseif(function_exists('memory_get_usage')){
144
+ $used = round(memory_get_usage() / 1024 / 1024, 2);
145
+ $powerpress_diags['system_info']['memory_used'] = $used;
146
+ $percent = ($used/$total)*100;
147
+ $powerpress_diags['system_info']['message2'] = sprintf(__('You are using %d%% (%.01fM of %dM) of available memory. Versions of PHP 5.2 or newer will give you a more accurate total of memory usage.', 'powerpress'), $percent, $used, $total);
148
+ } else {
149
+ $powerpress_diags['system_info']['message2'] = sprintf(__('Your scripts have a total of %dM.', 'powerpress'), $total );
150
+ }
151
+
152
+ if($total > 0 && ($used + 4) > $total){
153
+ $powerpress_diags['system_info']['warning'] = true;
154
+ $powerpress_diags['system_info']['message2'] = __('Warning:', 'powerpress') .' '. $powerpress_diags['system_info']['message2'];
155
+ $powerpress_diags['system_info']['message2'] .= ' ';
156
+ $powerpress_diags['system_info']['message2'] .= sprintf(__('We recommend that you have at least %dM (4M more that what is currently used) or more memory to accomodate all of your installed plugins.', 'powerpress'), ceil($used)+4 );
157
+ }
158
+
159
+ if(empty($powerpress_diags['system_info']['temp_directory'])){
160
+ $powerpress_diags['system_info']['success'] = false;
161
+ $powerpress_diags['system_info']['message3'] = __('Error:', 'powerpress') .' '. __('No temporary directory available.', 'powerpress');
162
+ } elseif(is_dir($powerpress_diags['system_info']['temp_directory']) && is_writable($powerpress_diags['system_info']['temp_directory'])){
163
+ $powerpress_diags['system_info']['message3'] = sprintf(__('Temporary directory %s is writable.', 'powerpress'), $powerpress_diags['system_info']['temp_directory']);
164
+ } else {
165
+ $powerpress_diags['system_info']['success'] = false;
166
+ $powerpress_diags['system_info']['message3'] = __('Error:', 'powerpress') .' '. sprintf(__('Temporary directory %s is not writable.', 'powerpress'), $powerpress_diags['system_info']['temp_directory']);
167
+ }
168
+
169
+ if(empty($powerpress_diags['system_info']['php_cgi'])){
170
+ $powerpress_diags['system_info']['message4'] = '';
171
+ } else {
172
+ $powerpress_diags['system_info']['message4'] = __('Warning:', 'powerpress') .' '. __('PHP running in CGI mode.', 'powerpress');
173
+ }
174
+
175
+ $user_info = wp_get_current_user();
176
+ if(!empty($user_info->user_email) && isset($_GET['Submit'])){
177
+ powerpressadmin_diagnostics_email($user_info->user_email);
178
+ powerpress_page_message_add_notice(sprintf(__('Diagnostic results sent to %s.', 'powerpress'), $user_info->user_email));
179
+ }
180
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
 
182
+ function powerpressadmin_diagnostics_email($email){
183
+ global $powerpress_diags, $wpmu_version, $wp_version, $powerpress_diag_message;
184
+ $SettingsGeneral = get_option('powerpress_general');
185
+
186
+ // First we need some basic information about the blog...
187
+ $message = __('Blog Title:', 'powerpress') .' '. get_bloginfo('name') . "<br />\n";
188
+ $message .= __('Blog URL:', 'powerpress') .' '. get_bloginfo('url') . "<br />\n";
189
+ $message .= __('WordPress Version:', 'powerpress') .' '. $wp_version . "<br />\n";
190
+ if(!empty($wpmu_version)){
191
+ $message .= __('WordPress MU Version:', 'powerpress') .' '. $wpmu_version . "<br />\n";
192
+ }
193
+ $message .= __('System:', 'powerpress') .' '. $_SERVER['SERVER_SOFTWARE'] . "<br />\n";
194
+ $message .= __('Open basedir:', 'powerpress') .' '. ini_get('open_basedir') ."<br />\n";
195
+
196
+ // Crutial PowerPress Settings
197
+ $message .= "<br />\n";
198
+ $message .= '<strong>'. __('Important PowerPress Settings', 'powerpress') ."</strong><br />\n";
199
+ $message .= " &nbsp; \t &nbsp; ". __('PowerPress version:', 'powerpress') .' '. POWERPRESS_VERSION ."<br />\n";
200
+ $message .= " &nbsp; \t &nbsp; ". __('episode box file size/duration fields:', 'powerpress') .' '. ( empty($SettingsGeneral['episode_box_mode']) ?__('yes', 'powerpress'): ($SettingsGeneral['episode_box_mode']==1?__('no', 'powerpress'):__('yes', 'powerpress')) ) ."<br />\n";
201
+ $message .= " &nbsp; \t &nbsp; ". __('Podcasting capability:', 'powerpress') .' '. ( empty($SettingsGeneral['use_caps'])?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
202
+ $message .= " &nbsp; \t &nbsp; ". __('Feed capability:', 'powerpress') .' '. ( empty($SettingsGeneral['feed_caps'])?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
203
+ $message .= " &nbsp; \t &nbsp; ". __('Category Podcasting:', 'powerpress') .' '. ( empty($SettingsGeneral['cat_casting']) ?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
204
+ $message .= " &nbsp; \t &nbsp; ". __('Podcast Channels:', 'powerpress') .' '. ( empty($SettingsGeneral['channels']) ?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
205
+ $message .= " &nbsp; \t &nbsp; ". __('Additional Player Options:', 'powerpress') .' '. ( empty($SettingsGeneral['player_options'])?__('Disabled (default)', 'powerpress'): __('Enabled', 'powerpress')) ."<br />\n";
206
+
207
+ // Detecting Media Information
208
+ $message .= "<br />\n";
209
+ $message .= '<strong>'.__('Detecting Media Information', 'powerpress') ."</strong><br />\n";
210
+ $message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['success']?'true':'false') ."<br />\n";
211
+ $message .= " &nbsp; \t &nbsp; ". __('warning:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['warning']?'true':'false') ."<br />\n";
212
+ $message .= " &nbsp; \t &nbsp; ". __('allow_url_fopen:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false') ."<br />\n";
213
+ $message .= " &nbsp; \t &nbsp; ". __('curl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl']?'true':'false') ."<br />\n";
214
+ $message .= " &nbsp; \t &nbsp; ". __('curl_ssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl_ssl']?'true':'false') ."<br />\n";
215
+ $message .= " &nbsp; \t &nbsp; ". __('openssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['openssl']?'true':'false') ."<br />\n";
216
+ $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message'] ."<br />\n";
217
+ $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message2'] ."<br />\n";
218
+ $message .= " &nbsp; \t &nbsp; ". __('message 3:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message3'] ."<br />\n";
219
+
220
+ // Uploading Artwork
221
+ $message .= "<br />\n";
222
+ $message .= '<strong>'.__('Uploading Artwork', 'powerpress') ."</strong><br />\n";
223
+ $message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['uploading_artwork']['success']?'true':'false') ."<br />\n";
224
+ $message .= " &nbsp; \t &nbsp; ". __('file_uploads:', 'powerpress') .' '. ($powerpress_diags['uploading_artwork']['file_uploads']?'true':'false') ."<br />\n";
225
+ $message .= " &nbsp; \t &nbsp; ". __('writable:', 'powerpress') .' '. ($powerpress_diags['uploading_artwork']['writable']?'true':'false') ."<br />\n";
226
+ $message .= " &nbsp; \t &nbsp; ". __('upload_path:', 'powerpress') .' '. $powerpress_diags['uploading_artwork']['upload_path'] ."<br />\n";
227
+ $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['uploading_artwork']['message'] ."<br />\n";
228
+
229
+ // System Information
230
+ $message .= "<br />\n";
231
+ $message .= '<strong>'.__('System Information', 'powerpress') ."</strong><br />\n";
232
+ $message .= " &nbsp; \t &nbsp; ". __('success:', 'powerpress') .' '. ($powerpress_diags['system_info']['success']?'true':'false') ."<br />\n";
233
+ $message .= " &nbsp; \t &nbsp; ". __('warning:', 'powerpress') .' '. ($powerpress_diags['system_info']['warning']?'yes':'no') ."<br />\n";
234
+ $message .= " &nbsp; \t &nbsp; ". __('php_version:', 'powerpress') .' '. $powerpress_diags['system_info']['php_version'] ."<br />\n";
235
+ $message .= " &nbsp; \t &nbsp; ". __('memory_limit:', 'powerpress') .' '. $powerpress_diags['system_info']['memory_limit'] ."M\n";
236
+ $message .= " &nbsp; \t &nbsp; ". __('memory_used:', 'powerpress') .' '. sprintf('%.01fM',$powerpress_diags['system_info']['memory_used']) ."<br />\n";
237
+ $message .= " &nbsp; \t &nbsp; ". __('temp directory:', 'powerpress') .' '. $powerpress_diags['system_info']['temp_directory'] ."<br />\n";
238
+ $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['system_info']['message'] ."<br />\n";
239
+ $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['system_info']['message2'] ."<br />\n";
240
+ $message .= " &nbsp; \t &nbsp; ". __('message 3:', 'powerpress') .' '. $powerpress_diags['system_info']['message3'] ."<br />\n";
241
+ if(!empty($powerpress_diags['system_info']['message4'])){
242
+ $message .= " &nbsp; \t &nbsp; ". __('message 4:', 'powerpress') .' '. $powerpress_diags['system_info']['message4'] ."<br />\n";
243
+ }
244
+
245
+ // We are always sending the active plugins list
246
+ if(true){
247
+ $current_plugins = get_option('active_plugins');
248
+ $message .= "<br />\n";
249
+ $message .= '<strong>'.__('Active Plugins', 'powerpress') ."</strong><br />\n";
250
+ foreach($current_plugins as $null=> $plugin_path){
251
+ $plugin_data = get_plugin_data( rtrim(WP_PLUGIN_DIR, '/\\'). '/'. rtrim($plugin_path, '\\/'), false, false ); //Do not apply markup/translate as it'll be cached.
252
+ $message .= " &nbsp; \t &nbsp; " . __('Title:', 'powerpress') .' '. $plugin_data['Title']. "<br />\n";
253
+ $message .= " &nbsp; \t &nbsp; " . __('Relative Path:', 'powerpress') .' '. $plugin_path. "<br />\n";
254
+ $message .= " &nbsp; \t &nbsp; " . __('Version:', 'powerpress') .' '. $plugin_data['Version']. "<br />\n";
255
+ $message .= " &nbsp; \t &nbsp; " . __('Web Site:', 'powerpress') .' '. $plugin_data['PluginURI']. "<br />\n";
256
+ $message .= "<br />\n";
257
+ }
258
+ }
259
+
260
+ // Now lets loop through each section of diagnostics
261
+ $user_info = wp_get_current_user();
262
+ $from_email = $user_info->user_email;
263
+ $from_name = $user_info->user_nicename;
264
+ $headers = 'From: "'.$from_name.'" <'.$from_email.'>'."\n"
265
+ .'Reply-To: "'.$from_name.'" <'.$from_email.'>'."\n"
266
+ .'Return-Path: "'.$from_name.'" <'.$from_email.'>'."\n";
267
+
268
+ if(!empty($_GET['support'])){
269
+ $from_name = 'Blubrry Support';
270
+ $from_email = 'support@blubrry.com';
271
+ $headers .= 'CC: "'.$from_name.'" <'.$from_email.'>'."\n";
272
+ }
273
+
274
+ if(!empty($_GET['additional']) && !empty($_GET['additional_email'])){
275
+ $from_email = htmlspecialchars($_GET['additional_email']);
276
+ $headers .= 'CC: <'.$from_email.'>'."\n";
277
+ }
278
+
279
+ $headers .= "Content-Type: text/html\n";
280
+
281
+ @wp_mail($email, sprintf(__('Blubrry PowerPress diagnostic results for %s', 'powerpress'), get_bloginfo('name')), $message, $headers);
282
+ $powerpress_diag_message = $message;
283
+ }
 
 
 
 
284
 
285
+ function powerpressadmin_diagnostics_is_writable($dir){
286
+ // Make sure we can create a file in the specified directory...
287
+ if(is_dir($dir)){
288
+ return is_writable($dir);
289
+ }
290
+ return false;
291
+ }
 
 
292
 
293
+ function powerpressadmin_diagnostics_status($success=true, $warning=false){
294
+ $img = 'yes.png';
295
+ $color = '#0A8822';
296
+ $text = __('Success', 'powerpress');
297
+ if($success == false){ // Failed takes precedence over warning
298
+ $img = 'no.png';
299
+ $color = '#CC0000';
300
+ $text = __('Failed', 'powerpress');
301
+ } elseif($warning){
302
+ $img = '../../../wp-includes/images/smilies/icon_exclaim.gif';
303
+ $color = '#D98500';
304
+ $text = __('Warning', 'powerpress');
305
+ }
306
+ ?>
307
+
308
+ <!-- <img src="--><?php //echo admin_url(); ?><!--/images/--><?php //echo $img; ?><!--" style="vertical-align:text-top;" />-->
309
+ <strong style="color:<?php echo $color; ?>;"><?php echo $text; ?></strong>
310
+
311
+ <?php }
 
 
 
312
 
313
+ function powerpressadmin_diagnostics(){
314
+ global $powerpress_diags, $powerpress_diag_message;
315
+ $GeneralSettings = get_option('powerpress_general');
 
 
 
 
 
 
 
 
 
 
 
 
 
316
 
317
+ if(empty($powerpress_diags)){
318
+ powerpressadmin_diagnostics_process();
319
+ powerpress_page_message_print();
320
+ }
321
+ ?>
322
+
323
+ <div class="pp-row">
324
+ <a class="pp-page-back-link" href="admin.php?page=powerpress/powerpressadmin_tools.php"><span>&#8592; PowerPress Tools</span></a>
325
+ </div>
326
+ <div class="pp-card-body">
327
+ <div class="pp-row pp-tools-row">
328
+ <h2 class="pp-page-sub-header">PowerPress Diagnostics</h2>
329
+ </div>
330
+ <div class="pp-row pp-tools-row">
331
+ <p class="pp-tools-text">
332
+ The Diagnostics page checks to see if your server is configured to support all the available features in Blubrry PowerPress.
333
+ </p>
334
+ </div>
335
+ <div class="pp-row pp-tools-row">
336
+ <h3>Detecting Media Information</h3>
337
+ </div>
338
+ <div class="pp-row pp-tools-row">
339
+ <p class="pp-tools-text">
340
+ The following test checks to see if your web server can make connections with other web servers to obtain file size and media duration information.
341
+ The test checks to see if either the PHP cURL library is installed or the php.ini setting ‘allow_url_fopen’ enabled.
342
+ </p>
343
+ </div>
344
+ <div class="diagnostics-message">
345
+ <div class="pp-row">
346
+ <h3><?php powerpressadmin_diagnostics_status($powerpress_diags['detecting_media']['success'],$powerpress_diags['detecting_media']['warning']); ?></h3>
347
+ </div>
348
+ <div class="pp-row">
349
+ <p class="pp-tools-text" style="margin-bottom: 5px;"><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message']); ?></p>
350
+ </div>
351
+ <?php if($powerpress_diags['detecting_media']['message2']){ ?>
352
+ <div class="pp-row">
353
+ <p class="pp-tools-text" style="margin-bottom: 5px;"><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message2']); ?></p>
354
+ </div>
355
+ <?php } ?>
356
+ <?php if($powerpress_diags['detecting_media']['message3']){ ?>
357
+ <div class="pp-row">
358
+ <p class="pp-tools-text" style="margin-bottom: 5px;"><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message3']); ?></p>
359
+ </div>
360
+ <?php } ?>
361
+ <?php if($powerpress_diags['detecting_media']['success']){ ?>
362
+ <div class="pp-row">
363
+ <p class="pp-tools-text" style="margin-bottom: 5px;">If you are still having problems detecting media information, check with your web hosting provider if there is a firewall blocking your server.</p>
364
+ </div>
365
+ <?php } else { ?>
366
+ <div class="pp-row">
367
+ <p class="pp-tools-text" style="margin-bottom: 5px;">Contact your web hosting provider with the information above.</p>
368
+ </div>
369
+ <?php } ?>
370
+ <div class="pp-row">
371
+ <ul>
372
+ <li>
373
+ <ul>
374
+ <li style="font-size: 100%;"><p>allow_url_fopen: <?php echo ($powerpress_diags['detecting_media']['allow_url_fopen'] ? 'true' : 'false'); ?></p></li>
375
+ <li style="font-size: 100%;"><p>curl: <?php echo ($powerpress_diags['detecting_media']['curl'] ? 'true' : 'false'); ?></p></li>
376
+ <li style="font-size: 100%;"><p>curl_ssl: <?php echo ($powerpress_diags['detecting_media']['curl_ssl'] ? 'true' : 'false'); ?></p></li>
377
+ <li style="font-size: 100%;"><p>openssl: <?php echo ($powerpress_diags['detecting_media']['openssl'] ? 'true' : 'false'); ?></p></li>
378
+ </ul>
379
+ </li>
380
+ </ul>
381
+ </div>
382
+ </div>
383
+ <hr>
384
+ <div class="pp-row pp-tools-row">
385
+ <h3>Uploading Artwork</h3>
386
+ </div>
387
+ <div class="pp-row pp-tools-row">
388
+ <p class="pp-tools-text">The following test checks your version of PHP, memory usage and temporary directory access.</p>
389
+ </div>
390
+ <div class="diagnostics-message">
391
+ <div class="pp-row">
392
+ <h3><?php powerpressadmin_diagnostics_status($powerpress_diags['uploading_artwork']['success']); ?></h3>
393
+ </div>
394
+
395
+ <div class="pp-row">
396
+ <p class="pp-tools-text" style="margin-bottom: 15px;"><?php echo htmlspecialchars($powerpress_diags['uploading_artwork']['message']); ?></p>
397
+ </div>
398
+ </div>
399
+ <hr>
400
+ <div class="pp-row pp-tools-row">
401
+ <h3>System Information</h3>
402
+ </div>
403
+ <div class="pp-row pp-tools-row">
404
+ <p class="pp-tools-text">The following test checks your version of PHP, memory usage and temporary directory access.</p>
405
+ </div>
406
+ <div class="diagnostics-message">
407
+ <div class="pp-row">
408
+ <h3><?php powerpressadmin_diagnostics_status($powerpress_diags['system_info']['success'], ($powerpress_diags['system_info']['warning'] || $powerpress_diags['system_info']['php_cgi'])); ?></h3>
409
+ </div>
410
+ <div class="pp-row">
411
+ <p class="pp-tools-text" style="margin-bottom: 15px;">
412
+ <?php echo htmlspecialchars(sprintf(__('WordPress Version %s'), $GLOBALS['wp_version'])); ?>
413
+ <?php echo htmlspecialchars($powerpress_diags['system_info']['message']); ?>
414
+ <?php echo htmlspecialchars($powerpress_diags['system_info']['message2']); ?>
415
+ <?php echo htmlspecialchars($powerpress_diags['system_info']['message3']); ?>
416
+
417
+ <?php if(!empty($powerpress_diags['system_info']['php_cgi']) ) { ?>
418
+ <?php echo __('Warning:', 'powerpress') .' '. __('PHP running in CGI mode.', 'powerpress'); ?>
419
+ <?php }
420
+
421
+ if($powerpress_diags['system_info']['warning']) { ?>
422
+ <?php echo __('Contact your web hosting provider to inquire how to increase the PHP memory limit on your web server.', 'powerpress'); ?>
423
+ <?php } ?>
424
+ </p>
425
+ </div>
426
+ </div>
427
+ <hr>
428
+ <div class="pp-row pp-tools-row">
429
+ <h3>Email Results</h3>
430
+ </div>
431
+ <div class="pp-row pp-tools-row">
432
+ <p class="pp-tools-text">Send the results above to the selected email addresses.</p>
433
+ </div>
434
+
435
+ <form enctype="multipart/form-data" method="get" action="<?php echo admin_url('admin.php'); ?>">
436
+ <input type="hidden" name="action" value="powerpress-diagnostics" />
437
+ <input type="hidden" name="page" value="powerpress/powerpressadmin_tools.php" />
438
+
439
+ <?php // Print nonce
440
+ wp_nonce_field('powerpress-diagnostics');
441
+ ?>
442
+
443
+ <div class="pp-row pp-tools-row" style="margin-bottom: 15px;">
444
+ <input style="margin-top: 3px; margin-right: 15px;" type="checkbox" name="CC" value="1" checked disabled/>
445
+ <p style="margin: 0;">Send to <?php $user_info = wp_get_current_user(); echo $user_info->user_email; ?></p>
446
+ </div>
447
+
448
+ <div class="pp-row pp-tools-row" style="margin-bottom: 15px;">
449
+ <input style="margin-top: 3px; margin-right: 15px;" type="checkbox" name="support" value="1" checked/>
450
+ <p style="margin: 0;">CC: support@blubbry.com</p>
451
+ </div>
452
+
453
+ <div class="pp-row pp-tools-row" style="margin-bottom: 5px;">
454
+ <input style="margin-top: 3px; margin-right: 15px;" type="checkbox" name="additional" value="1"/>
455
+ <p style="margin: 0;">CC: additional email address</p>
456
+ </div>
457
+
458
+ <div class="pp-row pp-tools-row">
459
+ <input type="text" name="additional_email" value="" style="width: 30%; padding: 0 10px 0 10px; margin-left: 30px;"/>
460
+ </div>
461
+
462
+ <div class="pp-row pp-tools-row" style="display: none;">
463
+ <input style="margin-top: 3px; margin-right: 15px;" type="checkbox" name="ap" value="1" checked/>
464
+ <p style="margin: 0;"><?php echo __('Include list of active plugins in diagnostics results.', 'powerpress') ?></p>
465
+ </div>
466
 
467
+ <div class="pp-row pp-tools-row" style="margin-top: 30px;">
468
+ <input style="margin: 0 0 30px 0;" class="powerpress_save_button_other pp-tools-button" type="submit" name="Submit" id="powerpress_save_button" value="Send Results">
469
+ </div>
470
+ </form>
471
+ </div>
472
+ <?php } ?>
powerpressadmin-editfeed.php CHANGED
@@ -181,6 +181,10 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
181
  ?>
182
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
183
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
184
  </div>
185
  </div>
186
  <button style="display: none;" id="welcome-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'welcome-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
@@ -204,6 +208,10 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
204
  ?>
205
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
206
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
207
  </div>
208
  </div>
209
  <div id="feeds-settings" class="pp-sidenav-tab active">
@@ -240,6 +248,10 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
240
  ?>
241
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
242
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
243
  </div>
244
  </div>
245
 
@@ -315,6 +327,10 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
315
  ?>
316
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
317
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
318
  </div>
319
  </div>
320
  <button style="display: none;" id="other-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'other-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
@@ -334,6 +350,10 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
334
  ?>
335
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
336
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
337
  </div>
338
  </div>
339
  <?php
181
  ?>
182
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
183
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
184
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
185
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
186
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
187
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
188
  </div>
189
  </div>
190
  <button style="display: none;" id="welcome-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'welcome-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
208
  ?>
209
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
210
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
211
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
212
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
213
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
214
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
215
  </div>
216
  </div>
217
  <div id="feeds-settings" class="pp-sidenav-tab active">
248
  ?>
249
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
250
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
251
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
252
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
253
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
254
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
255
  </div>
256
  </div>
257
 
327
  ?>
328
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
329
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
330
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
331
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
332
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
333
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
334
  </div>
335
  </div>
336
  <button style="display: none;" id="other-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'other-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
350
  ?>
351
  <div class="pp-sidenav-extra" style="margin-top: 10%;"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
352
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
353
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
354
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
355
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
356
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
357
  </div>
358
  </div>
359
  <?php
powerpressadmin-find-replace.php CHANGED
@@ -1,342 +1,322 @@
1
  <?php
2
- // powerpressadmin-find-replace.php
3
- $g_FindReplaceResults = array();
4
-
5
- // Returns an array of enclosures with key of array = meta_id
6
- function powerpressadmin_find_replace_get_enclosures($find_string)
7
- {
8
- $Episodes = array();
9
- global $wpdb;
10
-
11
- $query = "SELECT meta_id, post_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE meta_key LIKE \"%enclosure\"";
12
- $results_data = $wpdb->get_results($query, ARRAY_A);
13
-
14
- foreach( $results_data as $index=> $row )
15
- {
16
- list($url) = @explode("\n", $row['meta_value'], 2 );
17
- $url = trim($url);
18
- if( $find_string == '' || strstr($url, $find_string) )
19
- $Episodes[ $row['meta_id'] ] = $row;
20
- }
21
- return $Episodes;
22
- }
23
-
24
- function powerpressadmin_find_replace_update_meta($meta_id, $meta_value)
25
- {
26
- global $wpdb;
27
- return $wpdb->update( $wpdb->postmeta, array('meta_value'=>$meta_value), array('meta_id'=>$meta_id) );
28
- }
29
 
30
- function powerpressadmin_find_replace_process()
31
- {
32
- $wp_remote_options = array();
33
- $wp_remote_options['user-agent'] = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
34
- $wp_remote_options['httpversion'] = '1.1';
35
-
36
- global $g_FindReplaceResults;
37
- if( isset($_POST['FindReplace']) )
38
- {
39
- $FindReplace = $_POST['FindReplace'];
40
- $FindReplace['step'] = intval( $FindReplace['step'] );
41
- if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
42
- {
43
- $success_count = 0;
44
- $failed_count = 0;
45
-
46
- $FoundArray = powerpressadmin_find_replace_get_enclosures($FindReplace['find_string']);
47
-
48
- foreach( $FoundArray as $meta_id=> $row )
49
- {
50
- // powerpress_get_post_meta
51
- $meta_value = get_post_meta($row['post_id'], $row['meta_key'], true);
52
- $parts = explode("\n", $meta_value, 2);
53
- $other_meta_data = false;
54
- if( count($parts) == 2 )
55
- list($old_url, $other_meta_data) = $parts;
56
- else
57
- $old_url = trim($meta_value);
58
-
59
- $old_url = trim($old_url);
60
- //echo $old_url;
61
- $g_FindReplaceResults[ $meta_id ] = $row;
62
- $g_FindReplaceResults[ $meta_id ]['old_url'] = $old_url;
63
- $g_FindReplaceResults[ $meta_id ]['find_readable'] = str_replace($FindReplace['find_string'],
64
- sprintf('<span class="find_string strong">%s</span>', esc_attr($FindReplace['find_string'])), esc_attr($old_url) );
65
- $g_FindReplaceResults[ $meta_id ]['replace_readable'] = str_replace($FindReplace['find_string'],
66
- sprintf('<span class="replace_string strong">%s</span>', esc_attr($FindReplace['replace_string']) ), esc_attr($old_url) );
67
- $new_url = str_replace($FindReplace['find_string'],$FindReplace['replace_string'], $old_url);
68
- $g_FindReplaceResults[ $meta_id ]['new_url'] = $new_url;
69
-
70
- if( $FindReplace['step'] == 3 && $FindReplace['find_string'] != '' )
71
- {
72
- $good = true;
73
- if( !empty($FindReplace['verify']) )
74
- {
75
- $response = wp_remote_head( $new_url, $wp_remote_options );
76
- // Redirect 1
77
- if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
78
- {
79
- $headers = wp_remote_retrieve_headers( $response );
80
- $response = wp_remote_head( $headers['location'], $wp_remote_options );
81
- }
82
- // Redirect 2
83
- if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
84
- {
85
- $headers = wp_remote_retrieve_headers( $response );
86
- $response = wp_remote_head( $headers['location'], $wp_remote_options );
87
- }
88
- // Redirect 3
89
- if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
90
- {
91
- $headers = wp_remote_retrieve_headers( $response );
92
- $response = wp_remote_head( $headers['location'], $wp_remote_options );
93
- }
94
- // Redirect 4
95
- if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
96
- {
97
- $headers = wp_remote_retrieve_headers( $response );
98
- $response = wp_remote_head( $headers['location'], $wp_remote_options );
99
- }
100
- //$headers = wp_remote_retrieve_headers( $response );
101
-
102
- //$response = @wp_remote_head( $new_url, $wp_remote_options );
103
- if ( is_wp_error( $response ) )
104
- {
105
- $g_FindReplaceResults[ $meta_id ]['error'] = $response->get_error_message();
106
- $good = false;
107
- }
108
-
109
- if( $good && isset($response['response']['code']) && ($response['response']['code'] < 200 || $response['response']['code'] > 203) )
110
- {
111
- $g_FindReplaceResults[ $meta_id ]['error'] = 'Error, HTTP '.$response['response']['code'];
112
- $good = false;
113
- }
114
- }
115
-
116
- if( $good )
117
- {
118
- $DataUpdated = $new_url;
119
- if( $other_meta_data )
120
- $DataUpdated .= "\n". $other_meta_data;
121
- if( update_post_meta( $row['post_id'], $row['meta_key'], $DataUpdated) )
122
- $success_count++;
123
- else
124
- $good = false;
125
- }
126
-
127
- if( !$good )
128
- {
129
- $failed_count++;
130
- }
131
- $g_FindReplaceResults[ $meta_id ]['success'] = $good;
132
- }
133
-
134
- }
135
-
136
- if( $FindReplace['step'] == 3 )
137
- {
138
- if( $success_count > 0 )
139
- powerpress_page_message_add_notice( sprintf(__('%d URLs updated successfully.', 'powerpress'), $success_count) );
140
- if( $failed_count > 0 )
141
- powerpress_page_message_add_error( sprintf(__('%d URLs were not updated.', 'powerpress'), $failed_count) );
142
- else if( $FindReplace['find_string'] == '' )
143
- powerpress_page_message_add_notice( __('Nothing specified to find.', 'powerpress') );
144
- }
145
- }
146
-
147
-
148
- }
149
-
150
- powerpress_page_message_add_notice( __('WARNING: Please backup your database before proceeding. Blubrry PowerPress is not responsible for any lost or damaged data resulting from this Find and Replace tool.', 'powerpress') );
151
- }
152
 
153
- function powerpress_admin_find_replace()
154
- {
155
- $FindReplaceResults = array();
156
-
157
- if( isset($_POST['FindReplace']) )
158
- {
159
- $FindReplace = $_POST['FindReplace'];
160
- $FindReplace['step'] = intval( $FindReplace['step'] );
161
- }
162
- else
163
- {
164
- $FindReplace = array();
165
- $FindReplace['find_string'] = '';
166
- $FindReplace['replace_string'] = '';
167
- $FindReplace['step'] = 1;
168
- }
169
-
170
- if( $FindReplace['step'] == 2 )
171
- {
172
- $FindReplace['verify'] = true;
173
- }
174
- if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
175
- {
176
- $FindReplaceResults = powerpressadmin_find_replace_get_results();
177
- }
178
-
179
- //$FindReplace = powerpress_esc_html($FindReplace); // Prevent XSS
180
- ?>
181
-
182
- <script type="text/javascript"><!--
183
- function VerifyCheck(obj)
184
- {
185
- if( !obj.checked && !confirm('<?php echo __('WARNING: Verification prevents changes if the URL entered is invalid.\n\nAre you sure you do not want to verify the URLs?', 'powerpress'); ?>') )
186
- obj.checked = true;
187
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
- function ConfirmReplace()
190
- {
191
- if( confirm('<?php echo __('WARNING: You are about to make permanent changes to your database.\n\nAre you sure you wish to continue?', 'powerpress'); ?>') )
192
- {
193
- jQuery('#replace_step').val('3');
194
- return true;
195
- }
196
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  }
198
- //-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  </script>
200
- <style type="text/css">
201
- .find_string {
202
- background-color: #CFE2F3; /* lt blue */
203
- padding: 1px;
204
- }
205
- .replace_string {
206
- background-color: #FCE5CD; /* orange */
207
- padding: 1px;
208
- }
209
- .strong {
210
- font-style:italic;
211
- }
212
 
213
- dd {
214
- margin: 2px 2px 2px 10px;
215
- }
216
- dt {
217
- margin: 2px 2px 2px 10px;
218
- }
219
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
- <input type="hidden" name="action" value="powerpress-find-replace" />
222
- <input type="hidden" name="FindReplace[step]" value="<?php echo esc_attr($FindReplace['step']); ?>" id="replace_step" />
223
 
224
- <h2><?php echo __("Find and Replace Episode URLs", 'powerpress'); ?></h2>
 
 
 
225
 
226
- <p style="margin-bottom: 0;"><?php echo __('Find and replace complete or partial segments of media URLs. Useful if you move your media to a new web site or service.', 'powerpress'); ?></p>
 
 
227
 
228
- <table class="form-table">
229
- <tr valign="top">
230
- <th scope="row"><?php echo __("Find in URL", 'powerpress'); ?></th>
231
- <td>
232
- <input type="text" id="find_string" name="FindReplace[find_string]" style="width: 50%;" value="<?php echo esc_attr($FindReplace['find_string']); ?>" maxlength="255" <?php if( $FindReplace['step'] != 1 ) { echo ' readOnly'; } ?> />
233
- <?php if( $FindReplace['step'] != 1 ) { ?><a href="#" onclick="jQuery('#replace_step').val('1');jQuery('#replace_step').closest('form').submit();return false;"><?php echo __('Modify', 'powerpress'); ?></a><?php } ?>
234
- <p style="margin: 0; font-size: 90%;"><?php echo __('Example', 'powerpress'); ?>: http://www.oldsite.com/</p>
235
- </td>
236
- </tr>
237
- <tr valign="top">
238
- <th scope="row"><?php echo __('Replace with', 'powerpress'); ?></th>
239
- <td>
240
- <input type="text" id="replace_string" name="FindReplace[replace_string]" style="width: 50%;" value="<?php echo esc_attr($FindReplace['replace_string']); ?>" maxlength="255" <?php if( $FindReplace['step'] != 1 ) { echo ' readOnly'; } ?> />
241
- <?php if( $FindReplace['step'] != 1 ) { ?><a href="#" onclick="jQuery('#replace_step').val('1');jQuery('#replace_step').closest('form').submit();return false;"><?php echo __('Modify', 'powerpress'); ?></a><?php } ?>
242
- <p style="margin: 0; font-size: 90%;"><?php echo __('Example', 'powerpress'); ?>: http://www.newsite.com/</p>
243
- </td>
244
- </tr>
245
- </table>
246
 
 
 
 
 
 
 
 
 
247
 
 
 
 
248
 
 
 
 
 
 
249
 
250
- <?php
251
- if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
252
- {
253
- ?>
254
- <h2><?php echo ($FindReplace['step'] == 2 ? __('Preview Changes', 'powerpress') : __('Change Results', 'powerpress') ); ?></h2>
255
 
256
- <p><?php echo sprintf( __('Found %d results with "%s"', 'powerpress'), count($FindReplaceResults), "<span class=\"find_string strong\">". esc_attr($FindReplace['find_string']). "</span>" ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
 
258
- <ol>
259
- <?php
260
- foreach( $FindReplaceResults as $meta_id=> $row )
261
- {
262
- $post_view_link = '<a href="' . get_permalink($row['post_id']) . '" target="_blank">' . get_the_title($row['post_id']) . '</a>';
263
- $post_edit_link = '<a href="' . get_edit_post_link($row['post_id']) . '" target="_blank">' . __('Edit Post', 'powerpress') . '</a>';
264
- ?>
265
- <li>
266
- <?php
267
- if( $FindReplace['step'] == 3 )
268
- {
269
- echo '<div>';
270
- powerpressadmin_find_replace_status($row['success']);
271
- echo ' &nbsp; ';
272
- if( !empty($row['error']) )
273
- echo $row['error'];
274
- echo '</div>';
275
- }
276
- ?>
277
- Post: <strong><?php echo $post_view_link; ?></strong>
278
- <span style="font-size: 90%;">(<?php echo $post_edit_link; ?>)</span>
279
- <dl>
280
- <dt>
281
- <?php echo __('Found', 'powerpress') .': '. $row['find_readable']; ?>
282
- </dt>
283
- <dd>
284
- <?php echo __('Replace', 'powerpress') .': '. $row['replace_readable']; ?>
285
- (<a href="<?php echo esc_attr($row['new_url']); ?>" target="_blank"><?php echo __('test link', 'powerpress'); ?></a>)
286
- </dd>
287
- </dl>
288
- </li>
289
- <?php
290
- }
291
- ?>
292
- </ol>
293
- <?php } ?>
294
-
295
- <?php if( $FindReplace['step'] == 1 ) { ?>
296
- <p class="submit">
297
- <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary button-blubrry" value="<?php echo __('Find and Preview Changes', 'powerpress'); ?>" onclick="jQuery('#replace_step').val('2');" />
298
- </p>
299
- <?php } else if( $FindReplace['step'] == 2 && count($FindReplaceResults) > 0 ) { ?>
300
- <p class="submit">
301
- <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary button-blubrry" value="<?php echo __('Commit Changes', 'powerpress'); ?>" onclick="return ConfirmReplace()" />
302
- &nbsp;
303
- <input type="checkbox" name="FindReplace[verify]" value="1" <?php if( !empty($FindReplace['verify']) ) echo 'checked'; ?> onchange="return VerifyCheck(this)" />
304
- <strong><?php echo __('Verify URLs', 'powerpress'); ?></strong>
305
- (<?php echo __('Does not change URL if invalid', 'powerpress'); ?>)</p>
306
- </p>
307
- <?php } else if ( $FindReplace['step'] == 3 || ($FindReplace['step'] == 2 && count($FindReplaceResults) == 0) ) { ?>
308
- <p class="submit">
309
- <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_tools.php'); ?>"><?php echo __('PowerPress Tools', 'powerpress'); ?></a></strong>
310
- </p>
311
- <?php } ?>
312
-
313
- <p style="margin-bottom: 40px; margin-top:0;"><?php echo sprintf( __('We recommend using the %s plugin to backup your database before using this Find and Replace tool.', 'powerpress'), '<a href="http://wordpress.org/extend/plugins/wp-db-backup/" target="_blank">'. __('WP-DB-Backup', 'powerpress') .'</a>' ); ?></p>
314
- <!-- start footer -->
315
- <?php
316
- }
317
 
318
- function powerpressadmin_find_replace_status($success=true)
319
- {
320
- $img = 'yes.png';
321
- $color = '#458045';
322
- $text = __('Success', 'powerpress');
323
- if( $success == false ) // Failed takes precedence over warning
324
- {
325
- $img = 'no.png';
326
- $color = '#CC0000';
327
- $text = __('Failed', 'powerpress');
328
- }
329
- ?>
330
- <img src="<?php echo admin_url(); ?>/images/<?php echo $img; ?>" style="vertical-align:text-top;" />
331
- <strong style="color:<?php echo $color; ?>;"><?php echo $text; ?></strong>
332
- <?php
333
- }
334
 
335
- function powerpressadmin_find_replace_get_results()
336
- {
337
- global $g_FindReplaceResults;
338
- if( !is_array($g_FindReplaceResults) )
339
- return array();
340
- return $g_FindReplaceResults;
341
- }
 
342
  ?>
1
  <?php
2
+
3
+ // powerpressadmin-find-replace.php
4
+ $g_FindReplaceResults = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
+ // Returns an array of enclosures with key of array = meta_id
7
+ function powerpressadmin_find_replace_get_enclosures($find_string){
8
+ $Episodes = array();
9
+ global $wpdb;
10
+
11
+ $query = "SELECT meta_id, post_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE meta_key LIKE \"%enclosure\"";
12
+ $results_data = $wpdb->get_results($query, ARRAY_A);
13
+
14
+ foreach($results_data as $index=> $row){
15
+ list($url) = @explode("\n", $row['meta_value'], 2);
16
+ $url = trim($url);
17
+ if($find_string == '' || strstr($url, $find_string)){
18
+ $Episodes[ $row['meta_id'] ] = $row;
19
+ }
20
+ }
21
+
22
+ return $Episodes;
23
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
+ function powerpressadmin_find_replace_update_meta($meta_id, $meta_value){
26
+ global $wpdb;
27
+ return $wpdb->update( $wpdb->postmeta, array('meta_value'=>$meta_value), array('meta_id'=>$meta_id) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
+
30
+ function powerpressadmin_find_replace_process(){
31
+ $wp_remote_options = array();
32
+ $wp_remote_options['user-agent'] = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
33
+ $wp_remote_options['httpversion'] = '1.1';
34
+
35
+ global $g_FindReplaceResults;
36
+ if(isset($_POST['FindReplace'])){
37
+ $FindReplace = $_POST['FindReplace'];
38
+ $FindReplace['step'] = intval($FindReplace['step']);
39
+ if($FindReplace['step'] == 2 || $FindReplace['step'] == 3){
40
+ $success_count = 0;
41
+ $failed_count = 0;
42
+
43
+ $FoundArray = powerpressadmin_find_replace_get_enclosures($FindReplace['find_string']);
44
 
45
+ foreach($FoundArray as $meta_id=> $row){
46
+ // powerpress_get_post_meta
47
+ $meta_value = get_post_meta($row['post_id'], $row['meta_key'], true);
48
+ $parts = explode("\n", $meta_value, 2);
49
+ $other_meta_data = false;
50
+ if( count($parts) == 2 )
51
+ list($old_url, $other_meta_data) = $parts;
52
+ else
53
+ $old_url = trim($meta_value);
54
+
55
+ $old_url = trim($old_url);
56
+ //echo $old_url;
57
+ $g_FindReplaceResults[ $meta_id ] = $row;
58
+ $g_FindReplaceResults[ $meta_id ]['old_url'] = $old_url;
59
+ $g_FindReplaceResults[ $meta_id ]['find_readable'] = str_replace($FindReplace['find_string'],
60
+ sprintf('<span class="find_string strong">%s</span>', esc_attr($FindReplace['find_string'])), esc_attr($old_url) );
61
+ $g_FindReplaceResults[ $meta_id ]['replace_readable'] = str_replace($FindReplace['find_string'],
62
+ sprintf('<span class="replace_string strong">%s</span>', esc_attr($FindReplace['replace_string']) ), esc_attr($old_url) );
63
+ $new_url = str_replace($FindReplace['find_string'],$FindReplace['replace_string'], $old_url);
64
+ $g_FindReplaceResults[ $meta_id ]['new_url'] = $new_url;
65
+
66
+ if($FindReplace['step'] == 3 && $FindReplace['find_string'] != '') {
67
+ $good = true;
68
+ if(!empty($FindReplace['verify'])) {
69
+ $response = wp_remote_head( $new_url, $wp_remote_options );
70
+ // Redirect 1
71
+ if(!is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302)) {
72
+ $headers = wp_remote_retrieve_headers( $response );
73
+ $response = wp_remote_head( $headers['location'], $wp_remote_options );
74
+ }
75
+ // Redirect 2
76
+ if(!is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302)){
77
+ $headers = wp_remote_retrieve_headers( $response );
78
+ $response = wp_remote_head( $headers['location'], $wp_remote_options );
79
+ }
80
+ // Redirect 3
81
+ if(!is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302)){
82
+ $headers = wp_remote_retrieve_headers( $response );
83
+ $response = wp_remote_head( $headers['location'], $wp_remote_options );
84
+ }
85
+ // Redirect 4
86
+ if(!is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302)){
87
+ $headers = wp_remote_retrieve_headers( $response );
88
+ $response = wp_remote_head( $headers['location'], $wp_remote_options );
89
+ }
90
+ //$headers = wp_remote_retrieve_headers( $response );
91
+
92
+ //$response = @wp_remote_head( $new_url, $wp_remote_options );
93
+ if(is_wp_error( $response )){
94
+ $g_FindReplaceResults[ $meta_id ]['error'] = $response->get_error_message();
95
+ $good = false;
96
+ }
97
+
98
+ if($good && isset($response['response']['code']) && ($response['response']['code'] < 200 || $response['response']['code'] > 203)){
99
+ $g_FindReplaceResults[ $meta_id ]['error'] = 'Error, HTTP '.$response['response']['code'];
100
+ $good = false;
101
+ }
102
+ }
103
+
104
+ if($good) {
105
+ $DataUpdated = $new_url;
106
+ if($other_meta_data){
107
+ $DataUpdated .= "\n". $other_meta_data;
108
+ }
109
+ if(update_post_meta( $row['post_id'], $row['meta_key'], $DataUpdated)){
110
+ $success_count++;
111
+ } else {
112
+ $good = false;
113
+ }
114
+ }
115
+
116
+ if(!$good){
117
+ $failed_count++;
118
+ }
119
+ $g_FindReplaceResults[ $meta_id ]['success'] = $good;
120
+ }
121
+ }
122
+
123
+ if($FindReplace['step'] == 3) {
124
+ if($success_count > 0){
125
+ powerpress_page_message_add_notice( sprintf(__('%d URLs updated successfully.', 'powerpress'), $success_count) );
126
+ }
127
+ if($failed_count > 0){
128
+ powerpress_page_message_add_error( sprintf(__('%d URLs were not updated.', 'powerpress'), $failed_count) );
129
+ }
130
+ elseif( $FindReplace['find_string'] == '' ){
131
+ powerpress_page_message_add_notice( __('Nothing specified to find.', 'powerpress') );
132
+ }
133
+ }
134
+ }
135
+ }
136
+
137
+ powerpress_page_message_add_notice( __('WARNING: Please backup your database before proceeding. Blubrry PowerPress is not responsible for any lost or damaged data resulting from this Find and Replace tool.', 'powerpress') );
138
  }
139
+
140
+ function powerpress_admin_find_replace(){
141
+ $FindReplaceResults = array();
142
+
143
+ if(isset($_POST['FindReplace'])){
144
+ $FindReplace = $_POST['FindReplace'];
145
+ $FindReplace['step'] = intval( $FindReplace['step'] );
146
+ } else {
147
+ $FindReplace = array();
148
+ $FindReplace['find_string'] = '';
149
+ $FindReplace['replace_string'] = '';
150
+ $FindReplace['step'] = 1;
151
+ }
152
+
153
+ if($FindReplace['step'] == 2){
154
+ $FindReplace['verify'] = true;
155
+ }
156
+
157
+ if($FindReplace['step'] == 2 || $FindReplace['step'] == 3) {
158
+ $FindReplaceResults = powerpressadmin_find_replace_get_results();
159
+ }
160
+ ?>
161
+
162
+ <script type="text/javascript">
163
+ function VerifyCheck(obj){
164
+ if(!obj.checked && !confirm('<?php echo __('WARNING: Verification prevents changes if the URL entered is invalid.\n\nAre you sure you do not want to verify the URLs?', 'powerpress'); ?>')){
165
+ obj.checked = true;
166
+ }
167
+ }
168
+
169
+ function ConfirmReplace(){
170
+ if(confirm('<?php echo __('WARNING: You are about to make permanent changes to your database.\n\nAre you sure you wish to continue?', 'powerpress'); ?>')){
171
+ jQuery('#replace_step').val('3');
172
+ return true;
173
+ }
174
+ return false;
175
+ }
176
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
+ <style>
179
+ .find_string {
180
+ background-color: #CFE2F3; /* lt blue */
181
+ padding: 1px;
182
+ }
183
+ .replace_string {
184
+ background-color: #FCE5CD; /* orange */
185
+ padding: 1px;
186
+ }
187
+ .strong {
188
+ font-style:italic;
189
+ }
190
+ dd {
191
+ margin: 2px 2px 2px 10px;
192
+ }
193
+ dt {
194
+ margin: 2px 2px 2px 10px;
195
+ }
196
+ </style>
197
 
198
+ <input type="hidden" name="action" value="powerpress-find-replace" />
199
+ <input type="hidden" name="FindReplace[step]" value="<?php echo esc_attr($FindReplace['step']); ?>" id="replace_step" />
200
 
201
+ <div class="pp-row">
202
+ <a class="pp-page-back-link" href="admin.php?page=powerpress/powerpressadmin_tools.php"><span>&#8592; PowerPress Tools</span></a>
203
+ </div>
204
+ <div class="pp-card-body">
205
 
206
+ <div class="pp-row pp-tools-row">
207
+ <h2 class="pp-page-sub-header">Find and Replace Episode URLs</h2>
208
+ </div>
209
 
210
+ <div class="pp-row pp-tools-row">
211
+ <p class="pp-tools-text">
212
+ Find and replace complete or partial segments of media URLs. Useful if you move your media to a new website or service.
213
+ We recommend using the WP-DB-Backup plugin to backup your database before using this Find and Replace tool.
214
+ </p>
215
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
216
 
217
+ <div class="pp-row pp-tools-row" style="margin-bottom: 30px;">
218
+ <h3 style="margin-right: 30px;">Find Episode URL</h3>
219
+ <input class="find-and-replace-input" type="text" id="find_string" name="FindReplace[find_string]" value="<?php echo esc_attr($FindReplace['find_string']); ?>" maxlength="255" placeholder="MyOldSite.com/">
220
+ </div>
221
+ <div class="pp-row pp-tools-row">
222
+ <h3 style="margin-right: 65px;">Replace with</h3>
223
+ <input class="find-and-replace-input" type="text" id="replace_string" name="FindReplace[replace_string]" value="<?php echo esc_attr($FindReplace['replace_string']); ?>" maxlength="255" placeholder="MyPowerPressSite.com/">
224
+ </div>
225
 
226
+ <div class="pp-row pp-tools-row">
227
+ <input style="margin: 30px 0 30px 0;" type="submit" name="Submit" id="powerpress_save_button" class="powerpress_save_button_other pp-tools-button" value="<?php echo __('FIND AND PREVIEW CHANGES', 'powerpress'); ?>" onclick="jQuery('#replace_step').val('2');"/>
228
+ </div>
229
 
230
+ <?php if($FindReplace['step'] == 2 || $FindReplace['step'] == 3){ ?>
231
+ <hr>
232
+ <div class="pp-row pp-tools-row">
233
+ <h3><?php echo ($FindReplace['step'] == 2 ? __('Preview Changes', 'powerpress') : __('Change Results', 'powerpress')); ?></h3>
234
+ </div>
235
 
236
+ <div class="pp-row pp-tools-row">
237
+ <p class="pp-tools-text"><?php echo sprintf( __('Found %d results with "%s"', 'powerpress'), count($FindReplaceResults), "<span class=\"find_string strong\">". esc_attr($FindReplace['find_string']). "</span>"); ?></p>
238
+ </div>
 
 
239
 
240
+ <ol class="preview-changes-list">
241
+ <?php
242
+ $rowCount = 1;
243
+ foreach($FindReplaceResults as $meta_id=> $row){
244
+ $post_view_link = '<a href="' . get_permalink($row['post_id']) . '" target="_blank">' . get_the_title($row['post_id']) . '</a>';
245
+ $post_edit_link = '<a href="' . get_edit_post_link($row['post_id']) . '" target="_blank">' . __('Edit Post', 'powerpress') . '</a>';
246
+ ?>
247
+ <div class="pp-row pp-tools-row preview-changes-row <?php echo ($rowCount % 2 == 0 ? 'colored-row' : ''); ?>">
248
+ <li style="margin-left: 20px;">
249
+ <?php
250
+ if($FindReplace['step'] == 3){
251
+ echo '<div>';
252
+ powerpressadmin_find_replace_status($row['success']);
253
+ echo ' &nbsp; ';
254
+ if(!empty($row['error'])){
255
+ echo $row['error'];
256
+ }
257
+ echo '</div>';
258
+ }
259
+ ?>
260
+ Post: <strong><?php echo $post_view_link; ?></strong>
261
+ <span style="font-size: 90%;">(<?php echo $post_edit_link; ?>)</span>
262
+ <dl>
263
+ <dt>
264
+ <?php echo __('Found', 'powerpress') .': '. $row['find_readable']; ?>
265
+ </dt>
266
+ <dd>
267
+ <?php echo __('Replace', 'powerpress') .': '. $row['replace_readable']; ?>
268
+ (<a href="<?php echo esc_attr($row['new_url']); ?>" target="_blank"><?php echo __('test link', 'powerpress'); ?></a>)
269
+ </dd>
270
+ </dl>
271
+ </li>
272
+ </div>
273
+ <?php
274
+ $rowCount++;
275
+ } ?>
276
+ </ol>
277
+ <?php } ?>
278
 
279
+ <?php if($FindReplace['step'] == 2 && count($FindReplaceResults) > 0){ ?>
280
+ <div class="pp-row pp-tools-row">
281
+ <input style="margin: 30px 0 30px 0;" type="submit" name="Submit" id="powerpress_save_button" class="powerpress_save_button_other pp-tools-button" value="<?php echo __('COMMIT CHANGES', 'powerpress'); ?>" onclick="return ConfirmReplace()" />
282
+ <input style="margin: 40px 10px 0 20px;" type="checkbox" name="FindReplace[verify]" value="1" <?php if(!empty($FindReplace['verify'])) echo 'checked'; ?> onchange="return VerifyCheck(this)"/>
283
+ <strong style="margin: 38px 10px 0 0;"><?php echo __('Verify URLs', 'powerpress'); ?></strong>
284
+ <p style="margin: 36px 10px 0 0;">(Does not change URL if invalid)</p>
285
+ <a style="margin: 37px 10px 0 10px;" class="pp-page-back-link" href="admin.php?page=powerpress/powerpressadmin_tools.php">CANCEL REPLACEMENT</a>
286
+ </div>
287
+ <?php } elseif ($FindReplace['step'] == 3 || ($FindReplace['step'] == 2 && count($FindReplaceResults) == 0)){ ?>
288
+ <p class="submit">
289
+ <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_tools.php'); ?>"><?php echo __('PowerPress Tools', 'powerpress'); ?></a></strong>
290
+ </p>
291
+ <?php } ?>
292
+
293
+ <div class="pp-row pp-tools-row">
294
+ <p style="margin-bottom: 0;" class="pp-tools-text"><?php echo sprintf( __('We recommend using the %s plugin to backup your database before using this Find and Replace tool.', 'powerpress'), '<a href="http://wordpress.org/extend/plugins/wp-db-backup/" target="_blank">'. __('WP-DB-Backup', 'powerpress') .'</a>' ); ?></p>
295
+ </div>
296
+ </div>
297
+ <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
 
299
+ function powerpressadmin_find_replace_status($success=true){
300
+ $img = 'yes.png';
301
+ $color = '#458045';
302
+ $text = __('Success', 'powerpress');
303
+ if($success == false){ // Failed takes precedence over warning
304
+ $img = 'no.png';
305
+ $color = '#CC0000';
306
+ $text = __('Failed', 'powerpress');
307
+ }
308
+ ?>
309
+
310
+ <img src="<?php echo admin_url(); ?>/images/<?php echo $img; ?>" style="vertical-align:text-top;"/>
311
+ <strong style="color:<?php echo $color; ?>;"><?php echo $text; ?></strong>
312
+ <?php }
 
 
313
 
314
+ function powerpressadmin_find_replace_get_results(){
315
+ global $g_FindReplaceResults;
316
+ if(!is_array($g_FindReplaceResults)){
317
+ return array();
318
+ }
319
+ return $g_FindReplaceResults;
320
+ }
321
+
322
  ?>
powerpressadmin-import-feed.php CHANGED
@@ -1,71 +1,67 @@
1
  <?php
2
 
3
 
4
-
5
- function powerpress_admin_import_feed()
6
- {
7
  // If we have powerpress credentials, check if the account has been verified
8
  $creds = get_option('powerpress_creds');
9
  powerpress_check_credentials($creds);
10
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
11
  ?>
12
- <h2><?php echo __('Import Podcast', 'powerpress'); ?></h2>
13
- <p><?php echo __('Import your podcast including episodes, media files and settings.', 'powerpress'); ?></p>
14
 
15
- <ul><li>
16
- <h4><?php echo __('Import from specific service', 'powerpress'); ?></h4>
17
- <ul>
18
- <li><strong><a href="<?php echo admin_url("admin.php?import=powerpress-soundcloud-rss-podcast"); ?>"><?php echo __('Podcast from SoundCloud', 'powerpress'); ?></a></strong></li>
19
- <li><strong><a href="<?php echo admin_url("admin.php?import=powerpress-libsyn-rss-podcast"); ?>"><?php echo __('Podcast from LibSyn', 'powerpress'); ?></a></strong></li>
20
- <li><strong><a href="<?php echo admin_url("admin.php?import=powerpress-podbean-rss-podcast"); ?>"><?php echo __('Podcast from PodBean', 'powerpress'); ?></a></strong></li>
21
- <li><strong><a href="<?php echo admin_url("admin.php?import=powerpress-squarespace-rss-podcast"); ?>"><?php echo __('Podcast from Squarespace', 'powerpress'); ?></a></strong></li>
22
- <li><strong><a href="<?php echo admin_url("admin.php?import=powerpress-anchor-rss-podcast"); ?>"><?php echo __('Podcast from Anchor.fm', 'powerpress'); ?></a></strong></li>
23
- </ul>
24
- <h4><?php echo __('Import from anywhere else', 'powerpress'); ?></h4>
25
- <ul>
26
- <li><strong><a href="<?php echo admin_url("admin.php?import=powerpress-rss-podcast"); ?>"><?php echo __('Podcast RSS Feed', 'powerpress'); ?></a></strong></li>
27
- </ul>
28
- </li></ul>
29
- <!--
30
- <p><?php echo sprintf(__('Importing your feed does not migrate your media files. Please use the %s tool to migrate your media once your feed is imported.', 'powerpress'), '<strong><a href="'.admin_url('admin.php?page=powerpress/powerpressadmin_migrate.php') .'">'. __('Migrate Media', 'powerpress') .'</a></strong>'); ?></p> -->
31
- <br />
32
 
33
- <h2><?php echo __('Migrate Media to your Blubrry Podcast Media Hosting Account', 'powerpress'); ?></h2>
34
- <dl>
35
- <dt><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_migrate.php"); ?>"><?php echo __('Migrate Media', 'powerpress'); ?></a></strong></dt>
36
- <dd><?php echo __('Migrate all of your media with only a few clicks.', 'powerpress'); ?></dd>
37
- </dl>
38
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
- <h2><?php echo __('Import settings from another plugin', 'powerpress'); ?></h2>
41
- <dl>
42
- <dt><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podpress-settings", 'powerpress-podpress-settings'); ?>"
43
- onclick="return confirm('<?php echo __('Import PodPress settings, are you sure?\n\nExisting PowerPress settings will be overwritten.', 'powerpress'); ?>');"><?php echo __('Import PodPress Settings', 'powerpress'); ?></a></strong></dt>
44
- <dd><?php echo __('Import settings from PodPress into PowerPress.', 'powerpress'); ?></dd>
45
-
46
- <dt><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podcasting-settings", 'powerpress-podcasting-settings'); ?>"
47
- onclick="return confirm('<?php echo __('Import Podcasting plugin settings, are you sure?', 'powerpress') .'\n\n'. __('Existing PowerPress settings will be overwritten.', 'powerpress'); ?>');"><?php echo htmlspecialchars(__('Import TSG\'s Podcasting Plugin Settings', 'powerpress')); ?></a></strong></dt>
48
- <dd><?php echo esc_html(__('Import settings from the plugin "Podcasting Plugin by TSG" into PowerPress.', 'powerpress')); ?></dd>
49
- </dl>
50
- <br />
51
 
52
- <h2><?php echo __('Import Episodes from another plugin', 'powerpress'); ?></h2>
53
- <dl>
54
- <dt><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podpress-epiosdes"); ?>"><?php echo __('Import PodPress Episodes', 'powerpress'); ?></a></strong></dt>
55
- <dd><?php echo __('Import PodPress created episodes to PowerPress.', 'powerpress'); ?></dd>
56
-
57
- <dt><strong><?php echo __('Podcasting Plugin by TSG', 'powerpress'); ?></strong></dt>
58
- <dd><?php echo esc_html(__('Note: Episodes created using the plugin "Podcasting Plugin by TSG" do not require importing.', 'powerpress')); ?></dd>
59
- </dl>
60
- <br />
61
 
62
- <h2><?php echo __('Import Episodes from previous feed import', 'powerpress'); ?></h2>
63
- <dl>
64
- <dt><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-mt-epiosdes"); ?>"><?php echo __('Import from other Blogging Platform', 'powerpress'); ?></a></strong> <?php echo __('(media linked in blog posts)', 'powerpress'); ?></dt>
65
- <dd><?php echo __('Import from podcast episodes from blogging platforms such as Movable Type/Blogger/Joomla/TypePad (and most other blogging systems) to PowerPress.', 'powerpress'); ?></dd>
66
- </dl>
67
- <br />
68
- <?php
69
- }
70
 
71
  // eof
1
  <?php
2
 
3
 
4
+ function powerpress_admin_import_feed(){
 
 
5
  // If we have powerpress credentials, check if the account has been verified
6
  $creds = get_option('powerpress_creds');
7
  powerpress_check_credentials($creds);
8
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
9
  ?>
 
 
10
 
11
+ <div class="pp-card-body">
12
+ <div class="pp-row pp-tools-row">
13
+ <h2 class="pp-page-sub-header">Import Podcast</h2>
14
+ </div>
15
+ <div class="pp-row pp-tools-row">
16
+ <p class="pp-tools-text" style="margin-bottom: 10px;">Import your podcast including episodes, media files and settings.</p>
17
+ </div>
 
 
 
 
 
 
 
 
 
 
18
 
19
+ <div class="pp-row pp-tools-row">
20
+ <h3>Hosting platforms</h3>
21
+ </div>
22
+ <div class="pp-row pp-tools-row" style="margin-bottom: 40px;">
23
+ <a class="hosting-platform-button" href="<?php echo admin_url("admin.php?import=powerpress-soundcloud-rss-podcast"); ?>">
24
+ <img src="<?php echo powerpress_get_root_url(); ?>images/soundcloud.png" class="hosting-platform-img" alt="<?php echo __('SoundCloud', 'powerpress'); ?>"/>
25
+ <p class="hosting-platform-text">SoundCloud</p>
26
+ </a>
27
+ <a class="hosting-platform-button" href="<?php echo admin_url("admin.php?import=powerpress-libsyn-rss-podcast"); ?>">
28
+ <img style="width: 32%;" src="<?php echo powerpress_get_root_url(); ?>images/libsyn.png" class="hosting-platform-img" alt="<?php echo __('Libsyn', 'powerpress'); ?>"/>
29
+ <p class="hosting-platform-text">LibSyn</p>
30
+ </a>
31
+ <a class="hosting-platform-button" href="<?php echo admin_url("admin.php?import=powerpress-podbean-rss-podcast"); ?>">
32
+ <img style="width: 29%;" src="<?php echo powerpress_get_root_url(); ?>images/podbean.png" class="hosting-platform-img" alt="<?php echo __('PodBean', 'powerpress'); ?>"/>
33
+ <p class="hosting-platform-text">PodBean</p>
34
+ </a>
35
+ <a class="hosting-platform-button" href="<?php echo admin_url("admin.php?import=powerpress-squarespace-rss-podcast"); ?>">
36
+ <img src="<?php echo powerpress_get_root_url(); ?>images/squarespace.png" class="hosting-platform-img" alt="<?php echo __('Squarespace', 'powerpress'); ?>"/>
37
+ <p class="hosting-platform-text">Squarespace</p>
38
+ </a>
39
+ <a class="hosting-platform-button" href="<?php echo admin_url("admin.php?import=powerpress-anchor-rss-podcast"); ?>">
40
+ <img style="width: 31%;" src="<?php echo powerpress_get_root_url(); ?>images/anchor.png" class="hosting-platform-img" alt="<?php echo __('Anchor', 'powerpress'); ?>"/>
41
+ <p class="hosting-platform-text">Anchor</p>
42
+ </a>
43
+ <a class="hosting-platform-button" href="<?php echo admin_url("admin.php?import=powerpress-buzzsprout-rss-podcast"); ?>">
44
+ <img style="width: 31%;" src="<?php echo powerpress_get_root_url(); ?>images/buzzsprout.png" class="hosting-platform-img" alt="<?php echo __('Buzzsprout', 'powerpress'); ?>"/>
45
+ <p class="hosting-platform-text">Buzzsprout</p>
46
+ </a>
47
+ <a class="hosting-platform-button" href="<?php echo admin_url("admin.php?import=powerpress-rss-podcast"); ?>">
48
+ <img style="width: 23%;" src="<?php echo powerpress_get_root_url(); ?>images/rss.png" class="hosting-platform-img" alt="<?php echo __('Anywhere else', 'powerpress'); ?>"/>
49
+ <p class="hosting-platform-text">Anywhere else</p>
50
+ </a>
51
+ </div>
52
 
53
+ <div class="pp-row pp-tools-row">
54
+ <h3 style="margin-bottom: 10px;">Migrate Podcast Media</h3>
55
+ </div>
 
 
 
 
 
 
 
 
56
 
57
+ <div class="pp-row pp-tools-row">
58
+ <p class="pp-tools-text">Migrate Media to your Blubrry Podcast Media Hosting Account.</p>
59
+ </div>
 
 
 
 
 
 
60
 
61
+ <div class="pp-row pp-tools-row">
62
+ <a style="margin: 0 0 30px 0;" class="powerpress_save_button_other pp-tools-button" href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_migrate.php"); ?>"><?php echo __('MIGRATE MEDIA', 'powerpress'); ?></a>
63
+ </div>
64
+ </div>
65
+ <?php }
 
 
 
66
 
67
  // eof
powerpressadmin-posttypefeeds.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
 
3
- if( !function_exists('add_action') )
4
- die("access denied.");
5
-
6
- function powerpress_admin_posttypefeeds_columns($data=array())
7
- {
8
  $data['name'] = __('Feed Title', 'powerpress');
9
  $data['post-type'] = __('Post Type', 'powerpress');
10
  $data['feed-slug'] = __('Slug', 'powerpress');
@@ -14,8 +14,7 @@ function powerpress_admin_posttypefeeds_columns($data=array())
14
 
15
  add_filter('manage_powerpressadmin_posttypefeeds_columns', 'powerpress_admin_posttypefeeds_columns');
16
 
17
- function powerpress_admin_posttypefeeds()
18
- {
19
  $General = powerpress_get_settings('powerpress_general');
20
  $post_types = powerpress_admin_get_post_types(false);
21
 
@@ -23,213 +22,193 @@ function powerpress_admin_posttypefeeds()
23
  $creds = get_option('powerpress_creds');
24
  powerpress_check_credentials($creds);
25
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
26
- ?>
27
- <h2><?php echo __('Post Type Podcasting', 'powerpress'); ?></h2>
28
- <p>
29
- <?php echo __('Post Type Podcasting adds custom podcast settings to specific Post Type feeds.', 'powerpress'); ?>
30
- </p>
31
- <style type="text/css">
32
- .column-url {
33
- width: 40%;
34
- }
35
- .column-name {
36
- width: 30%;
37
- }
38
- .column-feed-slug {
39
- width: 15%;
40
- }
41
- .column-post-type {
42
- width: 15%;
43
- }
44
- .column-episode-count {
45
- width: 15%;
46
- }
47
- .category-list {
48
- width: 100%;
49
- }
50
- .form-field select {
51
- width: 95%;
52
- }
53
- </style>
54
- <div id="col-container">
55
-
56
- <div id="col-right">
57
- <table class="widefat fixed" cellspacing="0">
58
- <thead>
59
- <tr>
60
- <?php
61
- print_column_headers('powerpressadmin_posttypefeeds');
62
- ?>
63
- </tr>
64
- </thead>
65
-
66
- <tfoot>
67
- <tr>
68
- <?php
69
- print_column_headers('powerpressadmin_posttypefeeds', false);
70
- ?>
71
- </tr>
72
- </tfoot>
73
- <tbody>
74
- <?php
75
-
76
- $count = 0;
77
- foreach( $post_types as $null => $post_type )
78
- {
79
- $PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type );
80
- if( !$PostTypeSettingsArray )
81
- continue;
82
-
83
- foreach( $PostTypeSettingsArray as $feed_slug => $PostTypeSettings )
84
- {
85
- $feed_title = ( !empty($PostTypeSettings['title']) ? $PostTypeSettings['title'] : '(blank)');
86
- // $post_type
87
- // $feed_slug
88
-
89
-
90
- //global $wpdb;
91
-
92
- // var_dump($term_info);
93
-
94
- //$category = get_category_to_edit($cat_ID);
95
-
96
-
97
- $columns = powerpress_admin_posttypefeeds_columns();
98
- $hidden = array();
99
-
100
- if( $count % 2 == 0 )
101
- echo '<tr valign="middle" class="alternate">';
102
- else
103
- echo '<tr valign="middle">';
104
-
105
- $edit_link = admin_url('admin.php?page='. powerpress_admin_get_page() .'&amp;action=powerpress-editposttypefeed&amp;feed_slug='. $feed_slug .'&podcast_post_type='.$post_type) ;
106
-
107
- $url = get_post_type_archive_feed_link($post_type, $feed_slug);
108
- if( empty($url) ) {
109
- $url = '';
110
- $short_url = '';
111
- } else {
112
- $short_url = str_replace('http://', '', $url);
113
- $short_url = str_replace('www.', '', $short_url);
114
- if (strlen($short_url) > 35)
115
- $short_url = substr($short_url, 0, 32).'...';
116
- }
117
- foreach($columns as $column_name=>$column_display_name) {
118
- $class = "class=\"column-$column_name\"";
119
-
120
- switch($column_name) {
121
- case 'feed-slug': {
122
-
123
- echo "<td $class>{$feed_slug}";
124
- echo "</td>";
125
-
126
- }; break;
127
- case 'name': {
128
-
129
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.esc_attr($feed_title).'</a></strong><br />';
130
- $actions = array();
131
- $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
132
- $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=". powerpress_admin_get_page() ."&amp;action=powerpress-delete-posttype-feed&amp;podcast_post_type={$post_type}&amp;feed_slug={$feed_slug}", 'powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for Post Type '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
133
- $action_count = count($actions);
134
- $i = 0;
135
- echo '<div class="row-actions">';
136
- foreach ( $actions as $action => $linkaction ) {
137
- ++$i;
138
- ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
139
- echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
140
- }
141
- echo '</div>';
142
- echo '</td>';
143
-
144
- }; break;
145
-
146
- case 'url': {
147
-
148
- echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
149
- echo '<div class="row-actions">';
150
- if( defined('POWERPRESS_FEEDVALIDATOR_URL') ) { // http://www.feedvalidator.org/check.cgi?url=
151
- echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
152
- }
153
- echo '</div>';
154
- echo "</td>";
155
-
156
- }; break;
157
-
158
- case 'episode-count': {
159
-
160
- echo "<td $class>$episode_total";
161
- echo "</td>";
162
-
163
- }; break;
164
- case 'post-type': {
165
- echo "<td $class>$post_type";
166
- echo "</td>";
167
- }; break;
168
- default: {
169
-
170
- }; break;
171
- }
172
- }
173
- echo "\n </tr>\n";
174
- $count++;
175
- }
176
- }
177
- ?>
178
- </tbody>
179
- </table>
180
- </div> <!-- col-right -->
181
-
182
- <div id="col-left">
183
- <div class="col-wrap">
184
- <div class="form-wrap">
185
- <h3><?php echo __('Add Podcasting to a custom Post Type', 'powerpress'); ?></h3>
186
- <input type="hidden" name="action" value="powerpress-addposttypefeed" />
187
-
188
-
189
- <div class="form-field form-required">
190
- <label for="powerpress_post_type_select"><?php echo __('Post Type', 'powerpress'); ?></label>
191
- <select id="powerpress_post_type_select" name="podcast_post_type" style="width: 95%;">
192
- <option value=""><?php echo __('Select Post Type', 'powerpress'); ?></option>
193
- <?php
194
-
195
-
196
-
197
- reset($post_types);
198
- foreach( $post_types as $null => $post_type ) {
199
- if( $post_type == 'post' )
200
- continue;
201
-
202
- $post_type = htmlspecialchars($post_type);
203
-
204
- echo "\t<option value=\"$post_type\">$post_type</option>\n";
205
- }
206
- ?>
207
- </select>
208
- </div>
209
-
210
- <div class="form-field form-required">
211
- <label for="feed_title"><?php echo __('Feed Title', 'powerpress') ?></label>
212
- <input name="feed_title" id="feed_title" type="text" value="" size="100" />
213
- </div>
214
-
215
- <div class="form-field">
216
- <label for="feed_slug"><?php echo __('Feed Slug', 'powerpress') ?></label>
217
- <input name="feed_slug" id="feed_slug" type="text" value="" size="40" />
218
- <p><?php echo __('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'powerpress'); ?></p>
219
- </div>
220
- <?php
221
- wp_nonce_field('powerpress-add-posttype-feed');
222
- ?>
223
- <p class="submit"><input type="submit" class="button" name="add_podcasting" value="<?php echo __('Add Podcasting to Post Type', 'powerpress'); ?>" /> </p>
224
-
225
-
226
- </div>
227
- </div>
228
-
229
- </div> <!-- col-left -->
230
-
231
- </div> <!-- col-container -->
232
-
233
- <?php
234
- }
235
- ?>
1
  <?php
2
 
3
+ if(!function_exists('add_action')){
4
+ die("access denied.");
5
+ }
6
+
7
+ function powerpress_admin_posttypefeeds_columns($data=array()){
8
  $data['name'] = __('Feed Title', 'powerpress');
9
  $data['post-type'] = __('Post Type', 'powerpress');
10
  $data['feed-slug'] = __('Slug', 'powerpress');
14
 
15
  add_filter('manage_powerpressadmin_posttypefeeds_columns', 'powerpress_admin_posttypefeeds_columns');
16
 
17
+ function powerpress_admin_posttypefeeds(){
 
18
  $General = powerpress_get_settings('powerpress_general');
19
  $post_types = powerpress_admin_get_post_types(false);
20
 
22
  $creds = get_option('powerpress_creds');
23
  powerpress_check_credentials($creds);
24
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
25
+ ?>
26
+
27
+ <h2 class="pp-page-header"><?php echo __('Post Type Podcasting', 'powerpress'); ?></h2>
28
+ <h3 class="pp-page-h3"><?php echo __('Post Type Podcasting adds custom podcast settings to specific Post Type feeds.', 'powerpress'); ?></h3>
29
+
30
+ <div class="pp-card-body">
31
+ <div class="pp-row pp-tools-row">
32
+ <div class="pp-col-50">
33
+ <div class="pp-row">
34
+ <h2 class="pp-page-sub-header">Add Podcasting to a custom Post Type</h2>
35
+ </div>
36
+
37
+ <h3><label for="powerpress_post_type_select"><?php echo __('Post Type', 'powerpress'); ?></label></h3>
38
+ <select id="powerpress_post_type_select" name="podcast_post_type" style="width: 95%;">
39
+ <option value=""><?php echo __('Select Post Type', 'powerpress'); ?></option>
40
+ <?php
41
+ reset($post_types);
42
+ foreach($post_types as $null => $post_type){
43
+ if($post_type == 'post'){
44
+ continue;
45
+ }
46
+ $post_type = htmlspecialchars($post_type);
47
+ echo "\t<option value=\"$post_type\">$post_type</option>\n";
48
+ }
49
+ ?>
50
+ </select>
51
+
52
+
53
+ <div class="form-field form-required">
54
+ <h3><label for="feed_title"><?php echo __('Feed Title', 'powerpress') ?></label></h3>
55
+ <input name="feed_title" id="feed_title" type="text" value="" size="100"/>
56
+ </div>
57
+
58
+ <div class="form-field">
59
+ <h3><label for="feed_slug"><?php echo __('Feed Slug', 'powerpress') ?></label></h3>
60
+ <input name="feed_slug" id="feed_slug" type="text" value="" size="40"/>
61
+ <p><?php echo __('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'powerpress'); ?></p>
62
+ </div>
63
+
64
+ </div>
65
+ <div class="pp-col-50">
66
+ <div class="pp-row">
67
+ <h2 class="pp-page-sub-header">Why would I use Post Type?</h2>
68
+ </div>
69
+
70
+ <ul style="list-style: unset; padding-left: 20px;">
71
+ <li>
72
+ <h3 style="font-weight: 400;">You have a podcast that covers two topics that sometimes share same posts and sometimes do not. Use your main podcast feed as a combined feed of both topics and use category feeds to distribute topic specific episodes.</h3>
73
+ </li>
74
+ <li>
75
+ <h3 style="font-weight: 400;">You want to use categories to keep episodes separate from each other. Each category can be used to distribute separate podcasts with the main podcast feed combining all categories to provide a network feed</h3>
76
+ </li>
77
+ </ul>
78
+ </div>
79
+ </div>
80
+
81
+ <div class="pp-row pp-tools-row">
82
+ <p class="submit"><input type="submit" class="powerpress_save_button_other" name="add_podcasting" value="<?php echo __('Add Podcasting to Post Type', 'powerpress'); ?>" /> </p>
83
+ </div>
84
+
85
+ <hr>
86
+
87
+ <div class="pp-row pp-tools-row" style="margin-top: 20px;">
88
+ <div class="pp-row">
89
+ <h2 class="pp-page-sub-header">List of Post Type Feeds</h2>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="pp-row pp-tools-row" style="margin-top: 20px;">
94
+ <table class="widefat fixed">
95
+ <thead>
96
+ <tr>
97
+ <?php print_column_headers('powerpressadmin_posttypefeeds'); ?>
98
+ </tr>
99
+ </thead>
100
+
101
+ <tfoot>
102
+ <tr>
103
+ <?php print_column_headers('powerpressadmin_posttypefeeds', false); ?>
104
+ </tr>
105
+ </tfoot>
106
+
107
+ <tbody>
108
+ <?php
109
+
110
+ $count = 0;
111
+ foreach($post_types as $null => $post_type){
112
+ $PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type );
113
+ if(!$PostTypeSettingsArray){
114
+ continue;
115
+ }
116
+
117
+ foreach($PostTypeSettingsArray as $feed_slug => $PostTypeSettings){
118
+ $feed_title = (!empty($PostTypeSettings['title']) ? $PostTypeSettings['title'] : '(blank)');
119
+
120
+ $columns = powerpress_admin_posttypefeeds_columns();
121
+ $hidden = array();
122
+
123
+ if($count % 2 == 0){
124
+ echo '<tr class="alternate">';
125
+ } else {
126
+ echo '<tr>';
127
+ }
128
+
129
+ $edit_link = admin_url('admin.php?page='. powerpress_admin_get_page() .'&amp;action=powerpress-editposttypefeed&amp;feed_slug='. $feed_slug .'&podcast_post_type='.$post_type) ;
130
+
131
+ $url = get_post_type_archive_feed_link($post_type, $feed_slug);
132
+ if(empty($url)){
133
+ $url = '';
134
+ $short_url = '';
135
+ } else {
136
+ $short_url = str_replace('http://', '', $url);
137
+ $short_url = str_replace('www.', '', $short_url);
138
+ if(strlen($short_url) > 35){
139
+ $short_url = substr($short_url, 0, 32).'...';
140
+ }
141
+ }
142
+
143
+ foreach($columns as $column_name=>$column_display_name) {
144
+ $class = "class=\"column-$column_name\"";
145
+
146
+ switch($column_name) {
147
+ case 'feed-slug': {
148
+ echo "<td $class>{$feed_slug}";
149
+ echo "</td>";
150
+
151
+ } break;
152
+ case 'name': {
153
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.esc_attr($feed_title).'</a></strong><br />';
154
+ $actions = array();
155
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
156
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=". powerpress_admin_get_page() ."&amp;action=powerpress-delete-posttype-feed&amp;podcast_post_type={$post_type}&amp;feed_slug={$feed_slug}", 'powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for Post Type '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
157
+ $action_count = count($actions);
158
+ $i = 0;
159
+ echo '<div class="row-actions">';
160
+ foreach($actions as $action => $linkaction){
161
+ ++$i;
162
+ ($i == $action_count) ? $sep = '' : $sep = ' | ';
163
+ echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
164
+ }
165
+ echo '</div>';
166
+ echo '</td>';
167
+
168
+ } break;
169
+
170
+ case 'url': {
171
+ echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
172
+ echo '<div class="row-actions">';
173
+ if(defined('POWERPRESS_FEEDVALIDATOR_URL')){ // http://www.feedvalidator.org/check.cgi?url=
174
+ echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
175
+ }
176
+ echo '</div>';
177
+ echo "</td>";
178
+
179
+ } break;
180
+
181
+ case 'episode-count': {
182
+ echo "<td $class>$episode_total";
183
+ echo "</td>";
184
+
185
+ } break;
186
+
187
+ case 'post-type': {
188
+ echo "<td $class>$post_type";
189
+ echo "</td>";
190
+ } break;
191
+
192
+ default: {
193
+
194
+ } break;
195
+ }
196
+ }
197
+
198
+ echo "\n </tr>\n";
199
+ $count++;
200
+ }
201
+ }
202
+ ?>
203
+ </tbody>
204
+ </table>
205
+ </div>
206
+ </div>
207
+
208
+ <style>
209
+ .pp-col-50 {
210
+ width: 50%;
211
+ }
212
+ </style>
213
+
214
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
powerpressadmin-rss-import.php CHANGED
@@ -90,6 +90,8 @@ class PowerPress_RSS_Podcast_Import extends WP_Importer {
90
  case 'powerpress-podbean-rss-podcast': echo '<h2 class="pp_align-center">'.__('Import Podcast from PodBean', 'powerpress').'</h2>'; break;
91
  case 'powerpress-squarespace-rss-podcast': echo '<h2 class="pp_align-center">'.__('Import Podcast from Squarespace', 'powerpress').'</h2>'; break;
92
  case 'powerpress-anchor-rss-podcast': echo '<h2 class="pp_align-center">'.__('Import Podcast from Anchor.fm', 'powerpress').'</h2>'; break;
 
 
93
  case 'powerpress-rss-podcast':
94
  default: echo '<h2 class="pp_align-center">'.__('Import Podcast RSS Feed', 'powerpress').'</h2>'; break;
95
  }
@@ -1764,6 +1766,7 @@ jQuery(document).ready( function() {
1764
  register_importer('powerpress-podbean-rss-podcast', __('Podcast from PodBean ', 'powerpress'), __('Import episodes from a PodBean podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1765
  register_importer('powerpress-squarespace-rss-podcast', __('Podcast from Squarespace', 'powerpress'), __('Import episodes from a Squarespace podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1766
  register_importer('powerpress-anchor-rss-podcast', __('Podcast from Anchor.fm', 'powerpress'), __('Import episodes from an Anchor.fm podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
 
1767
  register_importer('powerpress-rss-podcast', __('Podcast RSS Feed', 'powerpress'), __('Import episodes from a RSS podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1768
 
1769
  }; // end if WP_Importer exists
90
  case 'powerpress-podbean-rss-podcast': echo '<h2 class="pp_align-center">'.__('Import Podcast from PodBean', 'powerpress').'</h2>'; break;
91
  case 'powerpress-squarespace-rss-podcast': echo '<h2 class="pp_align-center">'.__('Import Podcast from Squarespace', 'powerpress').'</h2>'; break;
92
  case 'powerpress-anchor-rss-podcast': echo '<h2 class="pp_align-center">'.__('Import Podcast from Anchor.fm', 'powerpress').'</h2>'; break;
93
+ case 'powerpress-buzzsprout-rss-podcast': echo '<h2 class="pp_align-center">'.__('Import Podcast from Buzzsprout', 'powerpress').'</h2>'; break;
94
+
95
  case 'powerpress-rss-podcast':
96
  default: echo '<h2 class="pp_align-center">'.__('Import Podcast RSS Feed', 'powerpress').'</h2>'; break;
97
  }
1766
  register_importer('powerpress-podbean-rss-podcast', __('Podcast from PodBean ', 'powerpress'), __('Import episodes from a PodBean podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1767
  register_importer('powerpress-squarespace-rss-podcast', __('Podcast from Squarespace', 'powerpress'), __('Import episodes from a Squarespace podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1768
  register_importer('powerpress-anchor-rss-podcast', __('Podcast from Anchor.fm', 'powerpress'), __('Import episodes from an Anchor.fm podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1769
+ register_importer('powerpress-buzzsprout-rss-podcast', __('Podcast from Buzzsprout', 'powerpress'), __('Import episodes from a Buzzsprout podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1770
  register_importer('powerpress-rss-podcast', __('Podcast RSS Feed', 'powerpress'), __('Import episodes from a RSS podcast feed.', 'powerpress'), array ($powerpress_rss_podcast_import, 'dispatch'));
1771
 
1772
  }; // end if WP_Importer exists
powerpressadmin-stats-widget.class.php CHANGED
@@ -365,6 +365,9 @@ class PowerPressStatsWidget
365
  let scale_container = document.getElementById("blubrry-stats-chart-scale");
366
  let new_node;
367
  <?php
 
 
 
368
  $numLines = ($this->content['scale_max'] - $this->content['scale_min']) / $this->content['scale_step'];
369
  for ($x = 0; $x < $numLines; $x++) { ?>
370
  new_node = document.createElement("div");
365
  let scale_container = document.getElementById("blubrry-stats-chart-scale");
366
  let new_node;
367
  <?php
368
+ if(!$this->content['scale_step'] || $this->content['scale_step'] == 0){
369
+ $this->content['scale_step'] = 1;
370
+ }
371
  $numLines = ($this->content['scale_max'] - $this->content['scale_min']) / $this->content['scale_step'];
372
  for ($x = 0; $x < $numLines; $x++) { ?>
373
  new_node = document.createElement("div");
powerpressadmin-taxonomyfeeds.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
 
3
- if( !function_exists('add_action') )
4
- die("access denied.");
5
-
6
- function powerpress_admin_taxonomyfeeds_columns($data=array())
7
- {
8
  $data['name'] = __('Term Name', 'powerpress');
9
  $data['taxonomy'] = __('Taxonomy', 'powerpress');
10
  $data['feed-slug'] = __('Slug', 'powerpress');
@@ -14,247 +14,227 @@ function powerpress_admin_taxonomyfeeds_columns($data=array())
14
 
15
  add_filter('manage_powerpressadmin_taxonomyfeeds_columns', 'powerpress_admin_taxonomyfeeds_columns');
16
 
17
- function powerpress_admin_taxonomyfeeds()
18
- {
19
  $General = powerpress_get_settings('powerpress_general');
20
 
21
  // If we have powerpress credentials, check if the account has been verified
22
  $creds = get_option('powerpress_creds');
23
  powerpress_check_credentials($creds);
24
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
25
- ?>
26
- <h2><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></h2>
27
- <p>
28
- <?php echo __('Taxonomy Podcasting adds custom podcast settings to specific taxonomy feeds.', 'powerpress'); ?>
29
- </p>
30
- <style type="text/css">
31
- .column-url {
32
- width: 40%;
33
- }
34
- .column-name {
35
- width: 30%;
36
- min-width: 60px;
37
- }
38
- .column-taxonomy {
39
- width: 15%;
40
- min-width: 60px;
41
- }
42
- .column-feed-slug {
43
- width: 15%;
44
- min-width: 60px;
45
- }
46
- .column-episode-count {
47
- width: 15%;
48
- }
49
- .category-list {
50
- width: 100%;
51
- }
52
- .form-field select {
53
- width: 95%;
54
- }
55
- </style>
56
- <div id="col-container">
57
-
58
- <div id="col-right">
59
- <table class="widefat fixed" cellspacing="0">
60
- <thead>
61
- <tr>
62
- <?php
63
- print_column_headers('powerpressadmin_taxonomyfeeds');
64
- ?>
65
- </tr>
66
- </thead>
67
-
68
- <tfoot>
69
- <tr>
70
- <?php
71
- print_column_headers('powerpressadmin_taxonomyfeeds', false);
72
- ?>
73
- </tr>
74
- </tfoot>
75
- <tbody>
76
- <?php
77
-
78
- $PowerPressTaxonomies = get_option('powerpress_taxonomy_podcasting');
79
- if( empty($PowerPressTaxonomies) )
80
- $PowerPressTaxonomies = array();
81
-
82
-
83
- $count = 0;
84
- foreach( $PowerPressTaxonomies as $tt_id => $null )
85
- {
86
- $taxonomy_type = '';
87
- $term_ID = '';
88
-
89
- global $wpdb;
90
- $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = $tt_id", ARRAY_A);
91
- if( !empty( $term_info[0]['term_id']) ) {
92
- $term_ID = $term_info[0]['term_id'];
93
- $taxonomy_type = $term_info[0]['taxonomy'];
94
- }
95
- else
96
- {
97
- continue; // we didn't find this taxonomy relationship
98
- }
99
- // var_dump($term_info);
100
-
101
- //$category = get_category_to_edit($cat_ID);
102
- $term_object = get_term( $term_ID, $taxonomy_type, OBJECT, 'edit');
103
- if( is_wp_error($term_object) )
104
- continue;
105
-
106
- $columns = powerpress_admin_taxonomyfeeds_columns();
107
- $hidden = array();
108
-
109
- if( $count % 2 == 0 )
110
- echo '<tr valign="middle" class="alternate">';
111
- else
112
- echo '<tr valign="middle">';
113
-
114
- $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-edittaxonomyfeed&amp;term='. $term_ID .'&taxonomy='.$taxonomy_type.'&amp;ttid='.$tt_id) ;
115
-
116
- $feed_title = $term_object->name;
117
- $url = get_term_feed_link($term_ID, $taxonomy_type, 'rss2');
118
- $short_url = str_replace('http://', '', $url);
119
- $short_url = str_replace('www.', '', $short_url);
120
- if (strlen($short_url) > 35)
121
- $short_url = substr($short_url, 0, 32).'...';
122
-
123
- foreach($columns as $column_name=>$column_display_name) {
124
- $class = "class=\"column-$column_name\"";
125
-
126
-
127
-
128
- //$short_url = '';
129
-
130
- switch($column_name) {
131
- case 'feed-slug': {
132
-
133
- echo "<td $class>{$term_object->slug}";
134
- echo "</td>";
135
-
136
- }; break;
137
- case 'name': {
138
-
139
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_attr($feed_title).'</a></strong><br />';
140
- $actions = array();
141
- $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
142
- $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-delete-taxonomy-feed&amp;ttid=$tt_id", 'powerpress-delete-taxonomy-feed-' . $tt_id) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for taxonomy '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
143
- $action_count = count($actions);
144
- $i = 0;
145
- echo '<div class="row-actions">';
146
- foreach ( $actions as $action => $linkaction ) {
147
- ++$i;
148
- ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
149
- echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
150
- }
151
- echo '</div>';
152
- echo '</td>';
153
-
154
- }; break;
155
-
156
- case 'url': {
157
-
158
- echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
159
- echo '<div class="row-actions">';
160
- if( defined('POWERPRESS_FEEDVALIDATOR_URL') ) {
161
- echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
162
- }
163
- echo '</div>';
164
- echo "</td>";
165
-
166
- }; break;
167
-
168
- case 'episode-count': {
169
-
170
- echo "<td $class>$episode_total";
171
- echo "</td>";
172
-
173
- }; break;
174
- case 'taxonomy': {
175
- echo "<td $class>$taxonomy_type";
176
- echo "</td>";
177
- }; break;
178
- default: {
179
-
180
- }; break;
181
- }
182
- }
183
- echo "\n </tr>\n";
184
- $count++;
185
- }
186
- ?>
187
- </tbody>
188
- </table>
189
- </div> <!-- col-right -->
190
-
191
- <div id="col-left">
192
- <div class="col-wrap">
193
- <div class="form-wrap">
194
- <h3><?php echo __('Add Podcasting to Existing Taxonomy Term', 'powerpress'); ?></h3>
195
- <?php
196
- $current_taxonomy = (isset($_GET['taxonomy'])?$_GET['taxonomy']: (isset($_POST['taxonomy'])?$_POST['taxonomy']:'') );
197
- if( empty($current_taxonomy) )
198
- {
199
- ?>
200
- <div class="form-field form-required">
201
- <label><?php echo __('Step 1 - Select Taxonomy', 'powerpress'); ?></label>
202
- <select id="powerpress_taxonomy_select" name="taxonomy" style="width: 95%;">
203
- <option value=""><?php echo __('Select Taxonomy', ''); ?></option>
204
- <?php
205
- $taxonomies=get_taxonomies('','names');
206
-
207
-
208
- foreach( $taxonomies as $null => $taxonomy ) {
209
- if( $taxonomy == 'category' )
210
- continue;
211
- $taxonomy = htmlspecialchars($taxonomy);
212
-
213
- echo "\t<option value=\"$taxonomy\"". ($current_taxonomy==$taxonomy?' selected':''). ">$taxonomy</option>\n";
214
- }
215
- ?>
216
-
217
- <?php
218
-
219
- ?>
220
- </select>
221
- </div>
222
- <p class="submit"><input type="submit" class="button" name="select_taxonomy" value="<?php echo __('Select Taxonomy Term', 'powerpress'); ?>" /></p>
223
-
224
- <?php
225
- }
226
- if( !empty($current_taxonomy) )
227
- {
228
- ?>
229
- <input type="hidden" name="action" value="powerpress-addtaxonomyfeed" />
230
- <input type="hidden" name="taxonomy" value="<?php echo esc_attr($current_taxonomy); ?>" />
231
- <?php
232
- //wp_original_referer_field(true, 'previous');
233
- wp_nonce_field('powerpress-add-taxonomy-feed');
234
- ?>
235
- <div class="form-field form-required">
236
- <label for="term"><?php echo __('Step 2 - Select Taxonomy Term', 'powerpress'); ?></label>
237
- <?php
238
-
239
- wp_dropdown_categories( array('class'=>'', 'show_option_none'=>__('Select Term', 'powerpress'), 'orderby'=>'name', 'hide_empty'=>0, 'hierarchical'=>1, 'name'=>'term', 'id'=>'term_id', 'taxonomy'=>$current_taxonomy ) );
240
- ?>
241
- </div>
242
-
243
- <p class="submit">
244
- <input type="submit" class="button" name="add_podcasting" value="<?php echo __('Add Podcast Settings to Term', 'powerpress'); ?>" /> &nbsp;
245
- <input type="submit" class="button" name="cancel" value="<?php echo __('Cancel', 'powerpress'); ?>" />
246
- </p>
247
- <?php
248
- }
249
- ?>
250
-
251
- </div>
252
- </div>
253
-
254
- </div> <!-- col-left -->
255
-
256
- </div> <!-- col-container -->
257
-
258
- <?php
259
- }
260
- ?>
1
  <?php
2
 
3
+ if(!function_exists('add_action')){
4
+ die("access denied.");
5
+ }
6
+
7
+ function powerpress_admin_taxonomyfeeds_columns($data=array()){
8
  $data['name'] = __('Term Name', 'powerpress');
9
  $data['taxonomy'] = __('Taxonomy', 'powerpress');
10
  $data['feed-slug'] = __('Slug', 'powerpress');
14
 
15
  add_filter('manage_powerpressadmin_taxonomyfeeds_columns', 'powerpress_admin_taxonomyfeeds_columns');
16
 
17
+ function powerpress_admin_taxonomyfeeds(){
 
18
  $General = powerpress_get_settings('powerpress_general');
19
 
20
  // If we have powerpress credentials, check if the account has been verified
21
  $creds = get_option('powerpress_creds');
22
  powerpress_check_credentials($creds);
23
  wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
24
+ ?>
25
+
26
+ <h2 class="pp-page-header"><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></h2>
27
+ <h3 class="pp-page-h3"><?php echo __('Taxonomy Podcasting adds custom podcast settings to specific taxonomy feeds.', 'powerpress'); ?></h3>
28
+
29
+ <div class="pp-card-body">
30
+ <div class="pp-row pp-tools-row">
31
+ <div class="pp-col-50">
32
+ <div class="pp-row">
33
+ <h2 class="pp-page-sub-header">Add Podcasting to Existing Taxonomy Term</h2>
34
+ </div>
35
+
36
+
37
+ <?php
38
+ $current_taxonomy = (isset($_GET['taxonomy'])?$_GET['taxonomy']: (isset($_POST['taxonomy'])?$_POST['taxonomy']:''));
39
+ if(empty($current_taxonomy)){ ?>
40
+ <h3><label for="powerpress_taxonomy_select"><?php echo __('Step 1 - Select Taxonomy', 'powerpress'); ?></label></h3>
41
+ <select id="powerpress_taxonomy_select" name="taxonomy" style="width: 95%;">
42
+ <option value=""><?php echo __('Select Taxonomy', ''); ?></option>
43
+ <?php
44
+ $taxonomies = get_taxonomies('','names');
45
+ foreach($taxonomies as $null => $taxonomy){
46
+ if($taxonomy == 'category'){
47
+ continue;
48
+ }
49
+ $taxonomy = htmlspecialchars($taxonomy);
50
+
51
+ echo "\t<option value=\"$taxonomy\"". ($current_taxonomy==$taxonomy?' selected':''). ">$taxonomy</option>\n";
52
+ }
53
+ ?>
54
+ </select>
55
+
56
+ <div class="pp-row">
57
+ <p class="submit"><input type="submit" class="button" name="select_taxonomy" value="<?php echo __('SELECT TAXONOMY TERM', 'powerpress'); ?>" /></p>
58
+ </div>
59
+ <?php }
60
+
61
+ ?>
62
+
63
+ <?php
64
+ if(!empty($current_taxonomy)){ ?>
65
+ <input type="hidden" name="action" value="powerpress-addtaxonomyfeed" />
66
+ <input type="hidden" name="taxonomy" value="<?php echo esc_attr($current_taxonomy); ?>" />
67
+ <?php wp_nonce_field('powerpress-add-taxonomy-feed'); ?>
68
+ <h3><label for="term"><?php echo __('Step 2 - Select Taxonomy Term', 'powerpress'); ?></label></h3>
69
+ <?php
70
+ wp_dropdown_categories( array('class'=>'', 'show_option_none'=>__('Select Term', 'powerpress'), 'orderby'=>'name', 'hide_empty'=>0, 'hierarchical'=>1, 'name'=>'term', 'id'=>'term_id', 'taxonomy'=>$current_taxonomy ) );
71
+ ?>
72
+
73
+
74
+ <div class="pp-row" style="margin-top: 20px;">
75
+ <input style="margin-right: 20px;" type="submit" class="button" name="add_podcasting" value="<?php echo __('Add Podcast Settings to Term', 'powerpress'); ?>" /> &nbsp;
76
+ <input type="submit" class="button" name="cancel" value="<?php echo __('Cancel', 'powerpress'); ?>" />
77
+
78
+ </div>
79
+
80
+ <?php } ?>
81
+ </div>
82
+
83
+ <?php
84
+ // Currently, there are any reasons listed on this page, so this column is hidden
85
+ ?>
86
+ <div class="pp-col-50" style="display: none;">
87
+ <div class="pp-row">
88
+ <h2 class="pp-page-sub-header">Why would I use Taxonomy?</h2>
89
+ </div>
90
+
91
+ <ul style="list-style: unset; padding-left: 20px;">
92
+ <li>
93
+ <h3 style="font-weight: 400;">You have a podcast that covers two topics that sometimes share same posts and sometimes do not. Use your main podcast feed as a combined feed of both topics and use category feeds to distribute topic specific episodes.</h3>
94
+ </li>
95
+ <li>
96
+ <h3 style="font-weight: 400;">You want to use categories to keep episodes separate from each other. Each category can be used to distribute separate podcasts with the main podcast feed combining all categories to provide a network feed</h3>
97
+ </li>
98
+ </ul>
99
+ </div>
100
+ </div>
101
+
102
+ <hr>
103
+
104
+ <div class="pp-row pp-tools-row" style="margin-top: 20px;">
105
+ <div class="pp-row">
106
+ <h2 class="pp-page-sub-header">List of Taxonomy Terms</h2>
107
+ </div>
108
+ </div>
109
+
110
+ <div class="pp-row pp-tools-row" style="margin-top: 20px;">
111
+ <table class="widefat fixed">
112
+ <thead>
113
+ <tr>
114
+ <?php print_column_headers('powerpressadmin_taxonomyfeeds'); ?>
115
+ </tr>
116
+ </thead>
117
+
118
+ <tfoot>
119
+ <tr>
120
+ <?php print_column_headers('powerpressadmin_taxonomyfeeds', false); ?>
121
+ </tr>
122
+ </tfoot>
123
+
124
+ <tbody>
125
+ <?php
126
+ $PowerPressTaxonomies = get_option('powerpress_taxonomy_podcasting');
127
+ if(empty($PowerPressTaxonomies)){
128
+ $PowerPressTaxonomies = array();
129
+ }
130
+
131
+ $count = 0;
132
+ foreach($PowerPressTaxonomies as $tt_id => $null) {
133
+ $taxonomy_type = '';
134
+ $term_ID = '';
135
+
136
+ global $wpdb;
137
+ $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = $tt_id", ARRAY_A);
138
+ if(!empty( $term_info[0]['term_id'])){
139
+ $term_ID = $term_info[0]['term_id'];
140
+ $taxonomy_type = $term_info[0]['taxonomy'];
141
+ } else {
142
+ continue; // we didn't find this taxonomy relationship
143
+ }
144
+
145
+ $term_object = get_term($term_ID, $taxonomy_type, OBJECT, 'edit');
146
+ if(is_wp_error($term_object)){
147
+ continue;
148
+ }
149
+
150
+ $columns = powerpress_admin_taxonomyfeeds_columns();
151
+ $hidden = array();
152
+
153
+ if($count % 2 == 0){
154
+ echo '<tr class="alternate">';
155
+ } else {
156
+ echo '<tr>';
157
+ }
158
+
159
+ $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-edittaxonomyfeed&amp;term='. $term_ID .'&taxonomy='.$taxonomy_type.'&amp;ttid='.$tt_id) ;
160
+
161
+ $feed_title = $term_object->name;
162
+ $url = get_term_feed_link($term_ID, $taxonomy_type, 'rss2');
163
+ $short_url = str_replace('http://', '', $url);
164
+ $short_url = str_replace('www.', '', $short_url);
165
+
166
+ if(strlen($short_url) > 35){
167
+ $short_url = substr($short_url, 0, 32).'...';
168
+ }
169
+
170
+ foreach($columns as $column_name=>$column_display_name){
171
+ $class = "class=\"column-$column_name\"";
172
+
173
+ switch($column_name) {
174
+ case 'feed-slug': {
175
+ echo "<td $class>{$term_object->slug}";
176
+ echo "</td>";
177
+ } break;
178
+
179
+ case 'name': {
180
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_attr($feed_title).'</a></strong><br />';
181
+ $actions = array();
182
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
183
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-delete-taxonomy-feed&amp;ttid=$tt_id", 'powerpress-delete-taxonomy-feed-' . $tt_id) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for taxonomy '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
184
+ $action_count = count($actions);
185
+ $i = 0;
186
+ echo '<div class="row-actions">';
187
+ foreach($actions as $action => $linkaction){
188
+ ++$i;
189
+ ($i == $action_count) ? $sep = '' : $sep = ' | ';
190
+ echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
191
+ }
192
+ echo '</div>';
193
+ echo '</td>';
194
+
195
+ } break;
196
+
197
+ case 'url': {
198
+ echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
199
+ echo '<div class="row-actions">';
200
+ if(defined('POWERPRESS_FEEDVALIDATOR_URL')){
201
+ echo '<span class="'.$action .'"><a href="'. POWERPRESS_FEEDVALIDATOR_URL . urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
202
+ }
203
+ echo '</div>';
204
+ echo "</td>";
205
+
206
+ } break;
207
+
208
+ case 'episode-count': {
209
+ echo "<td $class>$episode_total";
210
+ echo "</td>";
211
+
212
+ } break;
213
+
214
+ case 'taxonomy': {
215
+ echo "<td $class>$taxonomy_type";
216
+ echo "</td>";
217
+ } break;
218
+
219
+ default: {
220
+
221
+ }; break;
222
+ }
223
+ }
224
+
225
+ echo "\n </tr>\n";
226
+ $count++;
227
+ }
228
+ ?>
229
+ </tbody>
230
+ </table>
231
+ </div>
232
+ </div>
233
+
234
+ <style>
235
+ .pp-col-50 {
236
+ width: 50%;
237
+ }
238
+ </style>
239
+
240
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
powerpressadmin-tools.php CHANGED
@@ -1,225 +1,73 @@
1
- <?php
2
- // powerpressadmin-tools.php
3
-
4
- function powerpress_admin_tools()
5
- {
6
- $General = get_option('powerpress_general');
7
-
8
- // If we have powerpress credentials, check if the account has been verified
9
- $creds = get_option('powerpress_creds');
10
- powerpress_check_credentials($creds);
11
- wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION );
12
- ?>
13
- <h2><?php echo __('PowerPress Tools', 'powerpress'); ?></h2>
14
-
15
- <p style="margin-bottom: 0;"><?php echo __('Useful utilities and tools.', 'powerpress'); ?></p>
16
-
17
-
18
- <table class="form-table">
19
- <tr valign="top">
20
- <th scope="row"><?php echo __('Multi-Program Mode', 'powerpress'); ?></th>
21
- <td>
22
- <?php
23
- if (isset($General['network_mode']) && $General['network_mode'] == 1) { ?>
24
- <a style="float: left; text-decoration: none; color: white; background-color: #d21919;" class="powerpress_save_button_other" href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-network-mode-off"); ?>">
25
-
26
- <?php
27
- echo __('Turn OFF multi-program mode', 'powerpress');?>
28
- </a><p style="margin: 7px 0 0 5px;"> - <?php
29
- echo __('This feature allows you to publish to multiple Blubrry-hosted shows from a single user account.', 'powerpress');
30
- ?> </p><?php
31
- } else { ?>
32
- <a style="float: left; text-decoration: none; color: white;" class="powerpress_save_button_other" href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-network-mode-on"); ?>">
33
-
34
- <?php
35
- echo __('Turn ON multi-program mode', 'powerpress');?>
36
- </a><p style="margin: 7px 0 0 5px;"> - <?php
37
- echo __('This feature allows you to publish to multiple Blubrry-hosted shows from a single user account.', 'powerpress');
38
- ?> </p> <?php
39
- }
40
- ?>
41
- </td>
42
- </tr>
43
- <tr valign="top">
44
- <th scope="row"><?php echo __('Podcasting Resources', 'powerpress'); ?></th>
45
- <td>
46
- <p style="margin-top: 5px;"><strong><a href="https://blubrry.com/manual/"><?php echo __('Podcasting Manual', 'powerpress'); ?></a></strong>
47
- - <?php echo __('Everything you need to know about podcasting.', 'powerpress'); ?></p>
48
-
49
- <p style="margin-top: 5px;"><strong><a href="https://blubrry.com/services/"><?php echo __('Blubrry Resources', 'powerpress'); ?></a></strong>
50
- - <?php echo __('Learn more about PowerPress and Blubrry services.', 'powerpress'); ?></p>
51
-
52
- <p style="margin-top: 5px;"><strong><a href="https://blubrry.com/support/"><?php echo __('Blubrry Support', 'powerpress'); ?></a></strong>
53
- - <?php echo __('Get support for your podcast!', 'powerpress'); ?></p>
54
-
55
- <p style="margin-top: 5px;"><strong><a href="https://wordpress.org/support/plugin/powerpress"><?php echo __('Blubrry PowerPress Forum', 'powerpress'); ?></a></strong>
56
- - <?php echo __('PowerPress support forum on WordPress.org.', 'powerpress'); ?></p>
57
- </td>
58
- </tr>
59
-
60
-
61
-
62
- <!-- ping_sites -->
63
- <tr valign="top">
64
- <th scope="row"><?php echo __('Add Update Services', 'powerpress'); ?></th>
65
- <td>
66
-
67
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-ping-sites"); ?>"><?php echo __('Add Update Services / Ping Sites', 'powerpress'); ?></a></strong> <?php echo __('(notify podcast directories when you publish new episodes)', 'powerpress'); ?></p>
68
- <p><?php echo __('Add Update Services / Ping Sites geared towards podcasting.', 'powerpress'); ?></p>
69
-
70
- </td>
71
- </tr>
72
 
73
- <!-- find_replace -->
74
- <tr valign="top">
75
- <th scope="row"><?php echo __('Find and Replace Media', 'powerpress'); ?></th>
76
- <td>
77
-
78
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-find-replace"); ?>"><?php echo __('Find and Replace for Episode URLs', 'powerpress'); ?></a></strong></p>
79
- <p>
80
- <?php echo __('Find and replace complete or partial segments of media URLs. Useful if you move your media to a new web site or service.', 'powerpress'); ?>
81
- </p>
82
-
83
- </td>
84
- </tr>
85
 
86
- <!-- use_caps -->
87
- <tr valign="top">
88
- <th scope="row"><?php echo __('User Capabilities', 'powerpress'); ?></th>
89
- <td>
90
  <?php
91
- if( !empty($General['use_caps']) )
92
- {
93
- ?>
94
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-remove-caps", 'powerpress-remove-caps'); ?>"><?php echo __('Remove PowerPress Podcasting Capabilities for User Role Management', 'powerpress'); ?></a></strong></p>
95
- <p>
96
- <?php echo __('Podcasting capability allows administrators, editors and authors access to create and configure podcast episodes.
97
- Only administrators will be able to view media statistics from the WordPress Dashboard. Contributors, subscribers and other
98
- custom users will not have access to create podcast episodes or view statistics from the dashboard. Due to this feature\'s
99
- complexity, it is not supported by Blubrry.com.', 'powerpress'); ?>
100
- </p>
101
-
102
- <?php
103
- }
104
- else
105
- {
106
- ?>
107
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-add-caps", 'powerpress-add-caps'); ?>">
108
- <?php echo __('Add PowerPress Podcasting Capabilities for User Role Management', 'powerpress'); ?></a></strong></p>
109
- <p>
110
- <?php echo __('Adding podcasting capability will allow administrators, editors and authors access to create and configure podcast episodes.
111
- Only administrators will be able to view media statistics from the WordPress Dashboard. Contributors, subscribers and other
112
- custom users will not have access to create podcast episodes or view statistics from the dashboard. Due to this feature\'s
113
- complexity, it is not supported by Blubrry.com.', 'powerpress'); ?>
114
- </p>
115
- <?php
116
- }
117
-
118
- if( !empty($General['premium_caps']) )
119
- {
120
- ?>
121
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-remove-feed-caps", 'powerpress-remove-feed-caps'); ?>"><?php echo __('Remove Password Protection Capabilities for Control of Which Users can Access Your Podcasts', 'powerpress'); ?></a></strong> (<?php echo __('Also kown as Premium Content', 'powerpress'); ?>)</p>
122
- <p>
123
- <?php
124
- echo sprintf( __("To use this feature, go to %s and create a new custom podcast channel. In the Edit Podcast Channel page, click the last tab labeled 'Other Settings'. Place a check in the box labled 'Protect Content' and then click 'Save Changes'.", 'powerpress'),
125
- '<a href="'. admin_url("admin.php?page=powerpressadmin_customfeeds.php") .'" title="'. __('Podcast Channels', 'powerpress') .'">'. __('Podcast Channels', 'powerpress') .'</a>' );
126
- ?>
127
- </p>
128
- <p>
129
- <?php echo __('Password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
130
- podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
131
- Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
132
- channels. Due to this feature\'s complexity, it is not supported by Blubrry.com.', 'powerpress'); ?>
133
- </p>
134
- <?php
135
- }
136
- else
137
- {
138
- ?>
139
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-add-feed-caps", 'powerpress-add-feed-caps'); ?>"><?php echo __('Add Password Protection Capabilities for Control of Which Users can Access Your Podcasts', 'powerpress'); ?></a></strong> (<?php echo __('Also kown as Premium Content', 'powerpress'); ?>)</p>
140
- <p>
141
- <?php echo __('Adding password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
142
- podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
143
- Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
144
- channels. Due to this feature\'s complexity, it is not supported by Blubrry.com.', 'powerpress'); ?>
145
- </p>
146
- <?php
147
- }
148
- ?>
149
-
150
- <p><strong><?php echo __('What are Roles and Capabilities?', 'powerpress'); ?></strong></p>
151
- <p>
152
- <?php
153
- echo sprintf( __("The WordPress %s feature gives the blog owner the ability to control what users can and
154
- cannot do in the blog. You will most likely need a roles and capabilities plugin such as %s, %s, or %s
155
- to take advantage of these features. Due to this feature's complexity, it is not supported by Blubrry.com.", 'powerpress'),
156
- '<a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">'. __('Roles and Capabilities', 'powerpress') .'</a>',
157
- '<a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">'. __('Role Manager', 'powerpress') .'</a>',
158
- '<a href="http://alkivia.org/wordpress/capsman/" target="_blank">'. __('Capability Manager', 'powerpress') .'</a>',
159
- '<a href="http://agapetry.net/category/plugins/role-scoper/" target="_blank">'. __('Role Scoper', 'powerpress') .'</a>'
160
- );
161
- ?>
162
- </p>
163
-
164
- </td>
165
- </tr>
166
-
167
-
168
- <tr valign="top">
169
- <th scope="row"><?php echo __('Update Plugins Cache', 'powerpress'); ?></th>
170
- <td>
171
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-clear-update_plugins", 'powerpress-clear-update_plugins'); ?>"><?php echo __('Clear Plugins Update Cache', 'powerpress'); ?></a></strong></p>
172
- <p>
173
- <?php
174
- echo sprintf( __('The list of plugins on the plugins page will cache the plugin version numbers for up to 24 hours. Click the link above to clear the cache to get the latest versions of plugins listed on your %s page.', 'powerpress'),
175
- '<a href="'. admin_url(). 'plugins.php' .'" title="Plugins">'. __('plugins', 'powerpress') .'</a>');
176
- ?>
177
- </p>
178
- </td>
179
- </tr>
180
-
181
- <tr valign="top">
182
- <th scope="row"><?php echo __('Translations', 'powerpress'); ?></th>
183
- <td>
184
- <p style="margin-top: 5px;"><strong>
185
- <a href="https://blubrry.com/support/powerpress-documentation/powerpress-language/translate-powerpress/" target="_blank"><?php echo __('Translate PowerPress to your language', 'powerpress'); ?></a>
186
- </strong></p>
187
- </td>
188
- </tr>
189
-
190
- <tr valign="top">
191
- <th scope="row"><?php echo __('iOS 11 Fields', 'powerpress'); ?></th>
192
- <td>
193
- <?php
194
- $ios11_fields_url = admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-ios11-fields", 'powerpress-ios11-fields');
195
-
196
- ?>
197
- <p>
198
- Since PowerPress 7.1 and the addition of 3 new fields for iOS 11, some web sites that use PHP in FastCGI mode are experiencing 404 or 500 error pages when saving PowerPress settings.
199
- Use the options below to turn off these fields to avoid the errors and help us determine which of the new fields is causing the issue.
200
- </p>
201
- <p style="margin-top: 5px;">&bull; <strong><a href="<?php echo $ios11_fields_url; ?>&amp;variation=0"><?php echo __('Show all iOS 11 program fields', 'powerpress'); ?></a></strong> <?php echo (empty($General['ios11_fields'])? ' (selected)' : '' ); ?></p>
202
- <p style="margin-top: 5px;">&bull; <strong><a href="<?php echo $ios11_fields_url; ?>&amp;variation=1"><?php echo __('Show itunes type field only', 'powerpress'); ?></a></strong><?php echo (!empty($General['ios11_fields']) && $General['ios11_fields'] == 1? ' (selected)' : '' ); ?></p>
203
- <p style="margin-top: 5px;">&bull; <strong><a href="<?php echo $ios11_fields_url; ?>&amp;variation=2"><?php echo __('Show itunes title episode box field only', 'powerpress'); ?></a></strong><?php echo (!empty($General['ios11_fields']) && $General['ios11_fields'] == 2? ' (selected)' : '' ); ?></p>
204
- <p style="margin-top: 5px;">&bull; <strong><a href="<?php echo $ios11_fields_url; ?>&amp;variation=4"><?php echo __('Show itunes number, season and episode type episode box field only', 'powerpress'); ?></a><?php echo (!empty($General['ios11_fields']) && $General['ios11_fields'] == 4? ' (selected)' : '' ); ?></strong></p>
205
- <p style="margin-top: 5px;">&bull; <strong><a href="<?php echo $ios11_fields_url; ?>&amp;variation=8"><?php echo __('Show no iOS 11 program fields', 'powerpress'); ?></a></strong><?php echo (!empty($General['ios11_fields']) && $General['ios11_fields'] == 8? ' (selected)' : '' ); ?></p>
206
-
207
- </td>
208
- </tr>
209
-
210
- <tr valign="top">
211
- <th scope="row"><?php echo __('Diagnostics', 'powerpress'); ?></th>
212
- <td>
213
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-diagnostics"); ?>"><?php echo __('Diagnose Your PowerPress Installation', 'powerpress'); ?></a></strong></p>
214
- <p>
215
- <?php echo __('The Diagnostics page checks to see if your server is configured to support all of the available features in Blubrry PowerPress.', 'powerpress'); ?>
216
- </p>
217
- </td>
218
- </tr>
219
-
220
- </table>
221
- <?php
222
-
223
- }
224
 
225
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ </style>
 
 
 
 
 
 
 
 
 
 
 
4
 
 
 
 
 
5
  <?php
6
+ // powerpressadmin-tools.php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ function powerpress_admin_tools(){
9
+ $General = get_option('powerpress_general');
10
+
11
+ // If we have powerpress credentials, check if the account has been verified
12
+ $credentials = get_option('powerpress_creds');
13
+ powerpress_check_credentials($credentials);
14
+ wp_enqueue_script('powerpress-admin', powerpress_get_root_url() . 'js/admin.js', array(), POWERPRESS_VERSION);
15
+ ?>
16
+
17
+ <h2 class="pp-page-header"><?php echo __('PowerPress Tools', 'powerpress'); ?></h2>
18
+ <h3 class="pp-page-h3"><?php echo __('Useful utilities and tools.', 'powerpress'); ?></h3>
19
+
20
+ <div class="pp-card-body">
21
+ <!-- Update Plugins Cache -->
22
+ <div class="pp-row pp-tools-row">
23
+ <h3 class="pp-page-h3-bold pp-tools-item">Update Plugins Cache</h3>
24
+ <a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-clear-update_plugins", 'powerpress-clear-update_plugins'); ?>" title="Clear Plugins Cache"
25
+ class="powerpress_save_button_other pp-tools-button">CLEAR PLUGINS CACHE</a>
26
+ </div>
27
+ <div class="pp-row pp-tools-row">
28
+ <p class="pp-tools-text">The list of plugins on the plugins page will cache the plugin version numbers for up to 24 hours.
29
+ Click the link above to clear the cache to get the latest versions of plugins listed on your <a href="<?php echo admin_url() . 'plugins.php'?>">plugins</a> page.
30
+ </p>
31
+ </div>
32
+
33
+ <hr>
34
+
35
+ <!-- Translations -->
36
+ <div class="pp-row pp-tools-row">
37
+ <h3 class="pp-page-h3-bold pp-tools-item">Translations</h3>
38
+ <a href="https://blubrry.com/support/powerpress-documentation/powerpress-language/translate-powerpress/" target="_blank" title="Translate PowerPress"
39
+ class="powerpress_save_button_other pp-tools-button">TRANSLATE POWERPRESS</a>
40
+ </div>
41
+ <div class="pp-row pp-tools-row">
42
+ <p class="pp-tools-text">PowerPress translations are managed on the official
43
+ <a href="https://translate.wordpress.org/projects/wp-plugins/powerpress/" target="_blank">WordPress translate site</a>.
44
+ </p>
45
+ </div>
46
+
47
+ <hr>
48
+
49
+ <!-- Media URL Replacement -->
50
+ <div class="pp-row pp-tools-row">
51
+ <h3 class="pp-page-h3-bold pp-tools-item">Media URL Replacement</h3>
52
+ <a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-find-replace"); ?>" title="Find and Replace Media"
53
+ class="powerpress_save_button_other pp-tools-button">REPLACE MEDIA URLS</a>
54
+ </div>
55
+ <div class="pp-row pp-tools-row">
56
+ <p class="pp-tools-text">Find and replace complete or partial segments of media URLs.
57
+ Useful if you move your media to a new website or service.
58
+ </p>
59
+ </div>
60
+
61
+ <hr>
62
+
63
+ <!-- Diagnostics -->
64
+ <div class="pp-row pp-tools-row">
65
+ <h3 class="pp-page-h3-bold pp-tools-item">Diagnostics</h3>
66
+ <a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-diagnostics"); ?>" title="Diagnose Your PowerPress Installation"
67
+ class="powerpress_save_button_other pp-tools-button">RUN DIAGNOSTICS</a>
68
+ </div>
69
+ <div class="pp-row pp-tools-row">
70
+ <p class="pp-tools-text">The Diagnostics page checks to see if your server is configured to support all the available features in Blubrry PowerPress.</p>
71
+ </div>
72
+ </div>
73
+ <?php } ?>
powerpressadmin.php CHANGED
@@ -1687,6 +1687,7 @@ add_action( 'admin_notices', 'powerpress_admin_notices' );
1687
 
1688
  function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_general' )
1689
  {
 
1690
  if( $field == 'powerpress_taxonomy_podcasting' || $field == 'powerpress_itunes_featured' ) { // No merging settings for these fields...
1691
  update_option($field, $SettingsNew);
1692
  return;
@@ -1704,8 +1705,6 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1704
  if( $field == 'powerpress_general' && !isset($Settings['timestamp']) )
1705
  $Settings['timestamp'] = time();
1706
 
1707
-
1708
-
1709
  // Special case fields, if they are empty, we can delete them., this will keep the Settings array uncluttered
1710
  if( isset($Settings['feed_links']) && $Settings['feed_links'] == 0 ) // If set to default value, no need to save it in the database
1711
  unset($Settings['feed_links']);
@@ -1795,10 +1794,12 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1795
  if (isset($SettingsNew['bp_episode_image']) && empty($SettingsNew['bp_episode_image']))
1796
  unset($Settings['bp_episode_image']);
1797
  }
 
 
1798
  if( isset($Settings['videojs_css_class']) && empty($Settings['videojs_css_class']) )
1799
  unset($Settings['videojs_css_class']);
1800
  if( isset($Settings['cat_casting']) && empty($Settings['cat_casting']) )
1801
- unset($Settings['cat_casting']);
1802
  if( isset($Settings['posttype_podcasting']) && empty($Settings['posttype_podcasting']) )
1803
  unset($Settings['posttype_podcasting']);
1804
  if( isset($Settings['taxonomy_podcasting']) && empty($Settings['taxonomy_podcasting']) )
@@ -1815,7 +1816,10 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1815
  unset($Settings['poster_image_audio']);
1816
  if( isset($Settings['itunes_image_audio']) && empty($Settings['itunes_image_audio']) )
1817
  unset($Settings['itunes_image_audio']);
1818
-
 
 
 
1819
  }
1820
  else // Feed or player settings...
1821
  {
@@ -1838,7 +1842,7 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1838
  if( empty($Settings['episode_itunes_image']) )
1839
  unset($Settings['episode_itunes_image']);
1840
  }
1841
-
1842
  update_option($field, $Settings);
1843
  }
1844
  }
@@ -2543,7 +2547,7 @@ function powerpress_edit_post($post_ID, $post)
2543
 
2544
  // podping uses the Blubrry API, so an account needs to be linked
2545
  $creds = get_option('powerpress_creds');
2546
- if (!empty($creds) || !empty($GeneralSettings['blubrry_auth'])) {
2547
  if (!(defined('POWERPRESS_DISABLE_PODPING') && POWERPRESS_DISABLE_PODPING )) {
2548
  require_once( 'powerpresspodping.class.php' );
2549
  $Podping = new PowerPressPodping();
1687
 
1688
  function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_general' )
1689
  {
1690
+
1691
  if( $field == 'powerpress_taxonomy_podcasting' || $field == 'powerpress_itunes_featured' ) { // No merging settings for these fields...
1692
  update_option($field, $SettingsNew);
1693
  return;
1705
  if( $field == 'powerpress_general' && !isset($Settings['timestamp']) )
1706
  $Settings['timestamp'] = time();
1707
 
 
 
1708
  // Special case fields, if they are empty, we can delete them., this will keep the Settings array uncluttered
1709
  if( isset($Settings['feed_links']) && $Settings['feed_links'] == 0 ) // If set to default value, no need to save it in the database
1710
  unset($Settings['feed_links']);
1794
  if (isset($SettingsNew['bp_episode_image']) && empty($SettingsNew['bp_episode_image']))
1795
  unset($Settings['bp_episode_image']);
1796
  }
1797
+
1798
+
1799
  if( isset($Settings['videojs_css_class']) && empty($Settings['videojs_css_class']) )
1800
  unset($Settings['videojs_css_class']);
1801
  if( isset($Settings['cat_casting']) && empty($Settings['cat_casting']) )
1802
+ unset($Settings['cat_casting']);
1803
  if( isset($Settings['posttype_podcasting']) && empty($Settings['posttype_podcasting']) )
1804
  unset($Settings['posttype_podcasting']);
1805
  if( isset($Settings['taxonomy_podcasting']) && empty($Settings['taxonomy_podcasting']) )
1816
  unset($Settings['poster_image_audio']);
1817
  if( isset($Settings['itunes_image_audio']) && empty($Settings['itunes_image_audio']) )
1818
  unset($Settings['itunes_image_audio']);
1819
+ if( isset($Settings['network_mode']) && empty($Settings['network_mode']) )
1820
+ unset($Settings['network_mode']);
1821
+ if( isset($Settings['use_caps']) && empty($Settings['use_caps']) )
1822
+ unset($Settings['use_caps']);
1823
  }
1824
  else // Feed or player settings...
1825
  {
1842
  if( empty($Settings['episode_itunes_image']) )
1843
  unset($Settings['episode_itunes_image']);
1844
  }
1845
+
1846
  update_option($field, $Settings);
1847
  }
1848
  }
2547
 
2548
  // podping uses the Blubrry API, so an account needs to be linked
2549
  $creds = get_option('powerpress_creds');
2550
+ if (!empty($MediaURL) && (!empty($creds) || !empty($GeneralSettings['blubrry_auth']))) {
2551
  if (!(defined('POWERPRESS_DISABLE_PODPING') && POWERPRESS_DISABLE_PODPING )) {
2552
  require_once( 'powerpresspodping.class.php' );
2553
  $Podping = new PowerPressPodping();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts,
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 6.0
7
- Stable tag: 9.5.1
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
@@ -185,6 +185,14 @@ If you are a fan of PowerPress, we would greatly appreciate it if you could take
185
 
186
 
187
  == Changelog ==
 
 
 
 
 
 
 
 
188
 
189
  = 9.5.1 =
190
  * Released on 09/30/2022
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 6.0
7
+ Stable tag: 9.6
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
185
 
186
 
187
  == Changelog ==
188
+ = 9.6 =
189
+ * Released on 10/10/2022
190
+ * Redesign pages for tools, channels, categories, taxonomies, and post types
191
+ * Add Buzzsprout import option
192
+
193
+ = 9.5.2 =
194
+ * Released on 10/12/2022
195
+ * Bugfix for division by zero
196
 
197
  = 9.5.1 =
198
  * Released on 09/30/2022
views/settings_tab_destinations.php CHANGED
@@ -356,6 +356,10 @@ function subscribeSetting($directory, $feed_url, $listing_url) {
356
  ?>
357
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
358
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
 
 
 
 
359
  </div>
360
  </div>
361
 
356
  ?>
357
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
358
  <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
359
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
360
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
361
+ <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
362
+ <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
363
  </div>
364
  </div>
365