diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/LICENSE b/wp-content/upgrade-temp-backup/plugins/activitypub/LICENSE
deleted file mode 100644
index 644800f2..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-MIT License
-
-Copyright (c) 2019 Matthias Pfefferle
-Copyright (c) 2023 Automattic
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php b/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php
deleted file mode 100644
index 478486ef..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php
+++ /dev/null
@@ -1,239 +0,0 @@
-)|(?<=
)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))' );
-\defined( 'ACTIVITYPUB_USERNAME_REGEXP' ) || \define( 'ACTIVITYPUB_USERNAME_REGEXP', '(?:([A-Za-z0-9\._-]+)@((?:[A-Za-z0-9_-]+\.)+[A-Za-z]+))' );
-\defined( 'ACTIVITYPUB_CUSTOM_POST_CONTENT' ) || \define( 'ACTIVITYPUB_CUSTOM_POST_CONTENT', "
yourusername@example.com
)","activitypub"),{code:(0,i.createElement)("code",null)})),(0,i.createElement)("div",{className:"activitypub-dialog__button-group"},(0,i.createElement)("input",{type:"text",value:N,onKeyDown:e=>{"Enter"===e?.code&&$()},onChange:e=>R(e.target.value)}),(0,i.createElement)(u.Button,{onClick:$},(0,i.createElement)(k,{icon:a}),b)),l&&(0,i.createElement)("div",{className:"activitypub-dialog__remember"},(0,i.createElement)(u.CheckboxControl,{checked:U,label:(0,s.__)("Remember me for easier comments","activitypub"),onChange:()=>{P(!U)}}))))}const{namespace:N}=window._activityPubOptions,R={avatar:"",webfinger:"@well@hello.dolly",name:(0,s.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function U(e){if(!e)return R;const t={...R,...e};return t.avatar=t?.icon?.url,t}function P({profile:e,popupStyles:t,userId:r}){const{avatar:o,name:n,webfinger:l}=e;return(0,i.createElement)("div",{className:"activitypub-profile"},(0,i.createElement)("img",{className:"activitypub-profile__avatar",src:o,alt:n}),(0,i.createElement)("div",{className:"activitypub-profile__content"},(0,i.createElement)("div",{className:"activitypub-profile__name"},n),(0,i.createElement)("div",{className:"activitypub-profile__handle",title:l},l)),(0,i.createElement)(I,{profile:e,popupStyles:t,userId:r}))}function I({profile:e,popupStyles:t,userId:r}){const[o,n]=(0,m.useState)(!1),l=(0,s.sprintf)((0,s.__)("Follow %s","activitypub"),e?.name);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(u.Button,{className:"activitypub-profile__follow",onClick:()=>n(!0)},(0,s.__)("Follow","activitypub")),o&&(0,i.createElement)(u.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>n(!1),title:l},(0,i.createElement)($,{profile:e,userId:r}),(0,i.createElement)("style",null,t)))}function $({profile:e,userId:t}){const{webfinger:r}=e,o=(0,s.__)("Follow","activitypub"),n=`/${N}/actors/${t}/remote-follow?resource=`,l=(0,s.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub");return(0,i.createElement)(C,{actionText:o,copyDescription:l,handle:r,resourceUrl:n})}function T({selectedUser:e,style:t,backgroundColor:r,id:o,useId:n=!1,profileData:l=!1}){const[a,c]=(0,m.useState)(U()),s="site"===e?0:e,u=function(e){return w(".apfmd__button-group .components-button",b(e?.elements?.link?.color?.text)||"#111","#fff",b(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),p=n?{id:o}:{};function v(e){c(U(e))}return(0,m.useEffect)((()=>{if(l)return v(l);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${N}/actors/${e}`};return f()(t)})(s).then(v)}),[s,l]),(0,i.createElement)("div",{...p},(0,i.createElement)(h,{selector:`#${o}`,style:t,backgroundColor:r}),(0,i.createElement)(P,{profile:a,userId:s,popupStyles:u}))}(0,o.registerBlockType)("activitypub/follow-me",{edit:function({attributes:e,setAttributes:t}){const r=(0,c.useBlockProps)({className:"activitypub-follow-me-block-wrapper"}),o=function(){const e=v?.users?(0,p.useSelect)((e=>e("core").getUsers({who:"authors"}))):[];return(0,m.useMemo)((()=>{if(!e)return[];const t=v?.site?[{label:(0,s.__)("Whole Site","activitypub"),value:"site"}]:[];return e.reduce(((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e)),t)}),[e])}(),{selectedUser:n}=e;return(0,m.useEffect)((()=>{o.length&&(o.find((({value:e})=>e===n))||t({selectedUser:o[0].value}))}),[n,o]),(0,i.createElement)("div",{...r},o.length>1&&(0,i.createElement)(c.InspectorControls,{key:"setting"},(0,i.createElement)(u.PanelBody,{title:(0,s.__)("Followers Options","activitypub")},(0,i.createElement)(u.SelectControl,{label:(0,s.__)("Select User","activitypub"),value:e.selectedUser,options:o,onChange:e=>t({selectedUser:e})}))),(0,i.createElement)(T,{...e,id:r.id}))},save:()=>null,icon:a})},20:(e,t,r)=>{var o=r(609),n=Symbol.for("react.element"),l=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,c={},s=null,u=null;for(o in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:s,ref:u,props:c,_owner:a.current}}},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=(t,r,n,l)=>{if(!r){var a=1/0;for(u=0;uyourusername@example.com
)","activitypub"),{code:(0,o.createElement)("code",null)})),(0,o.createElement)("div",{className:"activitypub-dialog__button-group"},(0,o.createElement)("input",{type:"text",value:N,onKeyDown:e=>{"Enter"===e?.code&&j()},onChange:e=>R(e.target.value)}),(0,o.createElement)(s.Button,{onClick:j},(0,o.createElement)(h,{icon:g}),y)),i&&(0,o.createElement)("div",{className:"activitypub-dialog__remember"},(0,o.createElement)(s.CheckboxControl,{checked:I,label:(0,u.__)("Remember me for easier comments","activitypub"),onChange:()=>{P(!I)}}))))}const{namespace:S}=window._activityPubOptions,C={avatar:"",webfinger:"@well@hello.dolly",name:(0,u.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function N(e){if(!e)return C;const t={...C,...e};return t.avatar=t?.icon?.url,t}function R({profile:e,popupStyles:t,userId:r}){const{avatar:n,name:a,webfinger:l}=e;return(0,o.createElement)("div",{className:"activitypub-profile"},(0,o.createElement)("img",{className:"activitypub-profile__avatar",src:n,alt:a}),(0,o.createElement)("div",{className:"activitypub-profile__content"},(0,o.createElement)("div",{className:"activitypub-profile__name"},a),(0,o.createElement)("div",{className:"activitypub-profile__handle",title:l},l)),(0,o.createElement)(I,{profile:e,popupStyles:t,userId:r}))}function I({profile:e,popupStyles:t,userId:r}){const[a,l]=(0,n.useState)(!1),i=(0,u.sprintf)((0,u.__)("Follow %s","activitypub"),e?.name);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.Button,{className:"activitypub-profile__follow",onClick:()=>l(!0)},(0,u.__)("Follow","activitypub")),a&&(0,o.createElement)(s.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>l(!1),title:i},(0,o.createElement)(P,{profile:e,userId:r}),(0,o.createElement)("style",null,t)))}function P({profile:e,userId:t}){const{webfinger:r}=e,n=(0,u.__)("Follow","activitypub"),a=`/${S}/actors/${t}/remote-follow?resource=`,l=(0,u.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub");return(0,o.createElement)(O,{actionText:n,copyDescription:l,handle:r,resourceUrl:a})}function $({selectedUser:e,style:t,backgroundColor:r,id:a,useId:l=!1,profileData:i=!1}){const[s,u]=(0,n.useState)(N()),p="site"===e?0:e,v=function(e){return d(".apfmd__button-group .components-button",m(e?.elements?.link?.color?.text)||"#111","#fff",m(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),y=l?{id:a}:{};function _(e){u(N(e))}return(0,n.useEffect)((()=>{if(i)return _(i);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${S}/actors/${e}`};return c()(t)})(p).then(_)}),[p,i]),(0,o.createElement)("div",{...y},(0,o.createElement)(f,{selector:`#${a}`,style:t,backgroundColor:r}),(0,o.createElement)(R,{profile:s,userId:p,popupStyles:v}))}let j=1;l()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-follow-me-block-wrapper"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,n.createRoot)(e).render((0,o.createElement)($,{...t,id:"activitypub-follow-me-block-"+j++,useId:!0}))}))}))},20:(e,t,r)=>{var o=r(609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,c={},s=null,u=null;for(o in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:s,ref:u,props:c,_owner:l.current}}},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,r,n,a)=>{if(!r){var l=1/0;for(u=0;uyourusername@example.com
)","activitypub"),{code:(0,o.createElement)("code",null)})),(0,o.createElement)("div",{className:"activitypub-dialog__button-group"},(0,o.createElement)("input",{type:"text",value:L,onKeyDown:e=>{"Enter"===e?.code&&j()},onChange:e=>S(e.target.value)}),(0,o.createElement)(l.Button,{onClick:j},(0,o.createElement)(s,{icon:f}),C)),m&&(0,o.createElement)("div",{className:"activitypub-dialog__remember"},(0,o.createElement)(l.CheckboxControl,{checked:U,label:(0,c.__)("Remember me for easier comments","activitypub"),onChange:()=>{N(!U)}}))))}const{namespace:C}=window._activityPubOptions;function R({selectedComment:e,commentId:t}){const r=(0,c.__)("Reply","activitypub"),a=`/${C}/comments/${t}/remote-reply?resource=`,n=(0,c.__)("Copy and paste the Comment URL into the search field of your favorite fediverse app or server.","activitypub");return(0,o.createElement)(E,{actionText:r,copyDescription:n,handle:e,resourceUrl:a,myProfile:(0,c.__)("Original Comment URL","activitypub"),rememberProfile:!0})}function x({profileURL:e,template:t,commentURL:r,deleteRemoteUser:a}){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.Button,{variant:"link",className:"comment-reply-link activitypub-remote-reply__button",onClick:()=>{const e=t.replace("{uri}",r);window.open(e,"_blank")}},(0,c.sprintf)((0,c.__)("Reply as %s","activitypub"),e)),(0,o.createElement)(l.Button,{className:"activitypub-remote-profile-delete",onClick:a,title:(0,c.__)("Delete Remote Profile","activitypub")},(0,o.createElement)(s,{icon:u,size:18})))}function O({selectedComment:e,commentId:t}){const[r,n]=(0,a.useState)(!1),i=(0,c.__)("Remote Reply","activitypub"),{profileURL:s,template:m,deleteRemoteUser:p}=h(),u=s&&m;return(0,o.createElement)(o.Fragment,null,u?(0,o.createElement)(x,{profileURL:s,template:m,commentURL:e,deleteRemoteUser:p}):(0,o.createElement)(l.Button,{variant:"link",className:"comment-reply-link activitypub-remote-reply__button",onClick:()=>n(!0)},(0,c.__)("Reply on the Fediverse","activitypub")),r&&(0,o.createElement)(l.Modal,{className:"activitypub-remote-reply__modal activitypub__modal",onRequestClose:()=>n(!1),title:i},(0,o.createElement)(R,{selectedComment:e,commentId:t})))}let k=1;i()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-remote-reply"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,a.createRoot)(e).render((0,o.createElement)(O,{...t,id:"activitypub-remote-reply-link-"+k++,useId:!0}))}))}))},20:(e,t,r)=>{var o=r(609),a=Symbol.for("react.element"),n=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,c={},s=null,m=null;for(o in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(m=t.ref),t)n.call(t,o)&&!l.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:a,type:e,key:s,ref:m,props:c,_owner:i.current}}},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,r,a,n)=>{if(!r){var i=1/0;for(m=0;m%s
', - \__( 'Your author URL is accessible and supports the required "Accept" header.', 'activitypub' ) - ), - 'actions' => '', - 'test' => 'test_author_url', - ); - - $check = self::is_author_url_accessible(); - - if ( true === $check ) { - return $result; - } - - $result['status'] = 'critical'; - $result['label'] = \__( 'Author URL is not accessible', 'activitypub' ); - $result['badge']['color'] = 'red'; - $result['description'] = \sprintf( - '%s
', - $check->get_error_message() - ); - - return $result; - } - - /** - * System Cron tests - * - * @return array - */ - public static function test_system_cron() { - $result = array( - 'label' => \__( 'System Task Scheduler configured', 'activitypub' ), - 'status' => 'good', - 'badge' => array( - 'label' => \__( 'ActivityPub', 'activitypub' ), - 'color' => 'green', - ), - 'description' => \sprintf( - '%s
', - \esc_html__( 'You seem to use the System Task Scheduler to process WP_Cron tasks.', 'activitypub' ) - ), - 'actions' => '', - 'test' => 'test_system_cron', - ); - - if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) { - return $result; - } - - $result['status'] = 'recommended'; - $result['label'] = \__( 'System Task Scheduler not configured', 'activitypub' ); - $result['badge']['color'] = 'orange'; - $result['description'] = \sprintf( - '%s
', - \__( 'Enhance your WordPress site’s performance and mitigate potential heavy loads caused by plugins like ActivityPub by setting up a system cron job to run WP Cron. This ensures scheduled tasks are executed consistently and reduces the reliance on website traffic for trigger events.', 'activitypub' ) - ); - $result['actions'] .= sprintf( - '', - __( 'https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/', 'activitypub' ), - __( 'Learn how to hook the WP-Cron into the System Task Scheduler.', 'activitypub' ), - /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)', 'activitypub' ) - ); - - return $result; - } - - /** - * WebFinger tests - * - * @return array - */ - public static function test_webfinger() { - $result = array( - 'label' => \__( 'WebFinger endpoint', 'activitypub' ), - 'status' => 'good', - 'badge' => array( - 'label' => \__( 'ActivityPub', 'activitypub' ), - 'color' => 'green', - ), - 'description' => \sprintf( - '%s
', - \__( 'Your WebFinger endpoint is accessible and returns the correct information.', 'activitypub' ) - ), - 'actions' => '', - 'test' => 'test_webfinger', - ); - - $check = self::is_webfinger_endpoint_accessible(); - - if ( true === $check ) { - return $result; - } - - $result['status'] = 'critical'; - $result['label'] = \__( 'WebFinger endpoint is not accessible', 'activitypub' ); - $result['badge']['color'] = 'red'; - $result['description'] = \sprintf( - '%s
', - $check->get_error_message() - ); - - return $result; - } - - /** - * Check if `author_posts_url` is accessible and that request returns correct JSON - * - * @return boolean|WP_Error - */ - public static function is_author_url_accessible() { - $user = \wp_get_current_user(); - $author_url = \get_author_posts_url( $user->ID ); - $reference_author_url = self::get_author_posts_url( $user->ID, $user->user_nicename ); - - // check for "author" in URL - if ( $author_url !== $reference_author_url ) { - return new WP_Error( - 'author_url_not_accessible', - \sprintf( - // translators: %s: Author URL - \__( - 'Your author URL%s
was replaced, this is often done by plugins.',
- 'activitypub'
- ),
- $author_url
- )
- );
- }
-
- // try to access author URL
- $response = \wp_remote_get(
- $author_url,
- array(
- 'headers' => array( 'Accept' => 'application/activity+json' ),
- 'redirection' => 0,
- )
- );
-
- if ( \is_wp_error( $response ) ) {
- return new WP_Error(
- 'author_url_not_accessible',
- \sprintf(
- // translators: %s: Author URL
- \__(
- 'Your author URL %s
is not accessible. Please check your WordPress setup or permalink structure. If the setup seems fine, maybe check if a plugin might restrict the access.',
- 'activitypub'
- ),
- $author_url
- )
- );
- }
-
- $response_code = \wp_remote_retrieve_response_code( $response );
-
- // check for redirects
- if ( \in_array( $response_code, array( 301, 302, 307, 308 ), true ) ) {
- return new WP_Error(
- 'author_url_not_accessible',
- \sprintf(
- // translators: %s: Author URL
- \__(
- 'Your author URL %s
is redirecting to another page, this is often done by SEO plugins like "Yoast SEO".',
- 'activitypub'
- ),
- $author_url
- )
- );
- }
-
- // check if response is JSON
- $body = \wp_remote_retrieve_body( $response );
-
- if ( ! \is_string( $body ) || ! \is_array( \json_decode( $body, true ) ) ) {
- return new WP_Error(
- 'author_url_not_accessible',
- \sprintf(
- // translators: %s: Author URL
- \__(
- 'Your author URL %s
does not return valid JSON for application/activity+json
. Please check if your hosting supports alternate Accept
headers.',
- 'activitypub'
- ),
- $author_url
- )
- );
- }
-
- return true;
- }
-
- /**
- * Check if WebFinger endpoint is accessible and profile request returns correct JSON
- *
- * @return boolean|WP_Error
- */
- public static function is_webfinger_endpoint_accessible() {
- $user = Users::get_by_id( Users::APPLICATION_USER_ID );
- $resource = $user->get_webfinger();
-
- $url = Webfinger::resolve( $resource );
- if ( \is_wp_error( $url ) ) {
- $allowed = array( 'code' => array() );
- $not_accessible = wp_kses(
- // translators: %s: Author URL
- \__(
- 'Your WebFinger endpoint %s
is not accessible. Please check your WordPress setup or permalink structure.',
- 'activitypub'
- ),
- $allowed
- );
- $invalid_response = wp_kses(
- // translators: %s: Author URL
- \__(
- 'Your WebFinger endpoint %s
does not return valid JSON for application/jrd+json
.',
- 'activitypub'
- ),
- $allowed
- );
-
- $health_messages = array(
- 'webfinger_url_not_accessible' => \sprintf(
- $not_accessible,
- $url->get_error_data()
- ),
- 'webfinger_url_invalid_response' => \sprintf(
- // translators: %s: Author URL
- $invalid_response,
- $url->get_error_data()
- ),
- );
- $message = null;
- if ( isset( $health_messages[ $url->get_error_code() ] ) ) {
- $message = $health_messages[ $url->get_error_code() ];
- }
- return new WP_Error(
- $url->get_error_code(),
- $message,
- $url->get_error_data()
- );
- }
-
- return true;
- }
-
- /**
- * Retrieve the URL to the author page for the user with the ID provided.
- *
- * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
- *
- * @param int $author_id Author ID.
- * @param string $author_nicename Optional. The author's nicename (slug). Default empty.
- *
- * @return string The URL to the author's page.
- */
- public static function get_author_posts_url( $author_id, $author_nicename = '' ) {
- global $wp_rewrite;
- $auth_id = (int) $author_id;
- $link = $wp_rewrite->get_author_permastruct();
-
- if ( empty( $link ) ) {
- $file = home_url( '/' );
- $link = $file . '?author=' . $auth_id;
- } else {
- if ( '' === $author_nicename ) {
- $user = get_userdata( $author_id );
- if ( ! empty( $user->user_nicename ) ) {
- $author_nicename = $user->user_nicename;
- }
- }
- $link = str_replace( '%author%', $author_nicename, $link );
- $link = home_url( user_trailingslashit( $link ) );
- }
-
- return $link;
- }
-
- /**
- * Static function for generating site debug data when required.
- *
- * @param array $info The debug information to be added to the core information page.
- * @return array The filtered information
- */
- public static function debug_information( $info ) {
- $info['activitypub'] = array(
- 'label' => __( 'ActivityPub', 'activitypub' ),
- 'fields' => array(
- 'webfinger' => array(
- 'label' => __( 'WebFinger Resource', 'activitypub' ),
- 'value' => Webfinger::get_user_resource( wp_get_current_user()->ID ),
- 'private' => true,
- ),
- 'author_url' => array(
- 'label' => __( 'Author URL', 'activitypub' ),
- 'value' => get_author_posts_url( wp_get_current_user()->ID ),
- 'private' => true,
- ),
- 'plugin_version' => array(
- 'label' => __( 'Plugin Version', 'activitypub' ),
- 'value' => get_plugin_version(),
- 'private' => true,
- ),
- ),
- );
-
- return $info;
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-http.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-http.php
deleted file mode 100644
index 2a8ce7d0..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-http.php
+++ /dev/null
@@ -1,251 +0,0 @@
- 100,
- 'limit_response_size' => 1048576,
- 'redirection' => 3,
- 'user-agent' => "$user_agent; ActivityPub",
- 'headers' => array(
- 'Accept' => 'application/activity+json',
- 'Content-Type' => 'application/activity+json',
- 'Digest' => $digest,
- 'Signature' => $signature,
- 'Date' => $date,
- ),
- 'body' => $body,
- );
-
- $response = \wp_safe_remote_post( $url, $args );
- $code = \wp_remote_retrieve_response_code( $response );
-
- if ( $code >= 400 ) {
- $response = new WP_Error( $code, __( 'Failed HTTP Request', 'activitypub' ), array( 'status' => $code ) );
- }
-
- \do_action( 'activitypub_safe_remote_post_response', $response, $url, $body, $user_id );
-
- return $response;
- }
-
- /**
- * Send a GET Request with the needed HTTP Headers
- *
- * @param string $url The URL endpoint
- * @param bool|int $cached If the result should be cached, or its duration. Default: 1hr.
- *
- * @return array|WP_Error The GET Response or an WP_ERROR
- */
- public static function get( $url, $cached = false ) {
- \do_action( 'activitypub_pre_http_get', $url );
-
- if ( $cached ) {
- $transient_key = self::generate_cache_key( $url );
-
- $response = \get_transient( $transient_key );
-
- if ( $response ) {
- \do_action( 'activitypub_safe_remote_get_response', $response, $url );
-
- return $response;
- }
- }
-
- $date = \gmdate( 'D, d M Y H:i:s T' );
- $signature = Signature::generate_signature( Users::APPLICATION_USER_ID, 'get', $url, $date );
-
- $wp_version = get_masked_wp_version();
-
- /**
- * Filter the HTTP headers user agent.
- *
- * @param string $user_agent The user agent string.
- */
- $user_agent = \apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . \get_bloginfo( 'url' ) );
-
- $args = array(
- 'timeout' => apply_filters( 'activitypub_remote_get_timeout', 100 ),
- 'limit_response_size' => 1048576,
- 'redirection' => 3,
- 'user-agent' => "$user_agent; ActivityPub",
- 'headers' => array(
- 'Accept' => 'application/activity+json',
- 'Content-Type' => 'application/activity+json',
- 'Signature' => $signature,
- 'Date' => $date,
- ),
- );
-
- $response = \wp_safe_remote_get( $url, $args );
- $code = \wp_remote_retrieve_response_code( $response );
-
- if ( $code >= 400 ) {
- $response = new WP_Error( $code, __( 'Failed HTTP Request', 'activitypub' ), array( 'status' => $code ) );
- }
-
- \do_action( 'activitypub_safe_remote_get_response', $response, $url );
-
- if ( $cached ) {
- $cache_duration = $cached;
- if ( ! is_int( $cache_duration ) ) {
- $cache_duration = HOUR_IN_SECONDS;
- }
- \set_transient( $transient_key, $response, $cache_duration );
- }
-
- return $response;
- }
-
- /**
- * Check for URL for Tombstone.
- *
- * @param string $url The URL to check.
- *
- * @return bool True if the URL is a tombstone.
- */
- public static function is_tombstone( $url ) {
- \do_action( 'activitypub_pre_http_is_tombstone', $url );
-
- $response = \wp_safe_remote_get( $url );
- $code = \wp_remote_retrieve_response_code( $response );
-
- if ( in_array( (int) $code, array( 404, 410 ), true ) ) {
- return true;
- }
-
- return false;
- }
-
- public static function generate_cache_key( $url ) {
- return 'activitypub_http_' . \md5( $url );
- }
-
- /**
- * Requests the Data from the Object-URL or Object-Array
- *
- * @param array|string $url_or_object The Object or the Object URL.
- * @param bool $cached If the result should be cached.
- *
- * @return array|WP_Error The Object data as array or WP_Error on failure.
- */
- public static function get_remote_object( $url_or_object, $cached = true ) {
- if ( is_array( $url_or_object ) ) {
- if ( array_key_exists( 'id', $url_or_object ) ) {
- $url = $url_or_object['id'];
- } elseif ( array_key_exists( 'url', $url_or_object ) ) {
- $url = $url_or_object['url'];
- } else {
- return new WP_Error(
- 'activitypub_no_valid_actor_identifier',
- \__( 'The "actor" identifier is not valid', 'activitypub' ),
- array(
- 'status' => 404,
- 'object' => $url_or_object,
- )
- );
- }
- } else {
- $url = $url_or_object;
- }
-
- if ( preg_match( '/^@?' . ACTIVITYPUB_USERNAME_REGEXP . '$/i', $url ) ) {
- $url = Webfinger::resolve( $url );
- }
-
- if ( ! $url ) {
- return new WP_Error(
- 'activitypub_no_valid_actor_identifier',
- \__( 'The "actor" identifier is not valid', 'activitypub' ),
- array(
- 'status' => 404,
- 'object' => $url,
- )
- );
- }
-
- if ( is_wp_error( $url ) ) {
- return $url;
- }
-
- $transient_key = self::generate_cache_key( $url );
-
- // only check the cache if needed.
- if ( $cached ) {
- $data = \get_transient( $transient_key );
-
- if ( $data ) {
- return $data;
- }
- }
-
- if ( ! \wp_http_validate_url( $url ) ) {
- return new WP_Error(
- 'activitypub_no_valid_object_url',
- \__( 'The "object" is/has no valid URL', 'activitypub' ),
- array(
- 'status' => 400,
- 'object' => $url,
- )
- );
- }
-
- $response = self::get( $url );
-
- if ( \is_wp_error( $response ) ) {
- return $response;
- }
-
- $data = \wp_remote_retrieve_body( $response );
- $data = \json_decode( $data, true );
-
- if ( ! $data ) {
- return new WP_Error(
- 'activitypub_invalid_json',
- \__( 'No valid JSON data', 'activitypub' ),
- array(
- 'status' => 400,
- 'object' => $url,
- )
- );
- }
-
- \set_transient( $transient_key, $data, WEEK_IN_SECONDS );
-
- return $data;
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-mention.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-mention.php
deleted file mode 100644
index c2e8792d..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-mention.php
+++ /dev/null
@@ -1,183 +0,0 @@
- MB_IN_BYTES ) {
- return $the_content;
- }
- $tag_stack = array();
- $protected_tags = array(
- 'pre',
- 'code',
- 'textarea',
- 'style',
- 'a',
- );
- $content_with_links = '';
- $in_protected_tag = false;
- foreach ( wp_html_split( $the_content ) as $chunk ) {
- if ( preg_match( '#^$#i', $chunk, $m ) ) {
- $content_with_links .= $chunk;
- continue;
- }
-
- if ( preg_match( '#^<(/)?([a-z-]+)\b[^>]*>$#i', $chunk, $m ) ) {
- $tag = strtolower( $m[2] );
- if ( '/' === $m[1] ) {
- // Closing tag.
- $i = array_search( $tag, $tag_stack );
- // We can only remove the tag from the stack if it is in the stack.
- if ( false !== $i ) {
- $tag_stack = array_slice( $tag_stack, 0, $i );
- }
- } else {
- // Opening tag, add it to the stack.
- $tag_stack[] = $tag;
- }
-
- // If we're in a protected tag, the tag_stack contains at least one protected tag string.
- // The protected tag state can only change when we encounter a start or end tag.
- $in_protected_tag = array_intersect( $tag_stack, $protected_tags );
-
- // Never inspect tags.
- $content_with_links .= $chunk;
- continue;
- }
-
- if ( $in_protected_tag ) {
- // Don't inspect a chunk inside an inspected tag.
- $content_with_links .= $chunk;
- continue;
- }
-
- // Only reachable when there is no protected tag in the stack.
- $content_with_links .= \preg_replace_callback( '/@' . ACTIVITYPUB_USERNAME_REGEXP . '/', array( self::class, 'replace_with_links' ), $chunk );
- }
-
- return $content_with_links;
- }
-
- /**
- * A callback for preg_replace to build the user links
- *
- * @param array $result the preg_match results
- *
- * @return string the final string
- */
- public static function replace_with_links( $result ) {
- $metadata = get_remote_metadata_by_actor( $result[0] );
-
- if (
- ! empty( $metadata ) &&
- ! is_wp_error( $metadata ) &&
- ( ! empty( $metadata['id'] ) || ! empty( $metadata['url'] ) )
- ) {
- $username = ltrim( $result[0], '@' );
- if ( ! empty( $metadata['name'] ) ) {
- $username = $metadata['name'];
- }
- if ( ! empty( $metadata['preferredUsername'] ) ) {
- $username = $metadata['preferredUsername'];
- }
-
- $url = isset( $metadata['url'] ) ? object_to_uri( $metadata['url'] ) : object_to_uri( $metadata['id'] );
-
- return \sprintf( '@%s', esc_url( $url ), esc_html( $username ) );
- }
-
- return $result[0];
- }
-
- /**
- * Get the Inboxes for the mentioned Actors
- *
- * @param array $mentioned The list of Actors that were mentioned
- *
- * @return array The list of Inboxes
- */
- public static function get_inboxes( $mentioned ) {
- $inboxes = array();
-
- foreach ( $mentioned as $actor ) {
- $inbox = self::get_inbox_by_mentioned_actor( $actor );
-
- if ( ! is_wp_error( $inbox ) && $inbox ) {
- $inboxes[] = $inbox;
- }
- }
-
- return $inboxes;
- }
-
- /**
- * Get the inbox from the Remote-Profile of a mentioned Actor
- *
- * @param string $actor The Actor-URL
- *
- * @return string The Inbox-URL
- */
- public static function get_inbox_by_mentioned_actor( $actor ) {
- $metadata = get_remote_metadata_by_actor( $actor );
-
- if ( \is_wp_error( $metadata ) ) {
- return $metadata;
- }
-
- if ( isset( $metadata['endpoints'] ) && isset( $metadata['endpoints']['sharedInbox'] ) ) {
- return $metadata['endpoints']['sharedInbox'];
- }
-
- if ( \array_key_exists( 'inbox', $metadata ) ) {
- return $metadata['inbox'];
- }
-
- return new WP_Error( 'activitypub_no_inbox', \__( 'No "Inbox" found', 'activitypub' ), $metadata );
- }
-
- /**
- * Extract the mentions from the post_content.
- *
- * @param array $mentions The already found mentions.
- * @param string $post_content The post content.
- *
- * @return mixed The discovered mentions.
- */
- public static function extract_mentions( $mentions, $post_content ) {
- \preg_match_all( '/@' . ACTIVITYPUB_USERNAME_REGEXP . '/i', $post_content, $matches );
- foreach ( $matches[0] as $match ) {
- $link = Webfinger::resolve( $match );
- if ( ! is_wp_error( $link ) ) {
- $mentions[ $match ] = $link;
- }
- }
- return $mentions;
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-migration.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-migration.php
deleted file mode 100644
index 0e12ac11..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-migration.php
+++ /dev/null
@@ -1,287 +0,0 @@
- 'ID' ) ) as $user_id ) {
- $followers = get_user_meta( $user_id, 'activitypub_followers', true );
-
- if ( $followers ) {
- foreach ( $followers as $actor ) {
- Followers::add_follower( $user_id, $actor );
- }
- }
- }
-
- Activitypub::flush_rewrite_rules();
- }
-
- /**
- * Clear the cache after updating to 1.3.0
- *
- * @return void
- */
- private static function migrate_from_1_2_0() {
- $user_ids = \get_users(
- array(
- 'fields' => 'ID',
- 'capability__in' => array( 'publish_posts' ),
- )
- );
-
- foreach ( $user_ids as $user_id ) {
- wp_cache_delete( sprintf( Followers::CACHE_KEY_INBOXES, $user_id ), 'activitypub' );
- }
- }
-
- /**
- * Unschedule Hooks after updating to 2.0.0
- *
- * @return void
- */
- private static function migrate_from_2_0_0() {
- wp_clear_scheduled_hook( 'activitypub_send_post_activity' );
- wp_clear_scheduled_hook( 'activitypub_send_update_activity' );
- wp_clear_scheduled_hook( 'activitypub_send_delete_activity' );
-
- wp_unschedule_hook( 'activitypub_send_post_activity' );
- wp_unschedule_hook( 'activitypub_send_update_activity' );
- wp_unschedule_hook( 'activitypub_send_delete_activity' );
-
- $object_type = \get_option( 'activitypub_object_type', ACTIVITYPUB_DEFAULT_OBJECT_TYPE );
- if ( 'article' === $object_type ) {
- \update_option( 'activitypub_object_type', 'wordpress-post-format' );
- }
- }
-
- /**
- * Add the ActivityPub capability to all users that can publish posts
- * Delete old meta to store followers
- *
- * @return void
- */
- private static function migrate_from_2_2_0() {
- // add the ActivityPub capability to all users that can publish posts
- self::add_activitypub_capability();
- }
-
- /**
- * Set the defaults needed for the plugin to work
- *
- * * Add the ActivityPub capability to all users that can publish posts
- *
- * @return void
- */
- public static function add_default_settings() {
- self::add_activitypub_capability();
- }
-
- /**
- * Add the ActivityPub capability to all users that can publish posts
- *
- * @return void
- */
- private static function add_activitypub_capability() {
- // get all WP_User objects that can publish posts
- $users = \get_users(
- array(
- 'capability__in' => array( 'publish_posts' ),
- )
- );
-
- // add ActivityPub capability to all users that can publish posts
- foreach ( $users as $user ) {
- $user->add_cap( 'activitypub' );
- }
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-notification.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-notification.php
deleted file mode 100644
index 72747021..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-notification.php
+++ /dev/null
@@ -1,58 +0,0 @@
-type = $type;
- $this->actor = $actor;
- $this->object = $object;
- $this->target = $target;
- }
-
- /**
- * Send the notification.
- */
- public function send() {
- do_action( 'activitypub_notification', $this );
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-scheduler.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-scheduler.php
deleted file mode 100644
index 4faf51a7..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-scheduler.php
+++ /dev/null
@@ -1,348 +0,0 @@
-post_type ) {
- self::schedule_profile_update( $post->post_author );
- return;
- }
-
- // Do not send activities if post is password protected.
- if ( \post_password_required( $post ) ) {
- return;
- }
-
- // Check if post-type supports ActivityPub.
- $post_types = \get_post_types_by_support( 'activitypub' );
- if ( ! \in_array( $post->post_type, $post_types, true ) ) {
- return;
- }
-
- $type = false;
-
- if (
- 'publish' === $new_status &&
- 'publish' !== $old_status
- ) {
- $type = 'Create';
- } elseif (
- 'publish' === $new_status ||
- ( 'draft' === $new_status &&
- 'draft' !== $old_status )
- ) {
- $type = 'Update';
- } elseif ( 'trash' === $new_status ) {
- $type = 'Delete';
- }
-
- if ( empty( $type ) ) {
- return;
- }
-
- $hook = 'activitypub_send_post';
- $args = array( $post->ID, $type );
-
- if ( false === wp_next_scheduled( $hook, $args ) ) {
- set_wp_object_state( $post, 'federate' );
- \wp_schedule_single_event( \time(), $hook, $args );
- }
- }
-
- /**
- * Schedule Comment Activities
- *
- * transition_comment_status()
- *
- * @param string $new_status New comment status.
- * @param string $old_status Old comment status.
- * @param WP_Comment $comment Comment object.
- */
- public static function schedule_comment_activity( $new_status, $old_status, $comment ) {
- $comment = get_comment( $comment );
-
- // federate only comments that are written by a registered user.
- if ( ! $comment->user_id ) {
- return;
- }
-
- $type = false;
-
- if (
- 'approved' === $new_status &&
- 'approved' !== $old_status
- ) {
- $type = 'Create';
- } elseif ( 'approved' === $new_status ) {
- $type = 'Update';
- \update_comment_meta( $comment->comment_ID, 'activitypub_comment_modified', time(), true );
- } elseif (
- 'trash' === $new_status ||
- 'spam' === $new_status
- ) {
- $type = 'Delete';
- }
-
- if ( empty( $type ) ) {
- return;
- }
-
- // check if comment should be federated or not
- if ( ! should_comment_be_federated( $comment ) ) {
- return;
- }
-
- $hook = 'activitypub_send_comment';
- $args = array( $comment->comment_ID, $type );
-
- if ( false === wp_next_scheduled( $hook, $args ) ) {
- set_wp_object_state( $comment, 'federate' );
- \wp_schedule_single_event( \time(), $hook, $args );
- }
- }
-
- /**
- * Update followers
- *
- * @return void
- */
- public static function update_followers() {
- $number = 5;
-
- if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
- $number = 50;
- }
-
- $number = apply_filters( 'activitypub_update_followers_number', $number );
- $followers = Followers::get_outdated_followers( $number );
-
- foreach ( $followers as $follower ) {
- $meta = get_remote_metadata_by_actor( $follower->get_id(), false );
-
- if ( empty( $meta ) || ! is_array( $meta ) || is_wp_error( $meta ) ) {
- Followers::add_error( $follower->get__id(), $meta );
- } else {
- $follower->from_array( $meta );
- $follower->update();
- }
- }
- }
-
- /**
- * Cleanup followers
- *
- * @return void
- */
- public static function cleanup_followers() {
- $number = 5;
-
- if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
- $number = 50;
- }
-
- $number = apply_filters( 'activitypub_update_followers_number', $number );
- $followers = Followers::get_faulty_followers( $number );
-
- foreach ( $followers as $follower ) {
- $meta = get_remote_metadata_by_actor( $follower->get_url(), false );
-
- if ( is_tombstone( $meta ) ) {
- $follower->delete();
- } elseif ( empty( $meta ) || ! is_array( $meta ) || is_wp_error( $meta ) ) {
- if ( $follower->count_errors() >= 5 ) {
- $follower->delete();
- \wp_schedule_single_event(
- \time(),
- 'activitypub_delete_actor_interactions',
- array( $follower->get_id() )
- );
- } else {
- Followers::add_error( $follower->get__id(), $meta );
- }
- } else {
- $follower->reset_errors();
- }
- }
- }
-
- /**
- * Send a profile update when relevant user meta is updated.
- *
- * @param int $meta_id Meta ID being updated.
- * @param int $user_id User ID being updated.
- * @param string $meta_key Meta key being updated.
- *
- * @return void
- */
- public static function user_meta_update( $meta_id, $user_id, $meta_key ) {
- // don't bother if the user can't publish
- if ( ! \user_can( $user_id, 'activitypub' ) ) {
- return;
- }
- // the user meta fields that affect a profile.
- $fields = array(
- 'activitypub_user_description',
- 'description',
- 'user_url',
- 'display_name',
- );
- if ( in_array( $meta_key, $fields, true ) ) {
- self::schedule_profile_update( $user_id );
- }
- }
-
- /**
- * Send a profile update when a user is updated.
- *
- * @param int $user_id User ID being updated.
- *
- * @return void
- */
- public static function user_update( $user_id ) {
- // don't bother if the user can't publish
- if ( ! \user_can( $user_id, 'activitypub' ) ) {
- return;
- }
-
- self::schedule_profile_update( $user_id );
- }
-
- /**
- * Theme mods only have a dynamic filter so we fudge it like this.
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public static function blog_user_update( $value = null ) {
- self::schedule_profile_update( 0 );
- return $value;
- }
-
- /**
- * Send a profile update to all followers. Gets hooked into all relevant options/meta etc.
- *
- * @param int $user_id The user ID to update (Could be 0 for Blog-User).
- */
- public static function schedule_profile_update( $user_id ) {
- \wp_schedule_single_event(
- \time(),
- 'activitypub_send_update_profile_activity',
- array( $user_id )
- );
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-shortcodes.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-shortcodes.php
deleted file mode 100644
index b32b91dd..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-shortcodes.php
+++ /dev/null
@@ -1,598 +0,0 @@
-ID );
-
- if ( ! $tags ) {
- return '';
- }
-
- $hash_tags = array();
-
- foreach ( $tags as $tag ) {
- $hash_tags[] = \sprintf(
- '%s',
- \esc_url( \get_tag_link( $tag ) ),
- esc_hashtag( $tag->name )
- );
- }
-
- return \implode( ' ', $hash_tags );
- }
-
- /**
- * Generates output for the 'ap_title' Shortcode
- *
- * @param array $atts The Shortcode attributes.
- * @param string $content The ActivityPub post-content.
- * @param string $tag The tag/name of the Shortcode.
- *
- * @return string The post title.
- */
- public static function title( $atts, $content, $tag ) {
- $item = self::get_item();
-
- if ( ! $item ) {
- return '';
- }
-
- return \wp_strip_all_tags( \get_the_title( $item->ID ), true );
- }
-
- /**
- * Generates output for the 'ap_excerpt' Shortcode
- *
- * @param array $atts The Shortcode attributes.
- * @param string $content The ActivityPub post-content.
- * @param string $tag The tag/name of the Shortcode.
- *
- * @return string The post excerpt.
- */
- public static function excerpt( $atts, $content, $tag ) {
- $item = self::get_item();
-
- if ( ! $item ) {
- return '';
- }
-
- $atts = shortcode_atts(
- array( 'length' => ACTIVITYPUB_EXCERPT_LENGTH ),
- $atts,
- $tag
- );
-
- $excerpt_length = intval( $atts['length'] );
-
- if ( 0 === $excerpt_length ) {
- $excerpt_length = ACTIVITYPUB_EXCERPT_LENGTH;
- }
-
- $excerpt = \get_post_field( 'post_excerpt', $item );
-
- if ( 'attachment' === $item->post_type ) {
- // get title of attachment with fallback to alt text.
- $content = wp_get_attachment_caption( $item->ID );
- if ( empty( $content ) ) {
- $content = get_post_meta( $item->ID, '_wp_attachment_image_alt', true );
- }
- } elseif ( '' === $excerpt ) {
- $content = \get_post_field( 'post_content', $item );
-
- // An empty string will make wp_trim_excerpt do stuff we do not want.
- if ( '' !== $content ) {
- $excerpt = \strip_shortcodes( $content );
-
- /** This filter is documented in wp-includes/post-template.php */
- $excerpt = \apply_filters( 'the_content', $excerpt );
- $excerpt = \str_replace( ']]>', ']]>', $excerpt );
- }
- }
-
- // Strip out any remaining tags.
- $excerpt = \wp_strip_all_tags( $excerpt );
-
- $excerpt_more = \apply_filters( 'activitypub_excerpt_more', ' […]' );
- $excerpt_more_len = strlen( $excerpt_more );
-
- // We now have a excerpt, but we need to check it's length, it may be longer than we want for two reasons:
- //
- // * The user has entered a manual excerpt which is longer that what we want.
- // * No manual excerpt exists so we've used the content which might be longer than we want.
- //
- // Either way, let's trim it up if we need too. Also, don't forget to take into account the more indicator
- // as part of the total length.
- //
-
- // Setup a variable to hold the current excerpts length.
- $current_excerpt_length = strlen( $excerpt );
-
- // Setup a variable to keep track of our target length.
- $target_excerpt_length = $excerpt_length - $excerpt_more_len;
-
- // Setup a variable to keep track of the current max length.
- $current_excerpt_max = $target_excerpt_length;
-
- // This is a loop since we can't calculate word break the string after 'the_excpert' filter has run (we would break
- // all kinds of html tags), so we have to cut the excerpt down a bit at a time until we hit our target length.
- while ( $current_excerpt_length > $target_excerpt_length && $current_excerpt_max > 0 ) {
- // Trim the excerpt based on wordwrap() positioning.
- // Note: we're using ' . __( 'The following Template Tags are available:', 'activitypub' ) . '
' . - '[ap_title]
[ap_content apply_filters="yes"]
apply_filters
you can decide if filters (apply_filters( \'the_content\', $content )
) should be applied or not (default is yes
). The values can be yes
or no
. apply_filters
attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '[ap_excerpt length="400"]
the_excerpt
if that is set). If no excerpt is provided, will truncate at length
(optional, default = 400).', 'activitypub' ), array( 'code' => array() ) ) . '[ap_permalink type="url"]
type
can be either: url
or html
(an <a /> tag). type
attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '[ap_shortlink type="url"]
type
can be either url
or html
(an <a /> tag). I can recommend Hum, to prettify the Shortlinks. type
attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '[ap_hashtags]
[ap_hashcats]
[ap_image type=full]
thumbnail
, medium
, large
, full
. type
attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '[ap_author]
[ap_authorurl]
[ap_date]
[ap_time]
[ap_datetime]
[ap_blogurl]
[ap_blogname]
[ap_blogdesc]
' . __( 'You may also use any Shortcode normally available to you on your site, however be aware that Shortcodes may significantly increase the size of your content depending on what they do.', 'activitypub' ) . '
' . - '' . __( 'Note: the old Template Tags are now deprecated and automatically converted to the new ones.', 'activitypub' ) . '
' . - '' . \wp_kses( \__( 'Let me know if you miss a Template Tag.', 'activitypub' ), 'activitypub' ) . '
', - ) -); - -\get_current_screen()->add_help_tab( - array( - 'id' => 'glossary', - 'title' => \__( 'Glossary', 'activitypub' ), - 'content' => - '' . \__( 'The Fediverse is a new word made of two words: "federation" + "universe"', 'activitypub' ) . '
' . - '' . \__( 'It is a federated social network running on free open software on a myriad of computers across the globe. Many independent servers are interconnected and allow people to interact with one another. There\'s no one central site: you choose a server to register. This ensures some decentralization and sovereignty of data. Fediverse (also called Fedi) has no built-in advertisements, no tricky algorithms, no one big corporation dictating the rules. Instead we have small cozy communities of like-minded people. Welcome!', 'activitypub' ) . '
' . - '' . \__( 'For more informations please visit fediverse.party', 'activitypub' ) . '
' . - '' . \__( 'ActivityPub is a decentralized social networking protocol based on the ActivityStreams 2.0 data format. ActivityPub is an official W3C recommended standard published by the W3C Social Web Working Group. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and subscribing to content.', 'activitypub' ) . '
' . - '' . \__( 'WebFinger is used to discover information about people or other entities on the Internet that are identified by a URI using standard Hypertext Transfer Protocol (HTTP) methods over a secure transport. A WebFinger resource returns a JavaScript Object Notation (JSON) object describing the entity that is queried. The JSON object is referred to as the JSON Resource Descriptor (JRD).', 'activitypub' ) . '
' . - '' . \__( 'For a person, the type of information that might be discoverable via WebFinger includes a personal profile address, identity service, telephone number, or preferred avatar. For other entities on the Internet, a WebFinger resource might return JRDs containing link relations that enable a client to discover, for example, that a printer can print in color on A4 paper, the physical location of a server, or other static information.', 'activitypub' ) . '
' . - '' . \__( 'On Mastodon [and other Plattforms], user profiles can be hosted either locally on the same website as yours, or remotely on a completely different website. The same username may be used on a different domain. Therefore, a Mastodon user\'s full mention consists of both the username and the domain, in the form @username@domain
. In practical terms, @user@example.com
is not the same as @user@example.org
. If the domain is not included, Mastodon will try to find a local user named @username
. However, in order to deliver to someone over ActivityPub, the @username@domain
mention is not enough – mentions must be translated to an HTTPS URI first, so that the remote actor\'s inbox and outbox can be found. (This paragraph is copied from the Mastodon Documentation)', 'activitypub' ) . '
' . \__( 'For more informations please visit webfinger.net', 'activitypub' ) . '
' . - '' . \__( 'NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks. The two key goals are being able to get better insights into the user base of distributed social networking and the ability to build tools that allow users to choose the best fitting software and server for their needs.', 'activitypub' ) . '
' . - '' . \__( 'For more informations please visit nodeinfo.diaspora.software', 'activitypub' ) . '
', - ) -); - -\get_current_screen()->set_help_sidebar( - '' . \__( 'For more information:', 'activitypub' ) . '
' . - '' . \__( 'Get support', 'activitypub' ) . '
' . - '' . \__( 'Report an issue', 'activitypub' ) . '
' -); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application.php deleted file mode 100644 index 35c57d64..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application.php +++ /dev/null @@ -1,204 +0,0 @@ - - */ - protected $webfinger; - - public function get_type() { - return 'Application'; - } - - public function get_manually_approves_followers() { - return true; - } - - public function get_id() { - return get_rest_url_by_path( 'application' ); - } - - /** - * Get the User-Url. - * - * @return string The User-Url. - */ - public function get_url() { - return $this->get_id(); - } - - /** - * Returns the User-URL with @-Prefix for the username. - * - * @return string The User-URL with @-Prefix for the username. - */ - public function get_alternate_url() { - return $this->get_url(); - } - - public function get_name() { - return 'application'; - } - - public function get_preferred_username() { - return $this->get_name(); - } - - /** - * Get the User-Icon. - * - * @return array The User-Icon. - */ - public function get_icon() { - // try site icon first - $icon_id = get_option( 'site_icon' ); - - // try custom logo second - if ( ! $icon_id ) { - $icon_id = get_theme_mod( 'custom_logo' ); - } - - $icon_url = false; - - if ( $icon_id ) { - $icon = wp_get_attachment_image_src( $icon_id, 'full' ); - if ( $icon ) { - $icon_url = $icon[0]; - } - } - - if ( ! $icon_url ) { - // fallback to default icon - $icon_url = plugins_url( '/assets/img/wp-logo.png', ACTIVITYPUB_PLUGIN_FILE ); - } - - return array( - 'type' => 'Image', - 'url' => esc_url( $icon_url ), - ); - } - - /** - * Get the User-Header-Image. - * - * @return array|null The User-Header-Image. - */ - public function get_header_image() { - if ( \has_header_image() ) { - return array( - 'type' => 'Image', - 'url' => esc_url( \get_header_image() ), - ); - } - - return null; - } - - public function get_published() { - $first_post = new WP_Query( - array( - 'orderby' => 'date', - 'order' => 'ASC', - 'number' => 1, - ) - ); - - if ( ! empty( $first_post->posts[0] ) ) { - $time = \strtotime( $first_post->posts[0]->post_date_gmt ); - } else { - $time = \time(); - } - - return \gmdate( 'Y-m-d\TH:i:s\Z', $time ); - } - - /** - * Returns the Inbox-API-Endpoint. - * - * @return string The Inbox-Endpoint. - */ - public function get_inbox() { - return get_rest_url_by_path( sprintf( 'actors/%d/inbox', $this->get__id() ) ); - } - - /** - * Returns the Outbox-API-Endpoint. - * - * @return string The Outbox-Endpoint. - */ - public function get_outbox() { - return get_rest_url_by_path( sprintf( 'actors/%d/outbox', $this->get__id() ) ); - } - - /** - * Returns a user@domain type of identifier for the user. - * - * @return string The Webfinger-Identifier. - */ - public function get_webfinger() { - return $this->get_preferred_username() . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST ); - } - - public function get_public_key() { - return array( - 'id' => $this->get_id() . '#main-key', - 'owner' => $this->get_id(), - 'publicKeyPem' => Signature::get_public_key_for( Users::APPLICATION_USER_ID ), - ); - } - - /** - * Get the User-Description. - * - * @return string The User-Description. - */ - public function get_summary() { - return \wpautop( - \wp_kses( - \get_bloginfo( 'description' ), - 'default' - ) - ); - } - - public function get_canonical_url() { - return \home_url(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog.php deleted file mode 100644 index 3c52abff..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog.php +++ /dev/null @@ -1,405 +0,0 @@ - - */ - protected $webfinger; - - /** - * If the User is discoverable. - * - * @see https://docs.joinmastodon.org/spec/activitypub/#discoverable - * - * @context http://joinmastodon.org/ns#discoverable - * - * @var boolean - */ - protected $discoverable; - - /** - * Restrict posting to mods - * - * @see https://join-lemmy.org/docs/contributors/05-federation.html - * - * @var boolean - */ - protected $posting_restricted_to_mods; - - public function get_manually_approves_followers() { - return false; - } - - public function get_discoverable() { - return true; - } - - /** - * Get the User-ID. - * - * @return string The User-ID. - */ - public function get_id() { - return $this->get_url(); - } - - /** - * Get the type of the object. - * - * If the Blog is in "single user" mode, return "Person" insted of "Group". - * - * @return string The type of the object. - */ - public function get_type() { - if ( is_single_user() ) { - return 'Person'; - } else { - return 'Group'; - } - } - - /** - * Get the User-Name. - * - * @return string The User-Name. - */ - public function get_name() { - return \wp_strip_all_tags( - \html_entity_decode( - \get_bloginfo( 'name' ), - \ENT_QUOTES, - 'UTF-8' - ) - ); - } - - /** - * Get the User-Description. - * - * @return string The User-Description. - */ - public function get_summary() { - return \wpautop( - \wp_kses( - \get_bloginfo( 'description' ), - 'default' - ) - ); - } - - /** - * Get the User-Url. - * - * @return string The User-Url. - */ - public function get_url() { - return \esc_url( \trailingslashit( get_home_url() ) . '@' . $this->get_preferred_username() ); - } - - /** - * Get blog's homepage URL. - * - * @return string The User-Url. - */ - public function get_alternate_url() { - return \esc_url( \trailingslashit( get_home_url() ) ); - } - - /** - * Generate a default Username. - * - * @return string The auto-generated Username. - */ - public static function get_default_username() { - // check if domain host has a subdomain - $host = \wp_parse_url( \get_home_url(), \PHP_URL_HOST ); - $host = \preg_replace( '/^www\./i', '', $host ); - - /** - * Filter the default blog username. - * - * @param string $host The default username. - */ - return apply_filters( 'activitypub_default_blog_username', $host ); - } - - /** - * Get the preferred User-Name. - * - * @return string The User-Name. - */ - public function get_preferred_username() { - $username = \get_option( 'activitypub_blog_user_identifier' ); - - if ( $username ) { - return $username; - } - - return self::get_default_username(); - } - - /** - * Get the User-Icon. - * - * @return array The User-Icon. - */ - public function get_icon() { - // try site icon first - $icon_id = get_option( 'site_icon' ); - - // try custom logo second - if ( ! $icon_id ) { - $icon_id = get_theme_mod( 'custom_logo' ); - } - - $icon_url = false; - - if ( $icon_id ) { - $icon = wp_get_attachment_image_src( $icon_id, 'full' ); - if ( $icon ) { - $icon_url = $icon[0]; - } - } - - if ( ! $icon_url ) { - // fallback to default icon - $icon_url = plugins_url( '/assets/img/wp-logo.png', ACTIVITYPUB_PLUGIN_FILE ); - } - - return array( - 'type' => 'Image', - 'url' => esc_url( $icon_url ), - ); - } - - /** - * Get the User-Header-Image. - * - * @return array|null The User-Header-Image. - */ - public function get_image() { - if ( \has_header_image() ) { - return array( - 'type' => 'Image', - 'url' => esc_url( \get_header_image() ), - ); - } - - return null; - } - - public function get_published() { - $first_post = new WP_Query( - array( - 'orderby' => 'date', - 'order' => 'ASC', - 'number' => 1, - ) - ); - - if ( ! empty( $first_post->posts[0] ) ) { - $time = \strtotime( $first_post->posts[0]->post_date_gmt ); - } else { - $time = \time(); - } - - return \gmdate( 'Y-m-d\TH:i:s\Z', $time ); - } - - public function get_canonical_url() { - return \home_url(); - } - - public function get_moderators() { - if ( is_single_user() || 'Group' !== $this->get_type() ) { - return null; - } - - return get_rest_url_by_path( 'collections/moderators' ); - } - - public function get_attributed_to() { - if ( is_single_user() || 'Group' !== $this->get_type() ) { - return null; - } - - return get_rest_url_by_path( 'collections/moderators' ); - } - - public function get_public_key() { - return array( - 'id' => $this->get_id() . '#main-key', - 'owner' => $this->get_id(), - 'publicKeyPem' => Signature::get_public_key_for( $this->get__id() ), - ); - } - - public function get_posting_restricted_to_mods() { - if ( 'Group' === $this->get_type() ) { - return true; - } - - return null; - } - - /** - * Returns the Inbox-API-Endpoint. - * - * @return string The Inbox-Endpoint. - */ - public function get_inbox() { - return get_rest_url_by_path( sprintf( 'actors/%d/inbox', $this->get__id() ) ); - } - - /** - * Returns the Outbox-API-Endpoint. - * - * @return string The Outbox-Endpoint. - */ - public function get_outbox() { - return get_rest_url_by_path( sprintf( 'actors/%d/outbox', $this->get__id() ) ); - } - - /** - * Returns the Followers-API-Endpoint. - * - * @return string The Followers-Endpoint. - */ - public function get_followers() { - return get_rest_url_by_path( sprintf( 'actors/%d/followers', $this->get__id() ) ); - } - - /** - * Returns the Following-API-Endpoint. - * - * @return string The Following-Endpoint. - */ - public function get_following() { - return get_rest_url_by_path( sprintf( 'actors/%d/following', $this->get__id() ) ); - } - - public function get_endpoints() { - $endpoints = null; - - if ( ACTIVITYPUB_SHARED_INBOX_FEATURE ) { - $endpoints = array( - 'sharedInbox' => get_rest_url_by_path( 'inbox' ), - ); - } - - return $endpoints; - } - - /** - * Returns a user@domain type of identifier for the user. - * - * @return string The Webfinger-Identifier. - */ - public function get_webfinger() { - return $this->get_preferred_username() . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST ); - } - - /** - * Returns the Featured-API-Endpoint. - * - * @return string The Featured-Endpoint. - */ - public function get_featured() { - return get_rest_url_by_path( sprintf( 'actors/%d/collections/featured', $this->get__id() ) ); - } - - public function get_indexable() { - if ( \get_option( 'blog_public', 1 ) ) { - return true; - } else { - return false; - } - } - - /** - * Extend the User-Output with Attachments. - * - * @return array The extended User-Output. - */ - public function get_attachment() { - $array = array(); - - $array[] = array( - 'type' => 'PropertyValue', - 'name' => \__( 'Blog', 'activitypub' ), - 'value' => \html_entity_decode( - sprintf( - '%s', - \esc_attr( \home_url( '/' ) ), - \esc_url( \home_url( '/' ) ), - \wp_parse_url( \home_url( '/' ), \PHP_URL_HOST ) - ), - \ENT_QUOTES, - 'UTF-8' - ), - ); - - // Add support for FEP-fb2a, for more information see FEDERATION.md - $array[] = array( - 'type' => 'Link', - 'name' => \__( 'Blog', 'activitypub' ), - 'href' => \esc_url( \home_url( '/' ) ), - 'rel' => array( 'me' ), - ); - - return $array; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-follower.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-follower.php deleted file mode 100644 index 4590ea49..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-follower.php +++ /dev/null @@ -1,395 +0,0 @@ -_id, 'activitypub_errors' ); - } - - /** - * Get the Summary. - * - * @return int The Summary. - */ - public function get_summary() { - if ( isset( $this->summary ) ) { - return $this->summary; - } - - return ''; - } - - /** - * Getter for URL attribute. - * - * Falls back to ID, if no URL is set. This is relevant for - * Plattforms like Lemmy, where the ID is the URL. - * - * @return string The URL. - */ - public function get_url() { - if ( $this->url ) { - return $this->url; - } - - return $this->id; - } - - /** - * Reset (delete) all errors. - * - * @return void - */ - public function reset_errors() { - delete_post_meta( $this->_id, 'activitypub_errors' ); - } - - /** - * Count the errors. - * - * @return int The number of errors. - */ - public function count_errors() { - $errors = $this->get_errors(); - - if ( is_array( $errors ) && ! empty( $errors ) ) { - return count( $errors ); - } - - return 0; - } - - /** - * Return the latest error message. - * - * @return string The error message. - */ - public function get_latest_error_message() { - $errors = $this->get_errors(); - - if ( is_array( $errors ) && ! empty( $errors ) ) { - return reset( $errors ); - } - - return ''; - } - - /** - * Update the current Follower-Object. - * - * @return void - */ - public function update() { - $this->save(); - } - - /** - * Validate the current Follower-Object. - * - * @return boolean True if the verification was successful. - */ - public function is_valid() { - // the minimum required attributes - $required_attributes = array( - 'id', - 'preferredUsername', - 'inbox', - 'publicKey', - 'publicKeyPem', - ); - - foreach ( $required_attributes as $attribute ) { - if ( ! $this->get( $attribute ) ) { - return false; - } - } - - return true; - } - - /** - * Save the current Follower-Object. - * - * @return int|WP_Error The Post-ID or an WP_Error. - */ - public function save() { - if ( ! $this->is_valid() ) { - return new WP_Error( 'activitypub_invalid_follower', __( 'Invalid Follower', 'activitypub' ), array( 'status' => 400 ) ); - } - - if ( ! $this->get__id() ) { - global $wpdb; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching - $post_id = $wpdb->get_var( - $wpdb->prepare( - "SELECT ID FROM $wpdb->posts WHERE guid=%s", - esc_sql( $this->get_id() ) - ) - ); - - if ( $post_id ) { - $post = get_post( $post_id ); - $this->set__id( $post->ID ); - } - } - - $post_id = $this->get__id(); - - $args = array( - 'ID' => $post_id, - 'guid' => esc_url_raw( $this->get_id() ), - 'post_title' => wp_strip_all_tags( sanitize_text_field( $this->get_name() ) ), - 'post_author' => 0, - 'post_type' => Followers::POST_TYPE, - 'post_name' => esc_url_raw( $this->get_id() ), - 'post_excerpt' => sanitize_text_field( wp_kses( $this->get_summary(), 'user_description' ) ), - 'post_status' => 'publish', - 'meta_input' => $this->get_post_meta_input(), - ); - - if ( ! empty( $post_id ) ) { - // If this is an update, prevent the "followed" date from being - // overwritten by the current date. - $post = get_post( $post_id ); - $args['post_date'] = $post->post_date; - $args['post_date_gmt'] = $post->post_date_gmt; - } - - $post_id = wp_insert_post( $args ); - $this->_id = $post_id; - - return $post_id; - } - - /** - * Upsert the current Follower-Object. - * - * @return int|WP_Error The Post-ID or an WP_Error. - */ - public function upsert() { - return $this->save(); - } - - /** - * Delete the current Follower-Object. - * - * Beware that this os deleting a Follower for ALL users!!! - * - * To delete only the User connection (unfollow) - * @see \Activitypub\Rest\Followers::remove_follower() - * - * @return void - */ - public function delete() { - wp_delete_post( $this->_id ); - } - - /** - * Update the post meta. - * - * @return void - */ - protected function get_post_meta_input() { - $meta_input = array(); - $meta_input['activitypub_inbox'] = $this->get_shared_inbox(); - $meta_input['activitypub_actor_json'] = $this->to_json(); - - return $meta_input; - } - - /** - * Get the icon. - * - * Sets a fallback to better handle API and HTML outputs. - * - * @return array The icon. - */ - public function get_icon() { - if ( isset( $this->icon['url'] ) ) { - return $this->icon; - } - - return array( - 'type' => 'Image', - 'mediaType' => 'image/jpeg', - 'url' => ACTIVITYPUB_PLUGIN_URL . 'assets/img/mp.jpg', - ); - } - - /** - * Get Name. - * - * Tries to extract a name from the URL or ID if not set. - * - * @return string The name. - */ - public function get_name() { - if ( $this->name ) { - return $this->name; - } elseif ( $this->preferred_username ) { - return $this->preferred_username; - } - - return $this->extract_name_from_uri(); - } - - /** - * The preferred Username. - * - * Tries to extract a name from the URL or ID if not set. - * - * @return string The preferred Username. - */ - public function get_preferred_username() { - if ( $this->preferred_username ) { - return $this->preferred_username; - } - - return $this->extract_name_from_uri(); - } - - /** - * Get the Icon URL (Avatar) - * - * @return string The URL to the Avatar. - */ - public function get_icon_url() { - $icon = $this->get_icon(); - - if ( ! $icon ) { - return ''; - } - - if ( is_array( $icon ) ) { - return $icon['url']; - } - - return $icon; - } - - /** - * Get the Icon URL (Avatar) - * - * @return string The URL to the Avatar. - */ - public function get_image_url() { - $image = $this->get_image(); - - if ( ! $image ) { - return ''; - } - - if ( is_array( $image ) ) { - return $image['url']; - } - - return $image; - } - - /** - * Get the shared inbox, with a fallback to the inbox. - * - * @return string|null The URL to the shared inbox, the inbox or null. - */ - public function get_shared_inbox() { - if ( ! empty( $this->get_endpoints()['sharedInbox'] ) ) { - return $this->get_endpoints()['sharedInbox']; - } elseif ( ! empty( $this->get_inbox() ) ) { - return $this->get_inbox(); - } - - return null; - } - - /** - * Convert a Custom-Post-Type input to an Activitypub\Model\Follower. - * - * @return string The JSON string. - * - * @return array Activitypub\Model\Follower - */ - public static function init_from_cpt( $post ) { - $actor_json = get_post_meta( $post->ID, 'activitypub_actor_json', true ); - $object = self::init_from_json( $actor_json ); - $object->set__id( $post->ID ); - $object->set_id( $post->guid ); - $object->set_name( $post->post_title ); - $object->set_summary( $post->post_excerpt ); - $object->set_published( gmdate( 'Y-m-d H:i:s', strtotime( $post->post_date ) ) ); - $object->set_updated( gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) ) ); - - return $object; - } - - /** - * Infer a shortname from the Actor ID or URL. Used only for fallbacks, - * we will try to use what's supplied. - * - * @return string Hopefully the name of the Follower. - */ - protected function extract_name_from_uri() { - // prefer the URL, but fall back to the ID. - if ( $this->url ) { - $name = $this->url; - } else { - $name = $this->id; - } - - if ( \filter_var( $name, FILTER_VALIDATE_URL ) ) { - $name = \rtrim( $name, '/' ); - $path = \wp_parse_url( $name, PHP_URL_PATH ); - - if ( $path ) { - if ( \strpos( $name, '@' ) !== false ) { - // expected: https://example.com/@user (default URL pattern) - $name = \preg_replace( '|^/@?|', '', $path ); - } else { - // expected: https://example.com/users/user (default ID pattern) - $parts = \explode( '/', $path ); - $name = \array_pop( $parts ); - } - } - } elseif ( - \is_email( $name ) || - \strpos( $name, 'acct' ) === 0 || - \strpos( $name, '@' ) === 0 - ) { - // expected: user@example.com or acct:user@example (WebFinger) - $name = \ltrim( $name, '@' ); - $name = \ltrim( $name, 'acct:' ); - $parts = \explode( '@', $name ); - $name = $parts[0]; - } - - return $name; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-post.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-post.php deleted file mode 100644 index a4229539..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-post.php +++ /dev/null @@ -1,136 +0,0 @@ -post = $post; - $this->object = $transformer->to_object(); - } - } - - /** - * Returns the User ID. - * - * @return int the User ID. - */ - public function get_user_id() { - return apply_filters( 'activitypub_post_user_id', $this->post->post_author, $this->post ); - } - - /** - * Converts this Object into an Array. - * - * @return array the array representation of a Post. - */ - public function to_array() { - return \apply_filters( 'activitypub_post', $this->object->to_array(), $this->post ); - } - - /** - * Returns the Actor of this Object. - * - * @return string The URL of the Actor. - */ - public function get_actor() { - $user = Users::get_by_id( $this->get_user_id() ); - - return $user->get_url(); - } - - /** - * Converts this Object into a JSON String - * - * @return string - */ - public function to_json() { - return \wp_json_encode( $this->to_array(), \JSON_HEX_TAG | \JSON_HEX_AMP | \JSON_HEX_QUOT ); - } - - /** - * Returns the URL of an Activity Object - * - * @return string - */ - public function get_url() { - return $this->object->get_url(); - } - - /** - * Returns the ID of an Activity Object - * - * @return string - */ - public function get_id() { - return $this->object->get_id(); - } - - /** - * Returns a list of Image Attachments - * - * @return array - */ - public function get_attachments() { - return $this->object->get_attachment(); - } - - /** - * Returns a list of Tags, used in the Post - * - * @return array - */ - public function get_tags() { - return $this->object->get_tag(); - } - - /** - * Returns the as2 object-type for a given post - * - * @return string the object-type - */ - public function get_object_type() { - return $this->object->get_type(); - } - - /** - * Returns the content for the ActivityPub Item. - * - * @return string the content - */ - public function get_content() { - return $this->object->get_content(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-user.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-user.php deleted file mode 100644 index dc6cb6c0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-user.php +++ /dev/null @@ -1,336 +0,0 @@ - - */ - protected $webfinger; - - public function get_type() { - return 'Person'; - } - - public static function from_wp_user( $user_id ) { - if ( is_user_disabled( $user_id ) ) { - return new WP_Error( - 'activitypub_user_not_found', - \__( 'User not found', 'activitypub' ), - array( 'status' => 404 ) - ); - } - - $object = new static(); - $object->_id = $user_id; - - return $object; - } - - /** - * Get the User-ID. - * - * @return string The User-ID. - */ - public function get_id() { - return $this->get_url(); - } - - /** - * Get the User-Name. - * - * @return string The User-Name. - */ - public function get_name() { - return \esc_attr( \get_the_author_meta( 'display_name', $this->_id ) ); - } - - /** - * Get the User-Description. - * - * @return string The User-Description. - */ - public function get_summary() { - $description = get_user_meta( $this->_id, 'activitypub_user_description', true ); - if ( empty( $description ) ) { - $description = get_user_meta( $this->_id, 'description', true ); - } - return \wpautop( \wp_kses( $description, 'default' ) ); - } - - /** - * Get the User-Url. - * - * @return string The User-Url. - */ - public function get_url() { - return \esc_url( \get_author_posts_url( $this->_id ) ); - } - - /** - * Returns the User-URL with @-Prefix for the username. - * - * @return string The User-URL with @-Prefix for the username. - */ - public function get_alternate_url() { - return \esc_url( \trailingslashit( get_home_url() ) . '@' . $this->get_preferred_username() ); - } - - public function get_preferred_username() { - return \esc_attr( \get_the_author_meta( 'login', $this->_id ) ); - } - - public function get_icon() { - $icon = \esc_url( - \get_avatar_url( - $this->_id, - array( 'size' => 120 ) - ) - ); - - return array( - 'type' => 'Image', - 'url' => $icon, - ); - } - - public function get_image() { - if ( \has_header_image() ) { - $image = \esc_url( \get_header_image() ); - return array( - 'type' => 'Image', - 'url' => $image, - ); - } - - return null; - } - - public function get_published() { - return \gmdate( 'Y-m-d\TH:i:s\Z', \strtotime( \get_the_author_meta( 'registered', $this->_id ) ) ); - } - - public function get_public_key() { - return array( - 'id' => $this->get_id() . '#main-key', - 'owner' => $this->get_id(), - 'publicKeyPem' => Signature::get_public_key_for( $this->get__id() ), - ); - } - - /** - * Returns the Inbox-API-Endpoint. - * - * @return string The Inbox-Endpoint. - */ - public function get_inbox() { - return get_rest_url_by_path( sprintf( 'actors/%d/inbox', $this->get__id() ) ); - } - - /** - * Returns the Outbox-API-Endpoint. - * - * @return string The Outbox-Endpoint. - */ - public function get_outbox() { - return get_rest_url_by_path( sprintf( 'actors/%d/outbox', $this->get__id() ) ); - } - - /** - * Returns the Followers-API-Endpoint. - * - * @return string The Followers-Endpoint. - */ - public function get_followers() { - return get_rest_url_by_path( sprintf( 'actors/%d/followers', $this->get__id() ) ); - } - - /** - * Returns the Following-API-Endpoint. - * - * @return string The Following-Endpoint. - */ - public function get_following() { - return get_rest_url_by_path( sprintf( 'actors/%d/following', $this->get__id() ) ); - } - - /** - * Returns the Featured-API-Endpoint. - * - * @return string The Featured-Endpoint. - */ - public function get_featured() { - return get_rest_url_by_path( sprintf( 'actors/%d/collections/featured', $this->get__id() ) ); - } - - public function get_endpoints() { - $endpoints = null; - - if ( ACTIVITYPUB_SHARED_INBOX_FEATURE ) { - $endpoints = array( - 'sharedInbox' => get_rest_url_by_path( 'inbox' ), - ); - } - - return $endpoints; - } - - /** - * Extend the User-Output with Attachments. - * - * @return array The extended User-Output. - */ - public function get_attachment() { - $extra_fields = get_actor_extra_fields( $this->_id ); - - $attachments = array(); - - foreach ( $extra_fields as $post ) { - $content = \get_the_content( null, false, $post ); - $content = \make_clickable( $content ); - $content = \do_blocks( $content ); - $content = \wptexturize( $content ); - $content = \wp_filter_content_tags( $content ); - // replace script and style elements - $content = \preg_replace( '@<(script|style)[^>]*?>.*?\\1>@si', '', $content ); - $content = \strip_shortcodes( $content ); - $content = \trim( \preg_replace( '/[\n\r\t]/', '', $content ) ); - - $attachments[] = array( - 'type' => 'PropertyValue', - 'name' => \get_the_title( $post ), - 'value' => \html_entity_decode( - $content, - \ENT_QUOTES, - 'UTF-8' - ), - ); - - $link_added = false; - - // Add support for FEP-fb2a, for more information see FEDERATION.md - if ( \class_exists( '\WP_HTML_Tag_Processor' ) ) { - $tags = new \WP_HTML_Tag_Processor( $content ); - $tags->next_tag(); - - if ( 'P' === $tags->get_tag() ) { - $tags->next_tag(); - } - - if ( 'A' === $tags->get_tag() ) { - $tags->set_bookmark( 'link' ); - if ( ! $tags->next_tag() ) { - $tags->seek( 'link' ); - $attachment = array( - 'type' => 'Link', - 'name' => \get_the_title( $post ), - 'href' => \esc_url( $tags->get_attribute( 'href' ) ), - 'rel' => explode( ' ', $tags->get_attribute( 'rel' ) ), - ); - - $link_added = true; - } - } - } - - if ( ! $link_added ) { - $attachment = array( - 'type' => 'Note', - 'name' => \get_the_title( $post ), - 'content' => \html_entity_decode( - $content, - \ENT_QUOTES, - 'UTF-8' - ), - ); - } - - $attachments[] = $attachment; - } - - return $attachments; - } - - /** - * Returns a user@domain type of identifier for the user. - * - * @return string The Webfinger-Identifier. - */ - public function get_webfinger() { - return $this->get_preferred_username() . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST ); - } - - public function get_canonical_url() { - return $this->get_url(); - } - - public function get_streams() { - return null; - } - - public function get_tag() { - return array(); - } - - public function get_indexable() { - if ( \get_option( 'blog_public', 1 ) ) { - return true; - } else { - return false; - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-actors.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-actors.php deleted file mode 100644 index f5854a68..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-actors.php +++ /dev/null @@ -1,150 +0,0 @@ -[\w\-\.]+)', - array( - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( self::class, 'get' ), - 'args' => self::request_parameters(), - 'permission_callback' => '__return_true', - ), - ) - ); - - \register_rest_route( - ACTIVITYPUB_REST_NAMESPACE, - '/(users|actors)/(?P' . $block['attrs']['url'] . '
'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-buddypress.php b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-buddypress.php deleted file mode 100644 index 8d71c1d2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-buddypress.php +++ /dev/null @@ -1,76 +0,0 @@ -url = bp_core_get_user_domain( $author_id ); //add BP member profile URL as user URL - - // add BuddyPress' cover_image instead of WordPress' header_image - $cover_image_url = bp_attachments_get_attachment( 'url', array( 'item_id' => $author_id ) ); - - if ( $cover_image_url ) { - $object->image = array( - 'type' => 'Image', - 'url' => $cover_image_url, - ); - } - - // change profile URL to BuddyPress' profile URL - $object->attachment['profile_url'] = array( - 'type' => 'PropertyValue', - 'name' => \__( 'Profile', 'activitypub' ), - 'value' => \html_entity_decode( - sprintf( - '%s', - \esc_attr( bp_core_get_user_domain( $author_id ) ), - \bp_core_get_user_domain( $author_id ), - \wp_parse_url( \bp_core_get_user_domain( $author_id ), \PHP_URL_HOST ) - ), - \ENT_QUOTES, - 'UTF-8' - ), - ); - - // replace blog URL on multisite - if ( is_multisite() ) { - $user_blogs = get_blogs_of_user( $author_id ); //get sites of user to send as AP metadata - - if ( ! empty( $user_blogs ) ) { - unset( $object->attachment['blog_url'] ); - - foreach ( $user_blogs as $blog ) { - if ( 1 !== $blog->userblog_id ) { - $object->attachment[] = array( - 'type' => 'PropertyValue', - 'name' => $blog->blogname, - 'value' => \html_entity_decode( - sprintf( - '%s', - \esc_attr( $blog->siteurl ), - $blog->siteurl, - \wp_parse_url( $blog->siteurl, \PHP_URL_HOST ) - ), - \ENT_QUOTES, - 'UTF-8' - ), - ); - } - } - } - } - - return $object; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-enable-mastodon-apps.php b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-enable-mastodon-apps.php deleted file mode 100644 index 6c643b10..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-enable-mastodon-apps.php +++ /dev/null @@ -1,468 +0,0 @@ -get_id() ); - - if ( $acct && ! is_wp_error( $acct ) ) { - $acct = \str_replace( 'acct:', '', $acct ); - } else { - $acct = $item->get_url(); - } - - $account = new Account(); - $account->id = \strval( $item->get__id() ); - $account->username = $item->get_preferred_username(); - $account->acct = $acct; - $account->display_name = $item->get_name(); - $account->url = $item->get_url(); - $account->uri = $item->get_id(); - $account->avatar = $item->get_icon_url(); - $account->avatar_static = $item->get_icon_url(); - $account->created_at = new DateTime( $item->get_published() ); - $account->last_status_at = new DateTime( $item->get_published() ); - $account->note = $item->get_summary(); - $account->header = $item->get_image_url(); - $account->header_static = $item->get_image_url(); - $account->followers_count = 0; - $account->following_count = 0; - $account->statuses_count = 0; - $account->bot = false; - $account->locked = false; - $account->group = false; - $account->discoversable = false; - $account->indexable = false; - $account->hide_collections = false; - $account->noindex = false; - $account->fields = array(); - $account->emojis = array(); - $account->roles = array(); - - return $account; - }, - $activitypub_followers - ); - - $followers = array_merge( $mastodon_followers, $followers ); - - return $followers; - } - - /** - * Add followers count to Mastodon API - * - * @param Enable_Mastodon_Apps\Entity\Account $account The account - * @param int $user_id The user id - * - * @return Enable_Mastodon_Apps\Entity\Account The filtered Account - */ - public static function api_account_add_followers( $account, $user_id ) { - if ( ! $account instanceof Account ) { - return $account; - } - - $user = Users::get_by_various( $user_id ); - - if ( ! $user || is_wp_error( $user ) ) { - return $account; - } - - $header = $user->get_image(); - if ( $header ) { - $account->header = $header['url']; - $account->header_static = $header['url']; - } - - foreach ( $user->get_attachment() as $attachment ) { - if ( 'PropertyValue' === $attachment['type'] ) { - $account->fields[] = array( - 'name' => $attachment['name'], - 'value' => $attachment['value'], - ); - } - } - - $account->acct = $user->get_preferred_username(); - $account->note = $user->get_summary(); - - $account->followers_count = Followers::count_followers( $user->get__id() ); - return $account; - } - - /** - * Resolve external accounts for Mastodon API - * - * @param Enable_Mastodon_Apps\Entity\Account $user_data The user data - * @param string $user_id The user id - * - * @return Enable_Mastodon_Apps\Entity\Account The filtered Account - */ - public static function api_account_external( $user_data, $user_id ) { - if ( $user_data || ( is_numeric( $user_id ) && $user_id ) ) { - // Only augment. - return $user_data; - } - - $user = Users::get_by_various( $user_id ); - - if ( $user && ! is_wp_error( $user ) ) { - return $user_data; - } - - $uri = Webfinger_Util::resolve( $user_id ); - - if ( ! $uri || is_wp_error( $uri ) ) { - return $user_data; - } - - $account = self::get_account_for_actor( $uri ); - if ( $account ) { - return $account; - } - - return $user_data; - } - - private static function get_account_for_actor( $uri ) { - if ( ! is_string( $uri ) ) { - return null; - } - $data = get_remote_metadata_by_actor( $uri ); - - if ( ! $data || is_wp_error( $data ) ) { - return null; - } - $account = new Account(); - - $acct = Webfinger_Util::uri_to_acct( $uri ); - if ( str_starts_with( $acct, 'acct:' ) ) { - $acct = substr( $acct, 5 ); - } - - $account->id = $acct; - $account->username = $acct; - $account->acct = $acct; - $account->display_name = $data['name']; - $account->url = $uri; - - if ( ! empty( $data['summary'] ) ) { - $account->note = $data['summary']; - } - - if ( - isset( $data['icon']['type'] ) && - isset( $data['icon']['url'] ) && - 'Image' === $data['icon']['type'] - ) { - $account->avatar = $data['icon']['url']; - $account->avatar_static = $data['icon']['url']; - } - - if ( isset( $data['image'] ) ) { - $account->header = $data['image']['url']; - $account->header_static = $data['image']['url']; - } - if ( ! isset( $data['published'] ) ) { - $data['published'] = 'now'; - } - $account->created_at = new DateTime( $data['published'] ); - - return $account; - } - - public static function api_search_by_url( $search_data, $request ) { - $p = \wp_parse_url( $request->get_param( 'q' ) ); - if ( ! $p || ! isset( $p['host'] ) ) { - return $search_data; - } - - $object = Http::get_remote_object( $request->get_param( 'q' ), true ); - if ( is_wp_error( $object ) || ! isset( $object['attributedTo'] ) ) { - return $search_data; - } - - $account = self::get_account_for_actor( $object['attributedTo'] ); - if ( ! $account ) { - return $search_data; - } - - $status = self::activity_to_status( $object, $account ); - if ( $status ) { - $search_data['statuses'][] = $status; - } - - return $search_data; - } - - public static function api_search( $search_data, $request ) { - $user_id = \get_current_user_id(); - if ( ! $user_id ) { - return $search_data; - } - - $q = $request->get_param( 'q' ); - if ( ! $q ) { - return $search_data; - } - $q = sanitize_text_field( wp_unslash( $q ) ); - - $followers = Followers::get_followers( $user_id, 40, null, array( 's' => $q ) ); - if ( ! $followers ) { - return $search_data; - } - - foreach ( $followers as $follower ) { - $acct = Webfinger_Util::uri_to_acct( $follower->get_id() ); - - if ( $acct && ! is_wp_error( $acct ) ) { - $acct = \str_replace( 'acct:', '', $acct ); - } else { - $acct = $follower->get_url(); - } - - $account = new Account(); - $account->id = \strval( $follower->get__id() ); - $account->username = $follower->get_preferred_username(); - $account->acct = $acct; - $account->display_name = $follower->get_name(); - $account->url = $follower->get_url(); - $account->uri = $follower->get_id(); - $account->avatar = $follower->get_icon_url(); - $account->avatar_static = $follower->get_icon_url(); - $account->created_at = new DateTime( $follower->get_published() ); - $account->last_status_at = new DateTime( $follower->get_published() ); - $account->note = $follower->get_summary(); - $account->header = $follower->get_image_url(); - $account->header_static = $follower->get_image_url(); - - $search_data['accounts'][] = $account; - } - - return $search_data; - } - - public static function api_get_posts_query_args( $args ) { - if ( isset( $args['author'] ) && is_string( $args['author'] ) ) { - $uri = Webfinger_Util::resolve( $args['author'] ); - if ( $uri && ! is_wp_error( $uri ) ) { - $args['activitypub'] = $uri; - unset( $args['author'] ); - } - } - - return $args; - } - - private static function activity_to_status( $item, $account ) { - if ( isset( $item['object'] ) ) { - $object = $item['object']; - } else { - $object = $item; - } - - if ( ! isset( $object['type'] ) || 'Note' !== $object['type'] ) { - return null; - } - - $status = new Status(); - $status->id = $object['id']; - $status->created_at = new DateTime( $object['published'] ); - $status->content = $object['content']; - $status->account = $account; - - if ( ! empty( $object['inReplyTo'] ) ) { - $status->in_reply_to_id = $object['inReplyTo']; - } - - if ( ! empty( $object['visibility'] ) ) { - $status->visibility = $object['visibility']; - } - if ( ! empty( $object['url'] ) ) { - $status->url = $object['url']; - $status->uri = $object['url']; - } else { - $status->uri = $object['id']; - } - - if ( ! empty( $object['attachment'] ) ) { - $status->media_attachments = array_map( - function ( $attachment ) { - $default_attachment = array( - 'url' => null, - 'mediaType' => null, - 'name' => null, - 'width' => 0, - 'height' => 0, - 'blurhash' => null, - ); - - $attachment = array_merge( $default_attachment, $attachment ); - - $media_attachment = new Media_Attachment(); - $media_attachment->id = $attachment['url']; - $media_attachment->type = strtok( $attachment['mediaType'], '/' ); - $media_attachment->url = $attachment['url']; - $media_attachment->preview_url = $attachment['url']; - $media_attachment->description = $attachment['name']; - if ( $attachment['blurhash'] ) { - $media_attachment->blurhash = $attachment['blurhash']; - } - if ( $attachment['width'] > 0 && $attachment['height'] > 0 ) { - $media_attachment->meta = array( - 'original' => array( - 'width' => $attachment['width'], - 'height' => $attachment['height'], - 'size' => $attachment['width'] . 'x' . $attachment['height'], - 'aspect' => $attachment['width'] / $attachment['height'], - ), - );} - return $media_attachment; - }, - $object['attachment'] - ); - } - - return $status; - } - - public static function api_statuses_external( $statuses, $args ) { - if ( ! isset( $args['activitypub'] ) ) { - return $statuses; - } - - $data = get_remote_metadata_by_actor( $args['activitypub'] ); - - if ( ! $data || is_wp_error( $data ) || ! isset( $data['outbox'] ) ) { - return $statuses; - } - - $outbox = Http::get_remote_object( $data['outbox'], true ); - if ( is_wp_error( $outbox ) || ! isset( $outbox['first'] ) ) { - return $statuses; - } - - $account = self::get_account_for_actor( $args['activitypub'] ); - if ( ! $account ) { - return $statuses; - } - $limit = 10; - if ( isset( $args['posts_per_page'] ) ) { - $limit = $args['posts_per_page']; - } - if ( $limit > 40 ) { - $limit = 40; - } - $activitypub_statuses = array(); - $url = $outbox['first']; - $tries = 0; - while ( $url ) { - if ( ++$tries > 3 ) { - break; - } - - $posts = Http::get_remote_object( $url, true ); - if ( is_wp_error( $posts ) ) { - return $statuses; - } - - $new_statuses = array_map( - function ( $item ) use ( $account, $args ) { - if ( $args['exclude_replies'] ) { - if ( isset( $item['object']['inReplyTo'] ) && $item['object']['inReplyTo'] ) { - return null; - } - } - return self::activity_to_status( $item, $account ); - }, - $posts['orderedItems'] - ); - $activitypub_statuses = array_merge( $activitypub_statuses, array_filter( $new_statuses ) ); - $url = $posts['next']; - - if ( count( $activitypub_statuses ) >= $limit ) { - break; - } - } - - return array_slice( $activitypub_statuses, 0, $limit ); - } - - public static function api_get_replies( $context, $post_id, $url ) { - $meta = Http::get_remote_object( $url, true ); - if ( is_wp_error( $meta ) || ! isset( $meta['replies']['first']['next'] ) ) { - return $context; - } - - $replies_url = $meta['replies']['first']['next']; - $replies = Http::get_remote_object( $replies_url, true ); - if ( is_wp_error( $replies ) || ! isset( $replies['items'] ) ) { - return $context; - } - - foreach ( $replies['items'] as $url ) { - $response = Http::get( $url, true ); - if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { - continue; - } - $status = json_decode( wp_remote_retrieve_body( $response ), true ); - if ( ! $status || is_wp_error( $status ) ) { - continue; - } - - $account = self::get_account_for_actor( $status['attributedTo'] ); - $status = self::activity_to_status( $status, $account ); - if ( $status ) { - $context['descendants'][ $status->id ] = $status; - } - } - - return $context; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-jetpack.php b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-jetpack.php deleted file mode 100644 index 009811e9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-jetpack.php +++ /dev/null @@ -1,21 +0,0 @@ -= '2.0' ) { - $nodeinfo['protocols'][] = 'activitypub'; - } else { - $nodeinfo['protocols']['inbound'][] = 'activitypub'; - $nodeinfo['protocols']['outbound'][] = 'activitypub'; - } - - $nodeinfo['usage']['users'] = array( - 'total' => get_total_users(), - 'activeMonth' => get_active_users( '1 month ago' ), - 'activeHalfyear' => get_active_users( '6 month ago' ), - ); - - return $nodeinfo; - } - - /** - * Extend NodeInfo2 data - * - * @param array $nodeinfo NodeInfo2 data - * - * @return array The extended array - */ - public static function add_nodeinfo2_data( $nodeinfo ) { - $nodeinfo['protocols'][] = 'activitypub'; - - $nodeinfo['usage']['users'] = array( - 'total' => get_total_users(), - 'activeMonth' => get_active_users( '1 month ago' ), - 'activeHalfyear' => get_active_users( '6 month ago' ), - ); - - return $nodeinfo; - } - - /** - * Extend the well-known nodeinfo data - * - * @param array $data The well-known nodeinfo data - * - * @return array The extended array - */ - public static function add_wellknown_nodeinfo_data( $data ) { - $data['links'][] = array( - 'rel' => 'https://www.w3.org/ns/activitystreams#Application', - 'href' => get_rest_url_by_path( 'application' ), - ); - - return $data; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-opengraph.php b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-opengraph.php deleted file mode 100644 index 2d0f8c96..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-opengraph.php +++ /dev/null @@ -1,107 +0,0 @@ -get_webfinger(); - - return $metadata; - } - - if ( \is_author() ) { - // Use the Author of the Archive-Page - $user_id = \get_queried_object_id(); - } elseif ( \is_singular() ) { - // Use the Author of the Post - $user_id = \get_post_field( 'post_author', \get_queried_object_id() ); - } elseif ( ! is_user_type_disabled( 'blog' ) ) { - // Use the Blog-User for any other page, if the Blog-User is not disabled - $user_id = Users::BLOG_USER_ID; - } else { - // Do not add any metadata otherwise - return $metadata; - } - - $user = Users::get_by_id( $user_id ); - - if ( ! $user || \is_wp_error( $user ) ) { - return $metadata; - } - - // add WebFinger resource - $metadata['fediverse:creator'] = $user->get_webfinger(); - - return $metadata; - } - - /** - * Output Open Graph tags in the page header. - */ - public static function add_meta_tags() { - $metadata = apply_filters( 'opengraph_metadata', array() ); - foreach ( $metadata as $key => $value ) { - if ( empty( $key ) || empty( $value ) ) { - continue; - } - $value = (array) $value; - - foreach ( $value as $v ) { - printf( - '' . PHP_EOL, - esc_attr( $key ), - esc_attr( $v ) - ); - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-webfinger.php b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-webfinger.php deleted file mode 100644 index c9727861..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-webfinger.php +++ /dev/null @@ -1,69 +0,0 @@ -ID ); - - if ( ! $user || is_wp_error( $user ) ) { - return $array; - } - - $array['subject'] = sprintf( 'acct:%s', $user->get_webfinger() ); - - $array['aliases'][] = $user->get_url(); - $array['aliases'][] = $user->get_alternate_url(); - - $array['links'][] = array( - 'rel' => 'self', - 'type' => 'application/activity+json', - 'href' => $user->get_url(), - ); - - return $array; - } - - /** - * Add WebFinger discovery links - * - * @param array $array the jrd array - * @param string $resource the WebFinger resource - * @param WP_User $user the WordPress user - * - * @return array the jrd array - */ - public static function add_pseudo_user_discovery( $array, $resource ) { - $user = Webfinger_Rest::get_profile( $resource ); - - if ( ! $user || is_wp_error( $user ) ) { - return $array; - } - - return $user; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/readme.txt b/wp-content/upgrade-temp-backup/plugins/activitypub/readme.txt deleted file mode 100644 index 3dcd963b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/readme.txt +++ /dev/null @@ -1,233 +0,0 @@ -=== ActivityPub === -Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nuriapena, cavalierlife -Tags: OStatus, fediverse, activitypub, activitystream -Requires at least: 5.5 -Tested up to: 6.6 -Stable tag: 2.6.1 -Requires PHP: 7.0 -License: MIT -License URI: http://opensource.org/licenses/MIT - -The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. - -== Description == - -Enter the fediverse with **ActivityPub**, broadcasting your blog to a wider audience! Attract followers, deliver updates, and receive comments from a diverse user base of **ActivityPub**\-compliant platforms. - -With the ActivityPub plugin installed, your WordPress blog itself function as a federated profile, along with profiles for each author. For instance, if your website is `example.com`, then the blog-wide profile can be found at `@example.com@example.com`, and authors like Jane and Bob would have their individual profiles at `@jane@example.com` and `@bobz@example.com`, respectively. - -An example: I give you my Mastodon profile name: `@pfefferle@mastodon.social`. You search, see my profile, and hit follow. Now, any post I make appears in your Home feed. Similarly, with the ActivityPub plugin, you can find and follow Jane's profile at `@jane@example.com`. - -Once you follow Jane's `@jane@example.com` profile, any blog post she crafts on `example.com` will land in your Home feed. Simultaneously, by following the blog-wide profile `@example.com@example.com`, you'll receive updates from all authors. - -**Note**: if no one follows your author or blog instance, your posts remain unseen. The simplest method to verify the plugin's operation is by following your profile. If you possess a Mastodon profile, initiate by following your new one. - -The plugin works with the following tested federated platforms, but there may be more that it works with as well: - -* [Mastodon](https://joinmastodon.org/) -* [Pleroma](https://pleroma.social/)/[Akkoma](https://akkoma.social/) -* [friendica](https://friendi.ca/) -* [Hubzilla](https://hubzilla.org/) -* [Pixelfed](https://pixelfed.org/) -* [Socialhome](https://socialhome.network/) -* [Misskey](https://join.misskey.page/) -* [Firefish](https://joinfirefish.org/) (rebrand of Calckey) - -Some things to note: - -1. The blog-wide profile is only compatible with sites with rewrite rules enabled. If your site does not have rewrite rules enabled, the author-specific profiles may still work. -1. Many single-author blogs have chosen to turn off or redirect their author profile pages, usually via an SEO plugin like Yoast or Rank Math. This is usually done to avoid duplicate content with your blog’s home page. If your author page has been deactivated in this way, then ActivityPub author profiles won’t work for you. Instead, you can turn your author profile page back on, and then use the option in your SEO plugin to noindex the author page. This will still resolve duplicate content issues with search engines and will enable ActivityPub author profiles to work. -1. Once ActivityPub is installed, *only new posts going forward* will be available in the fediverse. Likewise, even if you’ve been using ActivityPub for a while, anyone who follows your site will only see new posts you publish from that moment on. They will never see previously-published posts in their Home feed. This process is very similar to subscribing to a newsletter. If you subscribe to a newsletter, you will only receive future emails, but not the old archived ones. With ActivityPub, if someone follows your site, they will only receive new blog posts you publish from then on. - -So what’s the process? - -1. Install the ActivityPub plugin. -1. Go to the plugin’s settings page and adjust the settings to your liking. Click the Save button when ready. -1. Make sure your blog’s author profile page is active if you are using author profiles. -1. Go to Mastodon or any other federated platform, and search for your profile, and follow it. Your new profile will be in the form of either `@your_username@example.com` or `@example.com@example.com`, so that is what you’ll search for. -1. On your blog, publish a new post. -1. From Mastodon, check to see if the new post appears in your Home feed. - -Please note that it may take up to 15 minutes or so for the new post to show up in your federated feed. This is because the messages are sent to the federated platforms using a delayed cron. This avoids breaking the publishing process for those cases where users might have lots of followers. So please don’t assume that just because you didn’t see it show up right away that something is broken. Give it some time. In most cases, it will show up within a few minutes, and you’ll know everything is working as expected. - -== Frequently Asked Questions == - -= tl;dr = - -This plugin connects your WordPress blog to popular social platforms like Mastodon, making your posts more accessible to a wider audience. Once installed, your blog can be followed by users on these platforms, allowing them to receive your new posts in their feeds. - -= What is the status of this plugin? = - -Implemented: - -* blog profile pages (JSON representation) -* author profile pages (JSON representation) -* custom links -* functional inbox/outbox -* follow (accept follows) -* share posts -* receive comments/reactions -* signature verification -* threaded comments support - -To implement: - -* replace shortcodes with blocks for layout - -= What is "ActivityPub for WordPress" = - -*ActivityPub for WordPress* extends WordPress with some Fediverse features, but it does not compete with platforms like Friendica or Mastodon. If you want to run a **decentralized social network**, please use [Mastodon](https://joinmastodon.org/) or [GNU social](https://gnusocial.network/). - -= What if you are running your blog in a subdirectory? = - -In order for webfinger to work, it must be mapped to the root directory of the URL on which your blog resides. - -**Apache** - -Add the following to the .htaccess file in the root directory: - - RedirectMatch "^\/\.well-known/(webfinger|nodeinfo|x-nodeinfo2)(.*)$" /blog/.well-known/$1$2 - -Where 'blog' is the path to the subdirectory at which your blog resides. - -**Nginx** - -Add the following to the site.conf in sites-available: - - location ~* /.well-known { - allow all; - try_files $uri $uri/ /blog/?$args; - } - -Where 'blog' is the path to the subdirectory at which your blog resides. - -= What if you are running your blog in a subdirectory? = - -If you are running your blog in a subdirectory, but have a different [wp_siteurl](https://wordpress.org/documentation/article/giving-wordpress-its-own-directory/), you don't need the redirect, because the index.php will take care of that. - -= Constants = - -The plugin uses PHP Constants to enable, disable or change its default behaviour. Please use them with caution and only if you know what you are doing. - -* `ACTIVITYPUB_REST_NAMESPACE` - Change the default Namespace of the REST endpoint. Default: `activitypub/1.0`. -* `ACTIVITYPUB_EXCERPT_LENGTH` - Change the length of the Excerpt. Default: `400`. -* `ACTIVITYPUB_SHOW_PLUGIN_RECOMMENDATIONS` - show plugin recommendations in the ActivityPub settings. Default: `true`. -* `ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS` - Change the number of attachments, that should be federated. Default: `3`. -* `ACTIVITYPUB_HASHTAGS_REGEXP` - Change the default regex to detect hashtext in a text. Default: `(?:(?<=\s)|(?<=)|(?<=
)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))`.
-* `ACTIVITYPUB_USERNAME_REGEXP` - Change the default regex to detect @-replies in a text. Default: `(?:([A-Za-z0-9\._-]+)@((?:[A-Za-z0-9_-]+\.)+[A-Za-z]+))`.
-* `ACTIVITYPUB_CUSTOM_POST_CONTENT` - Change the default template for Activities. Default: `[ap_title]\n\n[ap_content]\n\n[ap_hashtags]\n\n[ap_shortlink]`.
-* `ACTIVITYPUB_AUTHORIZED_FETCH` - Enable AUTHORIZED_FETCH. Default: `false`.
-* `ACTIVITYPUB_DISABLE_REWRITES` - Disable auto generation of `mod_rewrite` rules. Default: `false`.
-* `ACTIVITYPUB_DISABLE_INCOMING_INTERACTIONS` - Block incoming replies/comments/likes. Default: `false`.
-* `ACTIVITYPUB_DISABLE_OUTGOING_INTERACTIONS` - Disable outgoing replies/comments/likes. Default: `false`.
-* `ACTIVITYPUB_SHARED_INBOX_FEATURE` - Enable the shared inbox. Default: `false`.
-* `ACTIVITYPUB_SEND_VARY_HEADER` - Enable to send the `Vary: Accept` header. Default: `false`.
-
-= Where can you manage your followers? =
-
-If you have activated the blog user, you will find the list of his followers in the settings under `/wp-admin/options-general.php?page=activitypub&tab=followers`.
-
-The followers of a user can be found in the menu under "Users" -> "Followers" or under `wp-admin/users.php?page=activitypub-followers-list`.
-
-For reasons of data protection, it is not possible to see the followers of other users.
-
-== Changelog ==
-
-= 2.6.1 =
-
-* Fixed: Extra Fields will generate wrong entries
-
-= 2.6.0 =
-
-* Added: Support for FEP-fb2a
-* Added: CRUD support for Extra Fields
-* Improved: Remote-Follow UI and UX
-* Improved: Open Graph `fediverse:creator` implementation
-* Fixed: Compatibility issues with fed.brid.gy
-* Fixed: Remote-Reply endpoint
-* Fixed: WebFinger Error Codes (thanks to the FediTest project)
-* Fixed: Fatal Error when wp_schedule_single_event third argument is being passed as a string
-
-= 2.5.0 =
-
-* Added: WebFinger cors header
-* Added: WebFinger Content-Type
-* Added: The Fediverse creator of a post to OpenGraph
-* Improved: Try to lookup local users first for Enable Mastodon Apps
-* Improved: Send also Announces for deletes
-* Improved: Load time by adding `count_total=false` to `WP_User_Query`
-* Fixed: Several WebFinger issues
-* Fixed: Redirect issue for Application user
-* Fixed: Accessibilty issues with missing screen-reader-text on User overview page
-
-= 2.4.0 =
-
-* Added: A core/embed block filter to transform iframes to links
-* Added: Basic support of incoming `Announce`s
-* Added: Improve attachment handling
-* Added: Notifications: Introduce general class and use it for new follows
-* Added: Always fall back to `get_by_username` if one of the above fail
-* Added: Notification support for Jetpack
-* Added: EMA: Support for fetching external statuses without replies
-* Added: EMA: Remote context
-* Added: EMA: Allow searching for URLs
-* Added: EMA: Ensuring numeric ids is now done in EMA directly
-* Added: Podcast support
-* Added: Follower count to "At a Glance" dashboard widget
-* Improved: Use `Note` as default Object-Type, instead of `Article`
-* Improved: Improve `AUTHORIZED_FETCH`
-* Improved: Only send Mentions to comments in the direct hierarchy
-* Improved: Improve transformer
-* Improved: Improve Lemmy compatibility
-* Improved: Updated JS dependencies
-* Fixed: EMA: Add missing static keyword and try to lookup if the id is 0
-* Fixed: Blog-wide account when WordPress is in subdirectory
-* Fixed: Funkwhale URLs
-* Fixed: Prevent infinite loops in `get_comment_ancestors`
-* Fixed: Better Content-Negotiation handling
-
-See full Changelog on [GitHub](https://github.com/Automattic/wordpress-activitypub/blob/master/CHANGELOG.md).
-
-== Upgrade Notice ==
-
-= 1.0.0 =
-
-For version 1.0.0 we have completely rebuilt the followers lists. There is a migration from the old format to the new, but it may take some time until the migration is complete. No data will be lost in the process, please give the migration some time.
-
-== Installation ==
-
-Follow the normal instructions for [installing WordPress plugins](https://wordpress.org/support/article/managing-plugins/).
-
-= Automatic Plugin Installation =
-
-To add a WordPress Plugin using the [built-in plugin installer](https://codex.wordpress.org/Administration_Screens#Add_New_Plugins):
-
-1. Go to [Plugins](https://codex.wordpress.org/Administration_Screens#Plugins) > [Add New](https://codex.wordpress.org/Plugins_Add_New_Screen).
-1. Type "`activitypub`" into the **Search Plugins** box.
-1. Find the WordPress Plugin you wish to install.
- 1. Click **Details** for more information about the Plugin and instructions you may wish to print or save to help setup the Plugin.
- 1. Click **Install Now** to install the WordPress Plugin.
-1. The resulting installation screen will list the installation as successful or note any problems during the install.
-1. If successful, click **Activate Plugin** to activate it, or **Return to Plugin Installer** for further actions.
-
-= Manual Plugin Installation =
-
-There are a few cases when manually installing a WordPress Plugin is appropriate.
-
-* If you wish to control the placement and the process of installing a WordPress Plugin.
-* If your server does not permit automatic installation of a WordPress Plugin.
-* If you want to try the [latest development version](https://github.com/pfefferle/wordpress-activitypub).
-
-Installation of a WordPress Plugin manually requires FTP familiarity and the awareness that you may put your site at risk if you install a WordPress Plugin incompatible with the current version or from an unreliable source.
-
-Backup your site completely before proceeding.
-
-To install a WordPress Plugin manually:
-
-* Download your WordPress Plugin to your desktop.
- * Download from [the WordPress directory](https://wordpress.org/plugins/activitypub/)
- * Download from [GitHub](https://github.com/pfefferle/wordpress-activitypub/releases)
-* If downloaded as a zip archive, extract the Plugin folder to your desktop.
-* With your FTP program, upload the Plugin folder to the `wp-content/plugins` folder in your WordPress directory online.
-* Go to [Plugins screen](https://codex.wordpress.org/Administration_Screens#Plugins) and find the newly uploaded Plugin in the list.
-* Click **Activate** to activate it.
diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/admin-header.php b/wp-content/upgrade-temp-backup/plugins/activitypub/templates/admin-header.php
deleted file mode 100644
index 67b91ba9..00000000
--- a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/admin-header.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
- - | -
-
- get_webfinger() ) ); ?> - |
- |||
---|---|---|---|---|
- - | -- - - | - -|||
- - | -
-
-
-
|
-
- Could not connect to remote repository. -
- -' . __( 'Gitium enables continuous deployment for WordPress integrating with tools such as Github, Bitbucket or Travis-CI. Plugin and theme updates, installs and removals are automatically versioned.', 'gitium' ) . '
'; - echo '' . __( 'Ninja code edits from the WordPress editor are also tracked into version control. Gitium is designed for sane development environments.', 'gitium' ) . '
'; - echo '' . __( 'Staging and production can follow different branches of the same repository. You can deploy code simply trough git push.', 'gitium' ) . '
'; - echo '' . __( 'Gitium requires git
command line tool minimum version 1.7 installed on the server and proc_open
PHP function enabled.', 'gitium' ) . '
' . __( 'Could not connect to remote repository?', 'gitium' ) . '
'. __( 'If you encounter this kind of error you can try to fix it by setting the proper username of the .git directory.', 'gitium' ) . '
' . __( 'Example', 'gitium' ) .': chown -R www-data:www-data .git
' . __( 'Is this plugin considered stable?', 'gitium' ) . '
'. __( 'Right now this plugin is considered alpha quality and should be used in production environments only by adventurous kinds.', 'gitium' ) . '
' . __( 'What happens in case of conflicts?', 'gitium' ) . '
'. __( 'The behavior in case of conflicts is to overwrite the changes on the origin repository with the local changes (ie. local modifications take precedence over remote ones).', 'gitium' ) . '
' . __( 'How to deploy automatically after a push?', 'gitium' ) . '
'. __( 'You can ping the webhook url after a push to automatically deploy the new code. The webhook url can be found under Code menu. This url plays well with Github or Bitbucket webhooks.', 'gitium' ) . '
' . __( 'Does it works on multi site setups?', 'gitium' ) . '
'. __( 'Gitium is not supporting multisite setups at the moment.', 'gitium' ) . '
' . __( 'How does gitium handle submodules?', 'gitium' ) . '
'. __( 'Currently submodules are not supported.', 'gitium' ) . '
' . __( 'Gitium requires:', 'gitium' ) . '
'; - echo '' . __( 'the function proc_open available', 'gitium' ) . '
'; - echo '' . __( 'can exec the file inc/ssh-git', 'gitium' ) . '
'; - - printf( '' . __( 'git version >= %s', 'gitium' ) . '
', GITIUM_MIN_GIT_VER ); - printf( '' . __( 'PHP version >= %s', 'gitium' ) . '
', GITIUM_MIN_PHP_VER ); - } - - public function configuration() { - $screen = get_current_screen(); - $screen->add_help_tab( array( 'id' => 'configuration', 'title' => __( 'Configuration', 'gitium' ), 'callback' => array( $this, 'configuration_callback' ) ) ); - $this->general(); - } - - public function configuration_callback() { - echo '' . __( 'Configuration step 1', 'gitium' ) . '
' . __( 'In this step you must specify the Remote URL
. This URL represents the link between the git sistem and your site.', 'gitium' ) . '
' . __( 'You can get this URL from your Git repository and it looks like this:', 'gitium' ) . '
'; - echo '' . __( 'github.com -> git@github.com:user/example.git', 'gitium' ) . '
'; - echo '' . __( 'bitbucket.org -> git@bitbucket.org:user/glowing-happiness.git', 'gitium' ) . '
'; - echo '' . __( 'To go to the next step, fill the Remote URL
and then press the Fetch
button.', 'gitium' ) . '
' . __( 'Configuration step 2', 'gitium' ) . '
' . __( 'In this step you must select the branch
you want to follow.', 'gitium' ) . '
' . __( 'Only this branch will have all of your code modifications.', 'gitium' ) . '
'; - echo '' . __( 'When you push the button Merge & Push
, all code(plugins & themes) will be pushed on the git repository.', 'gitium' ) . '
' . __( 'On status page you can see what files are modified, and you can commit the changes to git.', 'gitium' ) . '
'; - } - - public function commits() { - $screen = get_current_screen(); - $screen->add_help_tab( array( 'id' => 'commits', 'title' => __( 'Commits', 'gitium' ), 'callback' => array( $this, 'commits_callback' ) ) ); - $this->general(); - } - - public function commits_callback() { - echo '' . __( 'You may be wondering what is the difference between author and committer.', 'gitium' ) . '
'; - echo '' . __( 'The author
is the person who originally wrote the patch, whereas the committer
is the person who last applied the patch.', 'gitium' ) . '
' . __( 'So, if you send in a patch to a project and one of the core members applies the patch, both of you get credit — you as the author and the core member as the committer.', 'gitium' ) . '
'; - } - - public function settings() { - $screen = get_current_screen(); - $screen->add_help_tab( array( 'id' => 'settings', 'title' => __( 'Settings', 'gitium' ), 'callback' => array( $this, 'settings_callback' ) ) ); - $this->general(); - } - - public function settings_callback() { - echo '' . __( 'Each line from the gitignore file specifies a pattern.', 'gitium' ) . '
'; - echo '' . __( 'When deciding whether to ignore a path, Git normally checks gitignore patterns from multiple sources, with the following order of precedence, from highest to lowest (within one level of precedence, the last matching pattern decides the outcome)', 'gitium' ) . '
'; - echo '' . sprintf( __( 'Read more on %s', 'gitium' ), 'git documentation' ) . '
'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gitium/inc/class-gitium-menu-bubble.php b/wp-content/upgrade-temp-backup/plugins/gitium/inc/class-gitium-menu-bubble.php deleted file mode 100644 index 81f3e2dd..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gitium/inc/class-gitium-menu-bubble.php +++ /dev/null @@ -1,55 +0,0 @@ - - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License, version 2, as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -class Gitium_Menu_Bubble extends Gitium_Menu { - - public function __construct() { - parent::__construct( $this->gitium_menu_slug, $this->gitium_menu_slug ); - add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'add_menu_bubble' ) ); - } - - public function add_menu_bubble() { - global $menu; - - if ( ! _gitium_is_status_working() ) { - foreach ( $menu as $key => $value ) { - if ( $this->menu_slug == $menu[ $key ][2] ) { - $menu_bubble = get_transient( 'gitium_menu_bubble' ); - if ( false === $menu_bubble ) { $menu_bubble = ''; } - $menu[ $key ][0] = str_replace( $menu_bubble, '', $menu[ $key ][0] ); - delete_transient( 'gitium_menu_bubble' ); - return; - } - } - } - - list( , $changes ) = _gitium_status(); - - if ( ! empty( $changes ) ) : - $bubble_count = count( $changes ); - foreach ( $menu as $key => $value ) { - if ( $this->menu_slug == $menu[ $key ][2] ) { - $menu_bubble = " " - . $bubble_count . ''; - $menu[ $key ][0] .= $menu_bubble; - set_transient( 'gitium_menu_bubble', $menu_bubble ); - return; - } - } - endif; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gitium/inc/class-gitium-menu.php b/wp-content/upgrade-temp-backup/plugins/gitium/inc/class-gitium-menu.php deleted file mode 100644 index ebad1b1a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gitium/inc/class-gitium-menu.php +++ /dev/null @@ -1,97 +0,0 @@ - - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License, version 2, as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -class Gitium_Menu { - - public $gitium_menu_slug = 'gitium/gitium.php'; - public $commits_menu_slug = 'gitium/gitium-commits.php'; - public $settings_menu_slug = 'gitium/gitium-settings.php'; - - public $git = null; - - public $menu_slug; - public $submenu_slug; - - public function __construct( $menu_slug, $submenu_slug ) { - global $git; - $this->git = $git; - - $this->menu_slug = $menu_slug; - $this->submenu_slug = $submenu_slug; - } - - public function redirect( $message = '', $success = false, $menu_slug = '' ) { - $message_id = substr( - md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' ) . time() ), 0, 8 - ); - if ( $message ) { - set_transient( 'message_' . $message_id, $message, 900 ); - } - if ( '' === $menu_slug ) { $menu_slug = $this->menu_slug; } - $url = network_admin_url( 'admin.php?page=' . $menu_slug ); - $url = esc_url_raw( add_query_arg( - array( - 'message' => $message_id, - 'success' => $success, - ), - $url - ) ); - wp_safe_redirect( $url ); - exit; - } - - public function success_redirect( $message = '', $menu_slug = '' ) { - $this->redirect( $message, true, $menu_slug ); - } - - public function disconnect_repository() { - $gitium_disconnect_repo = filter_input(INPUT_POST, 'GitiumSubmitDisconnectRepository', FILTER_SANITIZE_STRING); - - if ( ! isset( $gitium_disconnect_repo ) ) { - return; - } - check_admin_referer( 'gitium-admin' ); - gitium_uninstall_hook(); - if ( ! $this->git->remove_remote() ) { - $this->redirect( __('Could not remove remote.', 'gitium') ); - } - $this->success_redirect( __('You are now disconnected from the repository. New key pair generated.', 'gitium') ); - } - - public function show_message() { - $get_message = filter_input(INPUT_GET, 'message', FILTER_SANITIZE_STRING); - $get_success = filter_input(INPUT_GET, 'success', FILTER_SANITIZE_STRING); - if ( isset( $get_message ) && $get_message ) { - $type = ( isset( $get_success ) && $get_success == 1 ) ? 'updated' : 'error'; - $message = get_transient( 'message_'. $get_message ); - if ( $message ) : ?> -Gitium Requirement: {$this->msg[$key]}
-
-
- - |
- - table_end_row(); - } - ?> - - |
- https://user:pass@github.com/user/example.git', 'gitium' ); ?>
- - -
-
- github or bitbucket.', 'gitium' ); ?>
-
-
-
- Merge changes
-
-
- github or bitbucket.', 'gitium' ); ?>
-
- %s.', 'gitium' ), $branch ); - ?> -
- - - $type ) : - $counter++; - echo ( 0 != $counter % 2 ) ? ''; - _e( 'Nothing to commit, working directory clean.', 'gitium' ); - echo ' | ';
- else :
- $this->show_git_changes_table_rows( $changes );
- endif;
- ?>
-
-
- - -
-- /> -
- - git->get_remote_url() ); ?>
https://user:pass@github.com/user/example.git
"
-msgstr ""
-"Si necesita autenticar sobre \"https:// en lugar del uso de SSH: "
-"https://user:pass@github.com/user/example.git
"
-
-#: ../inc/class-gitium-submenu-configure.php:143
-msgid "Key pair"
-msgstr "Par de claves"
-
-#: ../inc/class-gitium-submenu-configure.php:147
-#: ../inc/class-gitium-submenu-settings.php:80
-msgid "Regenerate Key"
-msgstr "Regenerar clave"
-
-#: ../inc/class-gitium-submenu-configure.php:149
-#: ../inc/class-gitium-submenu-settings.php:81
-msgid ""
-"If your code use ssh keybased authentication for git you need to allow write "
-"access to your repository using this key."
-msgstr ""
-"Si su código usa autenticación ssh keybased para git, usted necesita "
-"permitir el acceso de escritura a su repositorio utilizando esta clave."
-
-#: ../inc/class-gitium-submenu-configure.php:150
-#: ../inc/class-gitium-submenu-settings.php:82
-msgid ""
-"Checkout instructions for github or bitbucket."
-msgstr ""
-"Instrucciones de Pedido para github or %s."
-msgstr "Siguiendo sucursal remota %s
."
-
-#: ../inc/class-gitium-submenu-status.php:127
-msgid "Everything is up to date"
-msgstr "Todo está actualizado"
-
-#: ../inc/class-gitium-submenu-status.php:130
-#, php-format
-msgid "You are %s commits ahead and %s behind remote."
-msgstr "Usted está %s Commits por delante y %s por detrás del remoto."
-
-#: ../inc/class-gitium-submenu-status.php:132
-#, php-format
-msgid "You are %s commits ahead remote."
-msgstr "Usted está %s Commits delante del remoto."
-
-#: ../inc/class-gitium-submenu-status.php:134
-#, php-format
-msgid "You are %s commits behind remote."
-msgstr "Usted está %s Commits detrás del remoto."
-
-#: ../inc/class-gitium-submenu-status.php:160
-msgid "Add this file to the `.gitignore` list."
-msgstr "Añadir este archivo a la lista `.gitignore`."
-
-#: ../inc/class-gitium-submenu-status.php:163
-msgid "Submodules are not supported in this version."
-msgstr "Sub-módulos no son compatibles con esta versión."
-
-#: ../inc/class-gitium-submenu-status.php:175
-#: ../inc/class-gitium-submenu-status.php:176
-msgid "Path"
-msgstr "Ruta"
-
-#: ../inc/class-gitium-submenu-status.php:175
-#: ../inc/class-gitium-submenu-status.php:176
-msgid "Change"
-msgstr "Cambiar"
-
-#: ../inc/class-gitium-submenu-status.php:181
-msgid "Nothing to commit, working directory clean."
-msgstr "Nada que comprometer, directorio de trabajo limpio."
-
-#: ../inc/class-gitium-submenu-status.php:195
-msgid "Commit message"
-msgstr "Comprometer mensaje"
-
-#: ../inc/class-gitium-submenu-status.php:199
-msgid "Save changes"
-msgstr "Guardar cambios"
-
-#: ../inc/class-gitium-submenu-status.php:209
-msgid "connected to"
-msgstr "conectados a"
-
-#: ../inc/class-gitium-submenu-settings.php:32 ../inc/class-gitium-help.php:81
-msgid "Settings"
-msgstr "Ajustes"
-
-#: ../inc/class-gitium-submenu-settings.php:46
-msgid ""
-"Webhook URL regenerates. Please make sure you update any external references."
-msgstr ""
-"Webhook URL se regenera. Por favor, asegúrese de actualizar todas las "
-"referencias externas."
-
-#: ../inc/class-gitium-submenu-settings.php:55
-msgid "Public key successfully regenerated."
-msgstr "Clave pública regenera con éxito."
-
-#: ../inc/class-gitium-submenu-settings.php:61
-msgid "Webhook URL"
-msgstr "URL Webhook"
-
-#: ../inc/class-gitium-submenu-settings.php:65
-msgid "Regenerate Webhook"
-msgstr "Regenerar Webhook"
-
-#: ../inc/class-gitium-submenu-settings.php:67
-msgid "Pinging this URL triggers an update from remote repository."
-msgstr ""
-"Hacer ping en esta URL desencadena una actualización del repositorio remoto."
-
-#: ../inc/class-gitium-submenu-settings.php:77
-msgid "Public Key"
-msgstr "Clave Pública"
-
-#: ../inc/class-gitium-submenu-settings.php:116
-msgid "Gitium Settings"
-msgstr "Ajustes Gitium"
-
-#: ../inc/class-gitium-submenu-settings.php:121
-msgid "Be careful when you modify this list!"
-msgstr "¡Tenga cuidado al modificar esta lista!"
-
-#: ../inc/class-gitium-submenu-settings.php:126
-msgid "Save"
-msgstr "Guardar"
-
-#: ../inc/class-gitium-help.php:26
-msgid "Gitium"
-msgstr "Gitium"
-
-#: ../inc/class-gitium-help.php:27
-msgid "F.A.Q."
-msgstr "PF"
-
-#: ../inc/class-gitium-help.php:32
-msgid ""
-"Gitium enables continuous deployment for WordPress integrating with tools "
-"such as Github, Bitbucket or Travis-CI. Plugin and theme updates, installs "
-"and removals are automatically versioned."
-msgstr ""
-"Gitium permite el despliegue continuo para integración de WordPress con "
-"herramientas como Github, Bitbucket o Travis-CI. El plugin y las "
-"actualizaciones de temas, instalaciones y eliminaciones están versionadas "
-"automáticamente."
-
-#: ../inc/class-gitium-help.php:33
-msgid ""
-"Ninja code edits from the WordPress editor are also tracked into version "
-"control. Gitium is designed for sane development environments."
-msgstr ""
-"Las ediciones Código Ninja desde el editor de WordPress también son "
-"rastreadas en el control de versiones. Gitium está diseñado para entornos de "
-"desarrollo sanos."
-
-#: ../inc/class-gitium-help.php:34
-msgid ""
-"Staging and production can follow different branches of the same repository. "
-"You can deploy code simply trough git push."
-msgstr ""
-"Puesta en escena y producción pueden seguir diferentes ramas del mismo "
-"repositorio. Puede implementar código simplemente a través git push."
-
-#: ../inc/class-gitium-help.php:35
-msgid ""
-"Gitium requires git
command line tool minimum version 1.7 "
-"installed on the server and proc_open
PHP function enabled."
-msgstr ""
-"Gitium requiere la herramienta de línea de comandos git
, "
-"mínimo la versión 1.7 instalada en el servidor y proc_open
la "
-"función PHP habilitada."
-
-#: ../inc/class-gitium-help.php:39
-msgid "Is this plugin considered stable?"
-msgstr "¿Es este plugin considerado estable?"
-
-#: ../inc/class-gitium-help.php:39
-msgid ""
-"Right now this plugin is considered alpha quality and should be used in "
-"production environments only by adventurous kinds."
-msgstr ""
-"Ahora mismo este plugin se considera de calidad alfa y debe utilizarse en "
-"entornos de producción sólo por tipos aventureros."
-
-#: ../inc/class-gitium-help.php:40
-msgid "What happens in case of conflicts?"
-msgstr "¿Qué sucede en caso de conflictos?"
-
-#: ../inc/class-gitium-help.php:40
-msgid ""
-"The behavior in case of conflicts is to overwrite the changes on the origin "
-"repository with the local changes (ie. local modifications take precedence "
-"over remote ones)."
-msgstr ""
-"El comportamiento en caso de conflictos es sobrescribir los cambios en el "
-"repositorio de origen con los cambios locales (p.ej. las modificaciones "
-"locales toman precedencia sobre las remotas)."
-
-#: ../inc/class-gitium-help.php:41
-msgid "How to deploy automatically after a push?"
-msgstr "¿Cómo implementar automáticamente después de un empujón?"
-
-#: ../inc/class-gitium-help.php:41
-msgid ""
-"You can ping the webhook url after a push to automatically deploy the new "
-"code. The webhook url can be found under Code menu. This url plays well with "
-"Github or Bitbucket webhooks."
-msgstr ""
-"Puede hacer ping en la url webhook después de un empujón para distribuir "
-"automáticamente el nuevo código. La url webhook se puede encontrar en el "
-"menú Código. Esta url juega bien con Github o BitBucket WebHooks."
-
-#: ../inc/class-gitium-help.php:42
-msgid "Does it works on multi site setups?"
-msgstr "¿Trabaja en múltiples configuraciones de sitio?"
-
-#: ../inc/class-gitium-help.php:42
-msgid "Gitium is not supporting multisite setups at the moment."
-msgstr ""
-"Gitium no soporta a las configuraciones de múltiples sitios en este momento."
-
-#: ../inc/class-gitium-help.php:43
-msgid "How does gitium handle submodules?"
-msgstr "¿Cómo manejar gitium los submódulos?"
-
-#: ../inc/class-gitium-help.php:43
-msgid "Currently submodules are not supported."
-msgstr "Actualmente los submódulos no son compatibles."
-
-#: ../inc/class-gitium-help.php:47
-msgid ""
-"In this step you must specify the Remote URL
. This URL "
-"represents the link between the git sistem and your site."
-msgstr ""
-"En esta etapa, se debe especificar el URL remoto
. Esta URL "
-"representa el enlace entre el sistema git y su sitio."
-
-#: ../inc/class-gitium-help.php:48
-msgid "You can get this URL from your Git repository and it looks like this:"
-msgstr ""
-"Usted puede obtener esta dirección URL de su repositorio Git y se ve así:"
-
-#: ../inc/class-gitium-help.php:49
-msgid "github.com -> git@github.com:user/example.git"
-msgstr "github.com -> git@github.com:user/example.git"
-
-#: ../inc/class-gitium-help.php:50
-msgid "bitbucket.org -> git@bitbucket.org:user/glowing-happiness.git"
-msgstr "bitbucket.org -> git@bitbucket.org:user/glowing-happiness.git"
-
-#: ../inc/class-gitium-help.php:51
-msgid ""
-"To go to the next step, fill the Remote URL
and then press the "
-"Fetch
button."
-msgstr ""
-"Para ir al siguiente paso, llene la URL remota
y pulse el "
-"botón Buscar
."
-
-#: ../inc/class-gitium-help.php:52
-msgid ""
-"In this step you must select the branch
you want to follow."
-msgstr ""
-"En este paso deberá seleccionar la rama
que desea seguir."
-
-#: ../inc/class-gitium-help.php:53
-msgid "Only this branch will have all of your code modifications."
-msgstr "Sólo esta rama tendrá todas sus modificaciones de código."
-
-#: ../inc/class-gitium-help.php:54
-msgid ""
-"When you push the button Merge & Push
, all code(plugins & "
-"themes) will be pushed on the git repository."
-msgstr ""
-"Cuando se presiona el botón Combinar y Empujar
, todo el "
-"código (plugins y temas) serán empujados en el repositorio git."
-
-#: ../inc/class-gitium-help.php:64
-msgid ""
-"On status page you can see what files are modified, and you can commit the "
-"changes to git."
-msgstr ""
-"En la página de estado se puede ver qué archivos son modificados, y usted "
-"puede confirmar los cambios a Git."
-
-#: ../inc/class-gitium-help.php:69 ../inc/class-gitium-submenu-commits.php:29
-#: ../inc/class-gitium-submenu-commits.php:41
-msgid "Commits"
-msgstr "Commits"
-
-#: ../inc/class-gitium-help.php:74
-msgid ""
-"You may be wondering what is the difference between author and committer."
-msgstr ""
-"Usted puede preguntarse cuál es la diferencia entre el autor y el comitter."
-
-#: ../inc/class-gitium-help.php:75
-msgid ""
-"The author
is the person who originally wrote the patch, "
-"whereas the committer
is the person who last applied the patch."
-msgstr ""
-"El autor
es la persona que originalmente escribió el parche, "
-"mientras que el committer
es la persona que aplicó el parche "
-"al final."
-
-#: ../inc/class-gitium-help.php:76
-msgid ""
-"So, if you send in a patch to a project and one of the core members applies "
-"the patch, both of you get credit — you as the author and the core member as "
-"the committer."
-msgstr ""
-"Por lo tanto, si usted envía en un parche para un proyecto y uno de los "
-"principales miembros aplica el parche, ambos consiguen crédito - usted como "
-"el autor y el miembro de núcleo como el commiter."
-
-#: ../inc/class-gitium-help.php:86
-msgid "Each line from the gitignore file specifies a pattern."
-msgstr "Cada línea del archivo gitignore especifica un patrón."
-
-#: ../inc/class-gitium-help.php:87
-msgid ""
-"When deciding whether to ignore a path, Git normally checks gitignore "
-"patterns from multiple sources, with the following order of precedence, from "
-"highest to lowest (within one level of precedence, the last matching pattern "
-"decides the outcome)"
-msgstr ""
-"A la hora de decidir si se debe pasar por alto una ruta, Git normalmente "
-"comprueba patrones gitignore de múltiples fuentes, con el siguiente orden, "
-"de de mayor a menor (dentro de un nivel de prioridad, la última "
-"coincidencia de patrones decide el resultado)"
-
-#: ../inc/class-gitium-help.php:88
-#, php-format
-msgid "Read more on %s"
-msgstr "Leer más en %s"
-
-#: ../inc/class-gitium-submenu-commits.php:28
-msgid "Git Commits"
-msgstr "Commits Git"
-
-#: ../inc/class-gitium-submenu-commits.php:61
-#, php-format
-msgid "Last %s commits"
-msgstr "Últimos commits %s"
-
-#: ../inc/class-gitium-submenu-commits.php:70
-#, php-format
-msgid "committed %s ago"
-msgstr "cometido hace %s"
-
-#: ../inc/class-gitium-submenu-commits.php:82
-#, php-format
-msgid "authored %s ago"
-msgstr "Creado hace %s"
diff --git a/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium-sr_RS.mo b/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium-sr_RS.mo
deleted file mode 100644
index 677d3bf3..00000000
Binary files a/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium-sr_RS.mo and /dev/null differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium-sr_RS.po b/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium-sr_RS.po
deleted file mode 100644
index 09cb064a..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium-sr_RS.po
+++ /dev/null
@@ -1,538 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: Gitium\n"
-"POT-Creation-Date: 2014-10-20 19:06+0200\n"
-"PO-Revision-Date: 2014-10-24 12:51+0200\n"
-"Last-Translator: Presslabs https://user:pass@github.com/user/example.git
"
-msgstr ""
-"Ako treba da proverite preko \"https://\" umesto SSH, koristite: "
-"https://user:pass@github.com/user/example.git
"
-
-#: ../inc/class-gitium-submenu-configure.php:143
-msgid "Key pair"
-msgstr "Par ključeva"
-
-#: ../inc/class-gitium-submenu-configure.php:147
-#: ../inc/class-gitium-submenu-settings.php:80
-msgid "Regenerate Key"
-msgstr "Ključ za regenerisanje"
-
-#: ../inc/class-gitium-submenu-configure.php:149
-#: ../inc/class-gitium-submenu-settings.php:81
-msgid ""
-"If your code use ssh keybased authentication for git you need to allow write "
-"access to your repository using this key."
-msgstr ""
-"Ako vaš kod koristi git autentifikaciju na osnovu ssh ključa, morate pismeno "
-"dozvoliti pristup svom spremištu uz pomoć ovog ključa. "
-
-#: ../inc/class-gitium-submenu-configure.php:150
-#: ../inc/class-gitium-submenu-settings.php:82
-msgid ""
-"Checkout instructions for github or bitbucket."
-msgstr ""
-"Pogledajte uputstva na github "
-"ili bitbucket."
-
-#: ../inc/class-gitium-submenu-configure.php:160
-msgid "Warning!"
-msgstr "Upozorenje!"
-
-#: ../inc/class-gitium-submenu-configure.php:174
-#: ../inc/class-gitium-help.php:47
-msgid "Configuration step 1"
-msgstr "Konfiguracija, korak 1"
-
-#: ../inc/class-gitium-submenu-configure.php:175
-#: ../inc/class-gitium-submenu-configure.php:194
-msgid ""
-"If you need help to set this up, please click on the \"Help\" button from "
-"the top right corner of this screen."
-msgstr ""
-"Ako vam treba pomoć za ovo podešavanje, kliknite na taster \"Pomoć\" u "
-"gornjem desnom uglu ekrana."
-
-#: ../inc/class-gitium-submenu-configure.php:183
-msgid "Fetch"
-msgstr "Uzmi"
-
-#: ../inc/class-gitium-submenu-configure.php:193
-#: ../inc/class-gitium-help.php:52
-msgid "Configuration step 2"
-msgstr "Konfiguracija, korak 2"
-
-#: ../inc/class-gitium-submenu-configure.php:202
-msgid "Choose tracking branch"
-msgstr "Odaberite ogranak za praćenje"
-
-#: ../inc/class-gitium-submenu-configure.php:215
-msgid "Merge & Push"
-msgstr "Spoji & Potisni"
-
-#: ../inc/class-gitium-submenu-status.php:32
-#: ../inc/class-gitium-submenu-status.php:42
-msgid "Git Status"
-msgstr "Git Status"
-
-#: ../inc/class-gitium-submenu-status.php:43
-#: ../inc/class-gitium-submenu-status.php:209 ../inc/class-gitium-help.php:59
-msgid "Status"
-msgstr "Status"
-
-#: ../inc/class-gitium-submenu-status.php:53
-msgid "untracked"
-msgstr "nepraćen"
-
-#: ../inc/class-gitium-submenu-status.php:54
-msgid "modified on remote"
-msgstr "modifikovan na udaljenom skladištu"
-
-#: ../inc/class-gitium-submenu-status.php:55
-msgid "added to remote"
-msgstr "dodat udaljenom skladištu"
-
-#: ../inc/class-gitium-submenu-status.php:56
-msgid "deleted from remote"
-msgstr "obrisan sa udaljenog skladišta"
-
-#: ../inc/class-gitium-submenu-status.php:57
-#: ../inc/class-gitium-submenu-status.php:61
-msgid "deleted from work tree"
-msgstr "obrisan sa radnog drveta"
-
-#: ../inc/class-gitium-submenu-status.php:58
-msgid "updated in work tree"
-msgstr "ažuriran u radnom drvetu"
-
-#: ../inc/class-gitium-submenu-status.php:59
-#: ../inc/class-gitium-submenu-status.php:60
-msgid "added to work tree"
-msgstr "dodat radnom drvetu"
-
-#: ../inc/class-gitium-submenu-status.php:73
-#, php-format
-msgid "renamed from `%s`"
-msgstr "ime `%s` promenjeno"
-
-#: ../inc/class-gitium-submenu-status.php:88
-#: ../inc/class-gitium-submenu-settings.php:106
-msgid "The file `.gitignore` is saved!"
-msgstr "Datoteka `.gitignore` je sačuvana!"
-
-#: ../inc/class-gitium-submenu-status.php:90
-#: ../inc/class-gitium-submenu-settings.php:108
-msgid "The file `.gitignore` could not be saved!"
-msgstr "Datoteka `.gitignore` ne može biti sačuvana!"
-
-#: ../inc/class-gitium-submenu-status.php:100
-msgid "Could not enable the maintenance mode!"
-msgstr "Režim održavanja nije mogao biti aktiviran!"
-
-#: ../inc/class-gitium-submenu-status.php:102
-#: ../inc/class-gitium-submenu-status.php:196
-#, php-format
-msgid "Merged changes from %s on %s"
-msgstr "Promene sa %s na %s spojene!"
-
-#: ../inc/class-gitium-submenu-status.php:109
-msgid "Could not commit!"
-msgstr "Neuspelo izvršenje!"
-
-#: ../inc/class-gitium-submenu-status.php:114
-msgid "Merge failed: "
-msgstr "Neuspelo spajanje:"
-
-#: ../inc/class-gitium-submenu-status.php:116
-#, php-format
-msgid "Pushed commit: `%s`"
-msgstr "Preneto izvršenje: `%s`"
-
-#: ../inc/class-gitium-submenu-status.php:125
-#, php-format
-msgid "Following remote branch %s
."
-msgstr "Praćenje udaljenog ogrankagit
command line tool minimum version 1.7 "
-"installed on the server and proc_open
PHP function enabled."
-msgstr ""
-"Gitium zahteva da na serveru bude instaliran git
alat komandne "
-"linije, najmanje verzije 1.7 i proc_open
aktiviranu PHP "
-"funkciju."
-
-#: ../inc/class-gitium-help.php:39
-msgid "Is this plugin considered stable?"
-msgstr "Da li se ovaj plugin smatra stabilnim?"
-
-#: ../inc/class-gitium-help.php:39
-msgid ""
-"Right now this plugin is considered alpha quality and should be used in "
-"production environments only by adventurous kinds."
-msgstr ""
-"Trenutno se smatra da ovaj plugin ima alfa kvalitet i treba ga koristiti u "
-"okruženjima produkcije isključivo avanturističkog karaktera."
-
-#: ../inc/class-gitium-help.php:40
-msgid "What happens in case of conflicts?"
-msgstr "Šta se dešava u slučaju konflikta?"
-
-#: ../inc/class-gitium-help.php:40
-msgid ""
-"The behavior in case of conflicts is to overwrite the changes on the origin "
-"repository with the local changes (ie. local modifications take precedence "
-"over remote ones)."
-msgstr ""
-"U slučaju konflikta treba poništiti izmene u prvobitnom spremištu, zajedno "
-"sa lokalnim izmenama (tj. Lokalne izmene imaju prednost u odnosu na "
-"udaljene)."
-
-#: ../inc/class-gitium-help.php:41
-msgid "How to deploy automatically after a push?"
-msgstr "Kako izvršiti automatsko razmeštanje posle pritiska?"
-
-#: ../inc/class-gitium-help.php:41
-msgid ""
-"You can ping the webhook url after a push to automatically deploy the new "
-"code. The webhook url can be found under Code menu. This url plays well with "
-"Github or Bitbucket webhooks."
-msgstr ""
-"Možete pingovati url za webhook nakon pritiska za automatsko razmeštanje "
-"novog koda. URL za webhook možete naći u meniju koda. Ovaj url dobro radi uz "
-"Github ili Bitbucket webhooks."
-
-#: ../inc/class-gitium-help.php:42
-msgid "Does it works on multi site setups?"
-msgstr "Da li radi na podešavanjima višestrukih site-ova?"
-
-#: ../inc/class-gitium-help.php:42
-msgid "Gitium is not supporting multisite setups at the moment."
-msgstr "Gitium trenutno ne podržava podešavanje višestrukih site-ova."
-
-#: ../inc/class-gitium-help.php:43
-msgid "How does gitium handle submodules?"
-msgstr "Kako gitium upravlja submodulima?"
-
-#: ../inc/class-gitium-help.php:43
-msgid "Currently submodules are not supported."
-msgstr "Trenutno, submoduli nisu podržani."
-
-#: ../inc/class-gitium-help.php:47
-msgid ""
-"In this step you must specify the Remote URL
. This URL "
-"represents the link between the git sistem and your site."
-msgstr ""
-"U ovom koraku morate odrediti Udaljeni URL
. Ovaj URL "
-"predstavlja vezu između git sistema i vašeg site-a."
-
-#: ../inc/class-gitium-help.php:48
-msgid "You can get this URL from your Git repository and it looks like this:"
-msgstr "Ovaj URL možete dobiti iz svog Git spremišta i on izgleda ovako:"
-
-#: ../inc/class-gitium-help.php:49
-msgid "github.com -> git@github.com:user/example.git"
-msgstr "github.com -> git@github.com:user/example.git"
-
-#: ../inc/class-gitium-help.php:50
-msgid "bitbucket.org -> git@bitbucket.org:user/glowing-happiness.git"
-msgstr "bitbucket.org -> git@bitbucket.org:user/glowing-happines.git"
-
-#: ../inc/class-gitium-help.php:51
-msgid ""
-"To go to the next step, fill the Remote URL
and then press the "
-"Fetch
button."
-msgstr ""
-"Da biste prešli na sledeći korak, popunite Udaljeni URL
i "
-"pritisnite Dobavi
taster."
-
-#: ../inc/class-gitium-help.php:52
-msgid ""
-"In this step you must select the branch
you want to follow."
-msgstr ""
-"U ovom koraku morate odabrati ogranak
koji želite da pratite. "
-
-#: ../inc/class-gitium-help.php:53
-msgid "Only this branch will have all of your code modifications."
-msgstr "Samo će ovaj ogranak imati sve vaše modifikacije koda."
-
-#: ../inc/class-gitium-help.php:54
-msgid ""
-"When you push the button Merge & Push
, all code(plugins & "
-"themes) will be pushed on the git repository."
-msgstr ""
-"Kad kliknete na taster Spoji & Potisni
svi (plugin-ovi i teme) "
-"koda biće potisnuti u git spremište."
-
-#: ../inc/class-gitium-help.php:64
-msgid ""
-"On status page you can see what files are modified, and you can commit the "
-"changes to git."
-msgstr ""
-"Na stranici statusa možete videti koje su datoteke izmenjene i možete uneti "
-"izmene u git."
-
-#: ../inc/class-gitium-help.php:69 ../inc/class-gitium-submenu-commits.php:29
-#: ../inc/class-gitium-submenu-commits.php:41
-msgid "Commits"
-msgstr "Izvršenja"
-
-#: ../inc/class-gitium-help.php:74
-msgid ""
-"You may be wondering what is the difference between author and committer."
-msgstr "Možda se pitate u čemu je razlika između autora i izvršioca?"
-
-#: ../inc/class-gitium-help.php:75
-msgid ""
-"The author
is the person who originally wrote the patch, "
-"whereas the committer
is the person who last applied the patch."
-msgstr ""
-"Autor
je osoba koja je originalno napisala zakrpu, dok je "
-"izvršilac
osoba koja je poslednja primenila zakrpu."
-
-#: ../inc/class-gitium-help.php:76
-msgid ""
-"So, if you send in a patch to a project and one of the core members applies "
-"the patch, both of you get credit — you as the author and the core member as "
-"the committer."
-msgstr ""
-"Dakle, ako pošaljete zakrpu projektu i jedan od ključnih članova je primeni "
-"- oboje dobijate zasluge - vi kao autor, a ključni član kao izvršilac."
-
-#: ../inc/class-gitium-help.php:86
-msgid "Each line from the gitignore file specifies a pattern."
-msgstr "Svaka linija iz gitignore datoteke označava šablon."
-
-#: ../inc/class-gitium-help.php:87
-msgid ""
-"When deciding whether to ignore a path, Git normally checks gitignore "
-"patterns from multiple sources, with the following order of precedence, from "
-"highest to lowest (within one level of precedence, the last matching pattern "
-"decides the outcome)"
-msgstr ""
-"Kad odlučujete o tome da li ćete ignorisati putanju, Git obično proverava "
-"gitignore šablone iz višestrukih izvora, sa sledećim redosledom - od "
-"najvišeg do najnižeg (u okviru jednog nivoa prednosti, poslednji šablon koji "
-"se poklapa odlučuje o ishodu)."
-
-#: ../inc/class-gitium-help.php:88
-#, php-format
-msgid "Read more on %s"
-msgstr "Pročitajte više o %s"
-
-#: ../inc/class-gitium-submenu-commits.php:28
-msgid "Git Commits"
-msgstr "Git izvršenja"
-
-#: ../inc/class-gitium-submenu-commits.php:61
-#, php-format
-msgid "Last %s commits"
-msgstr "Poslednja %s izvršenja"
-
-#: ../inc/class-gitium-submenu-commits.php:70
-#, php-format
-msgid "committed %s ago"
-msgstr "izvršena pre %s"
-
-#: ../inc/class-gitium-submenu-commits.php:82
-#, php-format
-msgid "authored %s ago"
-msgstr "autorizovana pre %s"
diff --git a/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium.pot b/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium.pot
deleted file mode 100644
index 807f7dae..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gitium/languages/gitium.pot
+++ /dev/null
@@ -1,489 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: Gitium\n"
-"POT-Creation-Date: 2014-10-20 19:06+0200\n"
-"PO-Revision-Date: 2014-10-20 19:06+0200\n"
-"Last-Translator: Presslabs https://user:pass@github.com/user/example.git
"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:143
-msgid "Key pair"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:147
-#: ../inc/class-gitium-submenu-settings.php:80
-msgid "Regenerate Key"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:149
-#: ../inc/class-gitium-submenu-settings.php:81
-msgid ""
-"If your code use ssh keybased authentication for git you need to allow write "
-"access to your repository using this key."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:150
-#: ../inc/class-gitium-submenu-settings.php:82
-msgid ""
-"Checkout instructions for github or bitbucket."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:160
-msgid "Warning!"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:174
-#: ../inc/class-gitium-help.php:47
-msgid "Configuration step 1"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:175
-#: ../inc/class-gitium-submenu-configure.php:194
-msgid ""
-"If you need help to set this up, please click on the \"Help\" button from "
-"the top right corner of this screen."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:183
-msgid "Fetch"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:193
-#: ../inc/class-gitium-help.php:52
-msgid "Configuration step 2"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:202
-msgid "Choose tracking branch"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-configure.php:215
-msgid "Merge & Push"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:32
-#: ../inc/class-gitium-submenu-status.php:42
-msgid "Git Status"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:43
-#: ../inc/class-gitium-submenu-status.php:209 ../inc/class-gitium-help.php:59
-msgid "Status"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:53
-msgid "untracked"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:54
-msgid "modified on remote"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:55
-msgid "added to remote"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:56
-msgid "deleted from remote"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:57
-#: ../inc/class-gitium-submenu-status.php:61
-msgid "deleted from work tree"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:58
-msgid "updated in work tree"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:59
-#: ../inc/class-gitium-submenu-status.php:60
-msgid "added to work tree"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:73
-#, php-format
-msgid "renamed from `%s`"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:88
-#: ../inc/class-gitium-submenu-settings.php:106
-msgid "The file `.gitignore` is saved!"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:90
-#: ../inc/class-gitium-submenu-settings.php:108
-msgid "The file `.gitignore` could not be saved!"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:100
-msgid "Could not enable the maintenance mode!"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:102
-#: ../inc/class-gitium-submenu-status.php:196
-#, php-format
-msgid "Merged changes from %s on %s"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:109
-msgid "Could not commit!"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:114
-msgid "Merge failed: "
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:116
-#, php-format
-msgid "Pushed commit: `%s`"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:125
-#, php-format
-msgid "Following remote branch %s
."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:127
-msgid "Everything is up to date"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:130
-#, php-format
-msgid "You are %s commits ahead and %s behind remote."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:132
-#, php-format
-msgid "You are %s commits ahead remote."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:134
-#, php-format
-msgid "You are %s commits behind remote."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:160
-msgid "Add this file to the `.gitignore` list."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:163
-msgid "Submodules are not supported in this version."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:175
-#: ../inc/class-gitium-submenu-status.php:176
-msgid "Path"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:175
-#: ../inc/class-gitium-submenu-status.php:176
-msgid "Change"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:181
-msgid "Nothing to commit, working directory clean."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:195
-msgid "Commit message"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:199
-msgid "Save changes"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-status.php:209
-msgid "connected to"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:32 ../inc/class-gitium-help.php:81
-msgid "Settings"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:46
-msgid ""
-"Webhook URL regenerates. Please make sure you update any external references."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:55
-msgid "Public key successfully regenerated."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:61
-msgid "Webhook URL"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:65
-msgid "Regenerate Webhook"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:67
-msgid "Pinging this URL triggers an update from remote repository."
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:77
-msgid "Public Key"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:116
-msgid "Gitium Settings"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:121
-msgid "Be careful when you modify this list!"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-settings.php:126
-msgid "Save"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:26
-msgid "Gitium"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:27
-msgid "F.A.Q."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:32
-msgid ""
-"Gitium enables continuous deployment for WordPress integrating with tools "
-"such as Github, Bitbucket or Travis-CI. Plugin and theme updates, installs "
-"and removals are automatically versioned."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:33
-msgid ""
-"Ninja code edits from the WordPress editor are also tracked into version "
-"control. Gitium is designed for sane development environments."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:34
-msgid ""
-"Staging and production can follow different branches of the same repository. "
-"You can deploy code simply trough git push."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:35
-msgid ""
-"Gitium requires git
command line tool minimum version 1.7 "
-"installed on the server and proc_open
PHP function enabled."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:39
-msgid "Is this plugin considered stable?"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:39
-msgid ""
-"Right now this plugin is considered alpha quality and should be used in "
-"production environments only by adventurous kinds."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:40
-msgid "What happens in case of conflicts?"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:40
-msgid ""
-"The behavior in case of conflicts is to overwrite the changes on the origin "
-"repository with the local changes (ie. local modifications take precedence "
-"over remote ones)."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:41
-msgid "How to deploy automatically after a push?"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:41
-msgid ""
-"You can ping the webhook url after a push to automatically deploy the new "
-"code. The webhook url can be found under Code menu. This url plays well with "
-"Github or Bitbucket webhooks."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:42
-msgid "Does it works on multi site setups?"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:42
-msgid "Gitium is not supporting multisite setups at the moment."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:43
-msgid "How does gitium handle submodules?"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:43
-msgid "Currently submodules are not supported."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:47
-msgid ""
-"In this step you must specify the Remote URL
. This URL "
-"represents the link between the git sistem and your site."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:48
-msgid "You can get this URL from your Git repository and it looks like this:"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:49
-msgid "github.com -> git@github.com:user/example.git"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:50
-msgid "bitbucket.org -> git@bitbucket.org:user/glowing-happiness.git"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:51
-msgid ""
-"To go to the next step, fill the Remote URL
and then press the "
-"Fetch
button."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:52
-msgid ""
-"In this step you must select the branch
you want to follow."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:53
-msgid "Only this branch will have all of your code modifications."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:54
-msgid ""
-"When you push the button Merge & Push
, all code(plugins & "
-"themes) will be pushed on the git repository."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:64
-msgid ""
-"On status page you can see what files are modified, and you can commit the "
-"changes to git."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:69 ../inc/class-gitium-submenu-commits.php:29
-#: ../inc/class-gitium-submenu-commits.php:41
-msgid "Commits"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:74
-msgid ""
-"You may be wondering what is the difference between author and committer."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:75
-msgid ""
-"The author
is the person who originally wrote the patch, "
-"whereas the committer
is the person who last applied the patch."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:76
-msgid ""
-"So, if you send in a patch to a project and one of the core members applies "
-"the patch, both of you get credit — you as the author and the core member as "
-"the committer."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:86
-msgid "Each line from the gitignore file specifies a pattern."
-msgstr ""
-
-#: ../inc/class-gitium-help.php:87
-msgid ""
-"When deciding whether to ignore a path, Git normally checks gitignore "
-"patterns from multiple sources, with the following order of precedence, from "
-"highest to lowest (within one level of precedence, the last matching pattern "
-"decides the outcome)"
-msgstr ""
-
-#: ../inc/class-gitium-help.php:88
-#, php-format
-msgid "Read more on %s"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-commits.php:28
-msgid "Git Commits"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-commits.php:61
-#, php-format
-msgid "Last %s commits"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-commits.php:70
-#, php-format
-msgid "committed %s ago"
-msgstr ""
-
-#: ../inc/class-gitium-submenu-commits.php:82
-#, php-format
-msgid "authored %s ago"
-msgstr ""
diff --git a/wp-content/upgrade-temp-backup/plugins/gitium/readme.txt b/wp-content/upgrade-temp-backup/plugins/gitium/readme.txt
deleted file mode 100644
index 0c74c846..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gitium/readme.txt
+++ /dev/null
@@ -1,267 +0,0 @@
-=== Gitium ===
-
-Contributors: PressLabs
-Donate link: https://www.presslabs.com/gitium/
-Tags: git, version, versioning, deployment, version-control, github, bitbucket, travis, code, revision, testing, development, branch, production, staging, debug, plugin, gitium, presslabs, simple
-Requires at least: 4.7
-Tested up to: 6.2.2
-Requires PHP: 5.6
-License: GPLv2
-Stable tag: 1.0.6
-License URI: http://www.gnu.org/licenses/gpl-2.0.html
-
-Automatic git version control and deployment for your plugins and themes integrated into wp-admin.
-
-== About the makers ==
-This plugin was developed by the crafty people at Presslabs—the Smart Managed WordPress Hosting Platform. Here we bring high-performance hosting and business intelligence for WordPress sites. In our spare time, we contribute to the global open-source community with our code.
-
-We’ve built Gitium back in 2013 to provide our clients a more simple and error-free method to integrate a new git version control into their code management flow.
-
-== What is Gitium? ==
-
-This plugin enables continuous deployment for WordPress, integrating with tools such as Github, Bitbucket or Travis-CI. Theme or plugin updates, installs and removals are all automatically versioned. Ninja code edits from the WordPress editor are also tracked by the version control system.
-
-== Why is Gitium? ==
-
-Gitium is designed with responsible development environments in mind, allowing staging and production to follow different branches of the same repository. You can also deploy code by simply using git push.
-
-Gitium requires git command line tool with a minimum version of 1.7 installed on the server and the proc_open PHP function enabled.
-
-== Gitium features: ==
--preserves the WordPress behavior
--accountability for code changes
--safe code storage—gets all code edits in Git
-
-== Development ==
-For more details about Gitium, head here: http://docs.presslabs.com/gitium/usage/
-
-== Receiving is nicer when giving ==
-We’ve built this to make our lives easier and we’re happy to do that for other developers, too. We’d really appreciate it if you could contribute with code, tests, documentation or just share your experience with Gitium.
-
-Development of Gitium happens at http://github.com/PressLabs/gitium
-Issues are tracked at http://github.com/PressLabs/gitium/issues
-This WordPress plugin can be found at https://wordpress.org/plugins/gitium/
-
-== Screenshots ==
-
-1. Setup step 1: Get SSH Key
-2. Setup step 2: Set SSH Key (Github)
-3. Setup step 3: Add remote repository
-4. Setup step 4: Choose following branch
-5. Commit local changes
-
-
-== Installation ==
-
-= Manual Installation =
-1. Upload `gitium.zip` to the `/wp-content/plugins/` directory;
-2. Extract the `gitium.zip` archive into the `/wp-content/plugins/` directory;
-3. Activate the plugin through the 'Plugins' menu in WordPress.
-
-Alternatively, go into your WordPress dashboard and click on Plugins -> Add Plugin and search for `Gitium`. Then, click on Install and, after that, on Activate Now.
-
-
-= Usage =
-
-Activate the plugin and follow the on-screen instructions under the `Gitium` menu.
-
-_IMPORTANT_: Gitium does its best not to version your WordPress core, neither your `/wp-content/uploads` folder.
-
-== Frequently Asked Questions ==
-
-= Could not connect to remote repository? =
-
-If you encounter this kind of error you can try to fix it by setting the proper username of the .git directory.
-
-Example: chown -R www-data:www-data .git
-
-= Is this plugin considered stable? =
-
-Yes, we consider the plugin stable after extensive usage in production environments at Presslabs, with hundreds of users and powering sites with hundreds of millions of pageviews per month.
-
-= What will happen in case of conflicts? =
-
-The behavior in case of conflicts is to overwrite the changes on the `origin` repository with the local changes (ie. local modifications take precedence over remote ones).
-
-= How to deploy automatically after a push? =
-
-You can ping the webhook url after a push to automatically deploy the new code. The webhook url can be found under `Gitium` menu, `Settings` section. This url also plays well with Github or Bitbucket webhooks.
-
-= Does it works on multi site setups? =
-
-Gitium does not support multisite setups at the moment.
-
-= How does gitium handle submodules? =
-
-Submodules are currently not supported.
-
-== Upgrade Notice ==
-= 1.0.5 =
-Fixed wrong redirection for multisite installations during initial setup
-
-== Changelog ==
-
-= 1.0.6 =
-* Fixed deprecation warnings for dynamic property in git-wrapper
-
-= 1.0.5 =
-* Various bug fixes
-
-= 1.0.4 =
-* PHP 8 compat. fixes
-
-= 1.0.3 =
-* Fixed wrong redirection for multisite installations during initial setup
-
-= 1.0.2 =
-* Full PHP 7+ compatibility
-* Hotfix - Fixed the blank pages being displayed instead of success of failure messages;
-* Hotfix - Fixed the push process when other remote branches had changes;
-* Hotfix - Fixed the missing ssh / key handling with fatal errors during activation;
-* Added - More success messages in certain cases.
-
-= 1.0.1 =
-* Hotfix - Fix race condition on Code Editor Save
-
-= 1.0 =
-* Fixed WP 4.9 Compatibility
-
-= 1.0-rc12 =
-* Bumped plugin version
-
-= 1.0-rc11 =
-* Hotfixed an error that prevented gitium to error_log properly.
-
-= 1.0-rc10 =
-* Bumped wordpress tested version
-
-= 1.0-rc9 =
-* PHP7 compat and wp-cli
-
-= 1.0-rc8 =
-* Fix some indents
-* Add some more tests
-* Fix the submenu configure logic
-
-= 1.0-rc7 =
-* Test remote url from git wrapper
-* Remove the phpmd package from test environment
-* Set WP_DEBUG to false on tests
-* Refactoring
-* Abort the cherry-pick - changes are already there
-* Fix the race condition
-* Add acquire and release logs for gitium lock
-* Add explanations to merge with accept mine logic
-
-= 1.0-rc6 =
-* Delete all transients and options on uninstall hook
-* Add transients to is_versions and get_remote_tracking_branch functions
-* Update the composer
-* Check requirements before show the admin menu
-* Put the logs off by default(on test env)
-* Fix redirect issue and display errors
-* Create wordpress docker env command
-* PHP Warning: unlink #114
-
-= 1.0-rc5 =
-* Fix delete plugin/theme bug on 4.6
-* Update the readme file
-
-= 1.0-rc4 =
-* Fix merge with accept mine behind commits bug
-
-= 1.0-rc3 =
-* Add support for multisite
-* Fix PHP error on merge & push
-
-= 1.0-rc2 =
-* Change the default lockfile location
-* Fix a PHP Warning
-
-= 1.0-rc1 =
-* Update the logic of merge and push
-* Add lock mechanism for fetch and merge
-* Fix repo stuck on merge_local branch
-* Tested up to 4.5.3
-
-= 0.5.8-beta =
-* Add documentation for 'Could not connect to remote repository?'
-* Fix the update theme from Dashboard commit message & the install plugin commit message
-* Fix install/delete plugin/theme commit message
-* Add a test and rewrite the tests
-* Tested up to 4.5.2
-
-= 0.5.7-beta =
-* Fix bug deleting plugins/themes causes wrong commit message
-* Fix bug wrong commit message
-* Fix bug updated function to stop maintenance mode hang
-* Fix bug undefined variable 'new_versions'
-* Add 'Merge changes' button for gitium webhook
-* Add gitium documentation for docker
-* Add more tests
-
-= 0.5.6-beta =
-* Fix compatibility issues with wp-cli
-
-= 0.5.5-beta =
-* Fix bug plugin deletion from plugins page did not trigger commit
-
-= 0.5.4-beta =
-* Fix bug missing changes on similarly named plugins
-* Add requirements notices
-* Add requirements help section
-
-= 0.5.3-beta =
-* Fix paths with spaces bug
-* Add a Disconnect from repo button
-* Fix POST var `path` conflicts
-* Fix travis tests
-
-= 0.5.2-beta =
-* Add Contextual Help to Configuration page
-* Make the icon path relative
-* The key file is deleted properly
-* Update serbian translation
-* Make the resource type more specific
-* Fix Menu Bubble
-* Remove useless param for get_transient
-* Add Spanish Translation
-* Rename `gitium_version` transient
-* Fix git version notice
-* Delete .vimrc
-* Update .gitignore
-* Fix syntax error
-* Add better git version check
-* Fix add_query_arg vulnerability
-
-= 0.5.1-beta =
-* Update Serbian Translation (by [Ogi Djuraskovic](http://firstsiteguide.com/))
-* Fix Menu Bubble
-
-= 0.5-beta =
-* Add `Last 20 Commits` menu page
-* Add WordPress Contextual Help menu
-* Add `Settings` menu page
-* Move `Webhook URL` and `Public Key` fields to `Settings` page
-* Add menu icon
-* The `.gitignore` file can be edited
-* Fix commit message on theme/plugin update event
-* Refactoring
-
-= 0.4-beta =
-* Add `Bitbucket` documentation link
-* Add the action `gitium_before_merge_with_accept_mine`
-* Moved to `travis-ci.org`
-* Add new tests
-* Added code climate coverage reporting
-* Refactoring
-
-= 0.3.2-alpha =
-* Fix plugin activation issues
-
-= 0.3.1-alpha =
-* Fix issues with ssh repositories
-* Fix maintemance mode when webhook fails
-
-= 0.3-alpha =
-* First alpha release
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/css.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/css.php
deleted file mode 100644
index e46eec65..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/css.php
+++ /dev/null
@@ -1,134 +0,0 @@
-_selector ) {
- $this->add_selector_rules_to_output();
- }
-
- $this->_selector = $selector;
-
- return $this;
- }
-
- /**
- * Adds a css property with value to the css output
- *
- * @access public
- * @since 1.0
- *
- * @param string $property - the css property.
- * @param string $value - the value to be placed with the property.
- * @param string $url Whether we need to generate URL in the string.
- * @return $this
- */
- public function add_property( $property, $value, $url = '' ) {
- // If we don't have a value or our value is the same as our og default, bail.
- if ( empty( $value ) ) {
- return false;
- }
-
- // Set up our background image URL param if needed.
- $url_start = ( '' !== $url ) ? "url('" : ""; // phpcs:ignore -- need double quotes.
- $url_end = ( '' !== $url ) ? "')" : ""; // phpcs:ignore -- need double quotes.
-
- $this->_css .= $property . ':' . $url_start . $value . $url_end . ';';
- return $this;
- }
-
- /**
- * Adds the current selector rules to the output variable
- *
- * @access private
- * @since 1.0
- *
- * @return $this
- */
- private function add_selector_rules_to_output() {
- if ( ! empty( $this->_css ) ) {
- $this->_selector_output = $this->_selector;
- $selector_output = sprintf( '%1$s{%2$s}', $this->_selector_output, $this->_css );
-
- $this->_output .= $selector_output;
-
- // Reset the css.
- $this->_css = '';
- }
-
- return $this;
- }
-
- /**
- * Returns the minified css in the $_output variable
- *
- * @access public
- * @since 1.0
- *
- * @return string
- */
- public function css_output() {
- // Add current selector's rules to output.
- $this->add_selector_rules_to_output();
-
- // Output minified css.
- return $this->_output;
- }
-
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/functions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/functions.php
deleted file mode 100644
index fb21ce01..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/functions.php
+++ /dev/null
@@ -1,1342 +0,0 @@
- '',
- 'body_repeat' => '',
- 'body_size' => '',
- 'body_attachment' => '',
- 'body_position' => '',
- 'top_bar_image' => '',
- 'top_bar_repeat' => '',
- 'top_bar_size' => '',
- 'top_bar_attachment' => '',
- 'top_bar_position' => '',
- 'header_image' => '',
- 'header_repeat' => '',
- 'header_size' => '',
- 'header_attachment' => '',
- 'header_position' => '',
- 'nav_image' => '',
- 'nav_repeat' => '',
- 'nav_item_image' => '',
- 'nav_item_repeat' => '',
- 'nav_item_hover_image' => '',
- 'nav_item_hover_repeat' => '',
- 'nav_item_current_image' => '',
- 'nav_item_current_repeat' => '',
- 'sub_nav_image' => '',
- 'sub_nav_repeat' => '',
- 'sub_nav_item_image' => '',
- 'sub_nav_item_repeat' => '',
- 'sub_nav_item_hover_image' => '',
- 'sub_nav_item_hover_repeat' => '',
- 'sub_nav_item_current_image' => '',
- 'sub_nav_item_current_repeat' => '',
- 'content_image' => '',
- 'content_repeat' => '',
- 'content_size' => '',
- 'content_attachment' => '',
- 'content_position' => '',
- 'sidebar_widget_image' => '',
- 'sidebar_widget_repeat' => '',
- 'sidebar_widget_size' => '',
- 'sidebar_widget_attachment' => '',
- 'sidebar_widget_position' => '',
- 'footer_widget_image' => '',
- 'footer_widget_repeat' => '',
- 'footer_widget_size' => '',
- 'footer_widget_attachment' => '',
- 'footer_widget_position' => '',
- 'footer_image' => '',
- 'footer_repeat' => '',
- 'footer_size' => '',
- 'footer_attachment' => '',
- 'footer_position' => '',
- );
-
- return apply_filters( 'generate_background_option_defaults', $generate_background_defaults );
- }
-}
-
-if ( ! function_exists( 'generate_backgrounds_customize' ) ) {
- add_action( 'customize_register', 'generate_backgrounds_customize', 999 );
- /**
- * Build our Customizer options
- *
- * @since 0.1
- *
- * @param object $wp_customize The Customizer object.
- */
- function generate_backgrounds_customize( $wp_customize ) {
- $defaults = generate_get_background_defaults();
-
- require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php';
-
- if ( method_exists( $wp_customize, 'register_control_type' ) ) {
- $wp_customize->register_control_type( 'GeneratePress_Background_Images_Customize_Control' );
- $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' );
- }
-
- if ( class_exists( 'WP_Customize_Panel' ) ) {
- if ( ! $wp_customize->get_panel( 'generate_backgrounds_panel' ) ) {
- $wp_customize->add_panel(
- 'generate_backgrounds_panel',
- array(
- 'capability' => 'edit_theme_options',
- 'theme_supports' => '',
- 'title' => __( 'Background Images', 'gp-premium' ),
- 'priority' => 55,
- )
- );
- }
- }
-
- $wp_customize->add_section(
- 'backgrounds_section',
- array(
- 'title' => __( 'Background Images', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 50,
- )
- );
-
- $wp_customize->add_section(
- 'generate_backgrounds_body',
- array(
- 'title' => __( 'Body', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 5,
- 'panel' => 'generate_backgrounds_panel',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Section_Shortcut_Control(
- $wp_customize,
- 'generate_body_background_image_shortcuts',
- array(
- 'section' => 'generate_backgrounds_body',
- 'element' => __( 'Body', 'gp-premium' ),
- 'shortcuts' => array(
- 'layout' => 'generate_layout_container',
- 'colors' => 'body_section',
- 'typography' => 'font_section',
- ),
- 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
- )
- )
- );
-
- /**
- * Body background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[body_image]',
- array(
- 'default' => $defaults['body_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_backgrounds-body-image',
- array(
- 'section' => 'generate_backgrounds_body',
- 'settings' => 'generate_background_settings[body_image]',
- 'label' => __( 'Body', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[body_repeat]',
- array(
- 'default' => $defaults['body_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[body_size]',
- array(
- 'default' => $defaults['body_size'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[body_attachment]',
- array(
- 'default' => $defaults['body_attachment'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[body_position]',
- array(
- 'default' => $defaults['body_position'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_html',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Background_Images_Customize_Control(
- $wp_customize,
- 'body_backgrounds_control',
- array(
- 'section' => 'generate_backgrounds_body',
- 'settings' => array(
- 'repeat' => 'generate_background_settings[body_repeat]',
- 'size' => 'generate_background_settings[body_size]',
- 'attachment' => 'generate_background_settings[body_attachment]',
- 'position' => 'generate_background_settings[body_position]',
- ),
- )
- )
- );
-
- /**
- * Top bar background
- */
- $wp_customize->add_section(
- 'generate_backgrounds_top_bar',
- array(
- 'title' => __( 'Top Bar', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 5,
- 'panel' => 'generate_backgrounds_panel',
- 'active_callback' => 'generate_premium_is_top_bar_active',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[top_bar_image]',
- array(
- 'default' => $defaults['top_bar_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[top_bar_image]',
- array(
- 'section' => 'generate_backgrounds_top_bar',
- 'settings' => 'generate_background_settings[top_bar_image]',
- 'label' => __( 'Top Bar', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[top_bar_repeat]',
- array(
- 'default' => $defaults['top_bar_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[top_bar_size]',
- array(
- 'default' => $defaults['top_bar_size'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[top_bar_attachment]',
- array(
- 'default' => $defaults['top_bar_attachment'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[top_bar_position]',
- array(
- 'default' => $defaults['top_bar_position'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_html',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Background_Images_Customize_Control(
- $wp_customize,
- 'top_bar_backgrounds_control',
- array(
- 'section' => 'generate_backgrounds_top_bar',
- 'settings' => array(
- 'repeat' => 'generate_background_settings[top_bar_repeat]',
- 'size' => 'generate_background_settings[top_bar_size]',
- 'attachment' => 'generate_background_settings[top_bar_attachment]',
- 'position' => 'generate_background_settings[top_bar_position]',
- ),
- )
- )
- );
-
- /**
- * Header background
- */
- $wp_customize->add_section(
- 'generate_backgrounds_header',
- array(
- 'title' => __( 'Header', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 10,
- 'panel' => 'generate_backgrounds_panel',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Section_Shortcut_Control(
- $wp_customize,
- 'generate_header_background_image_shortcuts',
- array(
- 'section' => 'generate_backgrounds_header',
- 'element' => __( 'Header', 'gp-premium' ),
- 'shortcuts' => array(
- 'layout' => 'generate_layout_header',
- 'colors' => 'header_color_section',
- 'typography' => 'font_header_section',
- ),
- 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
- 'priority' => 1,
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[header_image]',
- array(
- 'default' => $defaults['header_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_backgrounds-header-image',
- array(
- 'section' => 'generate_backgrounds_header',
- 'settings' => 'generate_background_settings[header_image]',
- 'label' => __( 'Header', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[header_repeat]',
- array(
- 'default' => $defaults['header_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[header_size]',
- array(
- 'default' => $defaults['header_size'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[header_attachment]',
- array(
- 'default' => $defaults['header_attachment'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[header_position]',
- array(
- 'default' => $defaults['header_position'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_html',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Background_Images_Customize_Control(
- $wp_customize,
- 'header_backgrounds_control',
- array(
- 'section' => 'generate_backgrounds_header',
- 'settings' => array(
- 'repeat' => 'generate_background_settings[header_repeat]',
- 'size' => 'generate_background_settings[header_size]',
- 'attachment' => 'generate_background_settings[header_attachment]',
- 'position' => 'generate_background_settings[header_position]',
- ),
- )
- )
- );
-
- $wp_customize->add_section(
- 'generate_backgrounds_navigation',
- array(
- 'title' => __( 'Primary Navigation', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 15,
- 'panel' => 'generate_backgrounds_panel',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Section_Shortcut_Control(
- $wp_customize,
- 'generate_primary_navigation_background_image_shortcuts',
- array(
- 'section' => 'generate_backgrounds_navigation',
- 'element' => __( 'Primary Navigation', 'gp-premium' ),
- 'shortcuts' => array(
- 'layout' => 'generate_layout_navigation',
- 'colors' => 'navigation_color_section',
- 'typography' => 'font_navigation_section',
- ),
- 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
- 'priority' => 1,
- )
- )
- );
-
- /**
- * Navigation background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[nav_image]',
- array(
- 'default' => $defaults['nav_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[nav_image]',
- array(
- 'section' => 'generate_backgrounds_navigation',
- 'settings' => 'generate_background_settings[nav_image]',
- 'priority' => 750,
- 'label' => __( 'Navigation', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[nav_repeat]',
- array(
- 'default' => $defaults['nav_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_control(
- 'generate_background_settings[nav_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'generate_backgrounds_navigation',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_background_settings[nav_repeat]',
- 'priority' => 800,
- )
- );
-
- /**
- * Navigation item background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[nav_item_image]',
- array(
- 'default' => $defaults['nav_item_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_backgrounds-nav-item-image',
- array(
- 'section' => 'generate_backgrounds_navigation',
- 'settings' => 'generate_background_settings[nav_item_image]',
- 'priority' => 950,
- 'label' => __( 'Navigation Item', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[nav_item_repeat]',
- array(
- 'default' => $defaults['nav_item_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_control(
- 'generate_background_settings[nav_item_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'generate_backgrounds_navigation',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_background_settings[nav_item_repeat]',
- 'priority' => 1000,
- )
- );
-
- /**
- * Navigation item hover background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[nav_item_hover_image]',
- array(
- 'default' => $defaults['nav_item_hover_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_backgrounds-nav-item-hover-image',
- array(
- 'section' => 'generate_backgrounds_navigation',
- 'settings' => 'generate_background_settings[nav_item_hover_image]',
- 'priority' => 1150,
- 'label' => __( 'Navigation Item Hover', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[nav_item_hover_repeat]',
- array(
- 'default' => $defaults['nav_item_hover_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_control(
- 'generate_background_settings[nav_item_hover_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'generate_backgrounds_navigation',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_background_settings[nav_item_hover_repeat]',
- 'priority' => 1200,
- )
- );
-
- /**
- * Navigation item current background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[nav_item_current_image]',
- array(
- 'default' => $defaults['nav_item_current_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_backgrounds-nav-item-current-image',
- array(
- 'section' => 'generate_backgrounds_navigation',
- 'settings' => 'generate_background_settings[nav_item_current_image]',
- 'priority' => 1350,
- 'label' => __( 'Navigation Item Current', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[nav_item_current_repeat]',
- array(
- 'default' => $defaults['nav_item_current_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_control(
- 'generate_background_settings[nav_item_current_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'generate_backgrounds_navigation',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_background_settings[nav_item_current_repeat]',
- 'priority' => 1400,
- )
- );
-
- $wp_customize->add_section(
- 'generate_backgrounds_subnavigation',
- array(
- 'title' => __( 'Primary Sub-Navigation', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 20,
- 'panel' => 'generate_backgrounds_panel',
- )
- );
-
- /**
- * Sub-Navigation item background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[sub_nav_item_image]',
- array(
- 'default' => $defaults['sub_nav_item_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[sub_nav_item_image]',
- array(
- 'section' => 'generate_backgrounds_subnavigation',
- 'settings' => 'generate_background_settings[sub_nav_item_image]',
- 'priority' => 1700,
- 'label' => __( 'Sub-Navigation Item', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sub_nav_item_repeat]',
- array(
- 'default' => $defaults['sub_nav_item_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_control(
- 'generate_background_settings[sub_nav_item_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'generate_backgrounds_subnavigation',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_background_settings[sub_nav_item_repeat]',
- 'priority' => 1800,
- )
- );
-
- /**
- * Sub-Navigation item hover background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[sub_nav_item_hover_image]',
- array(
- 'default' => $defaults['sub_nav_item_hover_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[sub_nav_item_hover_image]',
- array(
- 'section' => 'generate_backgrounds_subnavigation',
- 'settings' => 'generate_background_settings[sub_nav_item_hover_image]',
- 'priority' => 2000,
- 'label' => __( 'Sub-Navigation Item Hover', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sub_nav_item_hover_repeat]',
- array(
- 'default' => $defaults['sub_nav_item_hover_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_control(
- 'generate_background_settings[sub_nav_item_hover_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'generate_backgrounds_subnavigation',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_background_settings[sub_nav_item_hover_repeat]',
- 'priority' => 2100,
- )
- );
-
- /**
- * Sub-Navigation item current background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[sub_nav_item_current_image]',
- array(
- 'default' => $defaults['sub_nav_item_current_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[sub_nav_item_current_image]',
- array(
- 'section' => 'generate_backgrounds_subnavigation',
- 'settings' => 'generate_background_settings[sub_nav_item_current_image]',
- 'priority' => 2300,
- 'label' => __( 'Sub-Navigation Item Current', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sub_nav_item_current_repeat]',
- array(
- 'default' => $defaults['sub_nav_item_current_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_control(
- 'generate_background_settings[sub_nav_item_current_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'generate_backgrounds_subnavigation',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_background_settings[sub_nav_item_current_repeat]',
- 'priority' => 2400,
- )
- );
-
- $wp_customize->add_section(
- 'generate_backgrounds_content',
- array(
- 'title' => __( 'Content', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 25,
- 'panel' => 'generate_backgrounds_panel',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Section_Shortcut_Control(
- $wp_customize,
- 'generate_content_background_image_shortcuts',
- array(
- 'section' => 'generate_backgrounds_content',
- 'element' => __( 'Content', 'gp-premium' ),
- 'shortcuts' => array(
- 'colors' => 'content_color_section',
- 'typography' => 'font_section',
- ),
- 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
- 'priority' => 1,
- )
- )
- );
-
- /**
- * Content background
- */
- $wp_customize->add_setting(
- 'generate_background_settings[content_image]',
- array(
- 'default' => $defaults['content_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[content_image]',
- array(
- 'section' => 'generate_backgrounds_content',
- 'settings' => 'generate_background_settings[content_image]',
- 'label' => __( 'Content', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[content_repeat]',
- array(
- 'default' => $defaults['content_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[content_size]',
- array(
- 'default' => $defaults['content_size'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[content_attachment]',
- array(
- 'default' => $defaults['content_attachment'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[content_position]',
- array(
- 'default' => $defaults['content_position'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_html',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Background_Images_Customize_Control(
- $wp_customize,
- 'content_backgrounds_control',
- array(
- 'section' => 'generate_backgrounds_content',
- 'settings' => array(
- 'repeat' => 'generate_background_settings[content_repeat]',
- 'size' => 'generate_background_settings[content_size]',
- 'attachment' => 'generate_background_settings[content_attachment]',
- 'position' => 'generate_background_settings[content_position]',
- ),
- )
- )
- );
-
- $wp_customize->add_section(
- 'generate_backgrounds_sidebars',
- array(
- 'title' => __( 'Sidebar', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 25,
- 'panel' => 'generate_backgrounds_panel',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Section_Shortcut_Control(
- $wp_customize,
- 'generate_sidebar_background_image_shortcuts',
- array(
- 'section' => 'generate_backgrounds_sidebars',
- 'element' => __( 'Sidebar', 'gp-premium' ),
- 'shortcuts' => array(
- 'layout' => 'generate_layout_sidebars',
- 'colors' => 'sidebar_widget_color_section',
- 'typography' => 'font_widget_section',
- ),
- 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
- 'priority' => 1,
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sidebar_widget_image]',
- array(
- 'default' => $defaults['sidebar_widget_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[sidebar_widget_image]',
- array(
- 'section' => 'generate_backgrounds_sidebars',
- 'settings' => 'generate_background_settings[sidebar_widget_image]',
- 'label' => __( 'Sidebar Widgets', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sidebar_widget_repeat]',
- array(
- 'default' => $defaults['sidebar_widget_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sidebar_widget_size]',
- array(
- 'default' => $defaults['sidebar_widget_size'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sidebar_widget_attachment]',
- array(
- 'default' => $defaults['sidebar_widget_attachment'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[sidebar_widget_position]',
- array(
- 'default' => $defaults['sidebar_widget_position'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_html',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Background_Images_Customize_Control(
- $wp_customize,
- 'sidebar_backgrounds_control',
- array(
- 'section' => 'generate_backgrounds_sidebars',
- 'settings' => array(
- 'repeat' => 'generate_background_settings[sidebar_widget_repeat]',
- 'size' => 'generate_background_settings[sidebar_widget_size]',
- 'attachment' => 'generate_background_settings[sidebar_widget_attachment]',
- 'position' => 'generate_background_settings[sidebar_widget_position]',
- ),
- )
- )
- );
-
- $wp_customize->add_section(
- 'generate_backgrounds_footer',
- array(
- 'title' => __( 'Footer', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'priority' => 30,
- 'panel' => 'generate_backgrounds_panel',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Section_Shortcut_Control(
- $wp_customize,
- 'generate_footer_background_image_shortcuts',
- array(
- 'section' => 'generate_backgrounds_footer',
- 'element' => __( 'Footer', 'gp-premium' ),
- 'shortcuts' => array(
- 'layout' => 'generate_layout_footer',
- 'colors' => 'footer_color_section',
- 'typography' => 'font_footer_section',
- ),
- 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
- 'priority' => 1,
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_widget_image]',
- array(
- 'default' => $defaults['footer_widget_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_background_settings[footer_widget_image]',
- array(
- 'section' => 'generate_backgrounds_footer',
- 'settings' => 'generate_background_settings[footer_widget_image]',
- 'label' => __( 'Footer Widget Area', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_widget_repeat]',
- array(
- 'default' => $defaults['footer_widget_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_widget_size]',
- array(
- 'default' => $defaults['footer_widget_size'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_widget_attachment]',
- array(
- 'default' => $defaults['footer_widget_attachment'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_widget_position]',
- array(
- 'default' => $defaults['footer_widget_position'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_html',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Background_Images_Customize_Control(
- $wp_customize,
- 'footer_widgets_backgrounds_control',
- array(
- 'section' => 'generate_backgrounds_footer',
- 'settings' => array(
- 'repeat' => 'generate_background_settings[footer_widget_repeat]',
- 'size' => 'generate_background_settings[footer_widget_size]',
- 'attachment' => 'generate_background_settings[footer_widget_attachment]',
- 'position' => 'generate_background_settings[footer_widget_position]',
- ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_image]',
- array(
- 'default' => $defaults['footer_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_backgrounds-footer-image',
- array(
- 'section' => 'generate_backgrounds_footer',
- 'settings' => 'generate_background_settings[footer_image]',
- 'label' => __( 'Footer Area', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_repeat]',
- array(
- 'default' => $defaults['footer_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_size]',
- array(
- 'default' => $defaults['footer_size'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_attachment]',
- array(
- 'default' => $defaults['footer_attachment'],
- 'type' => 'option',
- 'sanitize_callback' => 'sanitize_key',
- )
- );
-
- $wp_customize->add_setting(
- 'generate_background_settings[footer_position]',
- array(
- 'default' => $defaults['footer_position'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_html',
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Background_Images_Customize_Control(
- $wp_customize,
- 'footer_backgrounds_control',
- array(
- 'section' => 'generate_backgrounds_footer',
- 'settings' => array(
- 'repeat' => 'generate_background_settings[footer_repeat]',
- 'size' => 'generate_background_settings[footer_size]',
- 'attachment' => 'generate_background_settings[footer_attachment]',
- 'position' => 'generate_background_settings[footer_position]',
- ),
- )
- )
- );
- }
-}
-
-if ( ! function_exists( 'generate_backgrounds_css' ) ) {
- /**
- * Generate the CSS in the section using the Theme Customizer
- *
- * @since 0.1
- */
- function generate_backgrounds_css() {
- $generate_settings = wp_parse_args(
- get_option( 'generate_background_settings', array() ),
- generate_get_background_defaults()
- );
-
- // Fix size values.
- // Spaces and % are stripped by sanitize_key.
- $generate_settings['body_size'] = ( '100' == $generate_settings['body_size'] ) ? '100% auto' : esc_attr( $generate_settings['body_size'] ); // phpcs:ignore -- Non-strict comparison ok.
- $generate_settings['top_bar_size'] = ( '100' == $generate_settings['top_bar_size'] ) ? '100% auto' : esc_attr( $generate_settings['top_bar_size'] ); // phpcs:ignore -- Non-strict comparison ok.
- $generate_settings['header_size'] = ( '100' == $generate_settings['header_size'] ) ? '100% auto' : esc_attr( $generate_settings['header_size'] ); // phpcs:ignore -- Non-strict comparison ok.
- $generate_settings['content_size'] = ( '100' == $generate_settings['content_size'] ) ? '100% auto' : esc_attr( $generate_settings['content_size'] ); // phpcs:ignore -- Non-strict comparison ok.
- $generate_settings['sidebar_widget_size'] = ( '100' == $generate_settings['sidebar_widget_size'] ) ? '100% auto' : esc_attr( $generate_settings['sidebar_widget_size'] ); // phpcs:ignore -- Non-strict comparison ok.
- $generate_settings['footer_widget_size'] = ( '100' == $generate_settings['footer_widget_size'] ) ? '100% auto' : esc_attr( $generate_settings['footer_widget_size'] ); // phpcs:ignore -- Non-strict comparison ok.
- $generate_settings['footer_size'] = ( '100' == $generate_settings['footer_size'] ) ? '100% auto' : esc_attr( $generate_settings['footer_size'] ); // phpcs:ignore -- Non-strict comparison ok.
-
- $css = new GeneratePress_Backgrounds_CSS();
-
- $css->set_selector( 'body' );
- $css->add_property( 'background-image', esc_url( $generate_settings['body_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['body_repeat'] ) );
- $css->add_property( 'background-size', esc_attr( $generate_settings['body_size'] ) );
- $css->add_property( 'background-attachment', esc_attr( $generate_settings['body_attachment'] ) );
- $css->add_property( 'background-position', esc_attr( $generate_settings['body_position'] ) );
-
- if ( is_active_sidebar( 'top-bar' ) ) {
- $css->set_selector( '.top-bar' );
- $css->add_property( 'background-image', esc_url( $generate_settings['top_bar_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['top_bar_repeat'] ) );
- $css->add_property( 'background-size', esc_attr( $generate_settings['top_bar_size'] ) );
- $css->add_property( 'background-attachment', esc_attr( $generate_settings['top_bar_attachment'] ) );
- $css->add_property( 'background-position', esc_attr( $generate_settings['top_bar_position'] ) );
- }
-
- $css->set_selector( '.site-header' );
- $css->add_property( 'background-image', esc_url( $generate_settings['header_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['header_repeat'] ) );
- $css->add_property( 'background-size', esc_attr( $generate_settings['header_size'] ) );
- $css->add_property( 'background-attachment', esc_attr( $generate_settings['header_attachment'] ) );
- $css->add_property( 'background-position', esc_attr( $generate_settings['header_position'] ) );
-
- $css->set_selector( '.main-navigation, .main-navigation .menu-toggle' );
- $css->add_property( 'background-image', esc_url( $generate_settings['nav_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_repeat'] ) );
-
- $css->set_selector( '.main-navigation .main-nav > ul > li > a' );
- $css->add_property( 'background-image', esc_url( $generate_settings['nav_item_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_repeat'] ) );
-
- $css->set_selector( '.main-navigation .main-nav > ul > li > a:hover,.main-navigation .main-nav > ul > li.sfHover > a' );
- $css->add_property( 'background-image', esc_url( $generate_settings['nav_item_hover_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_hover_repeat'] ) );
-
- $css->set_selector( '.main-navigation .main-nav > ul > li[class*="current-menu-"] > a,.main-navigation .main-nav > ul > li[class*="current-menu-"] > a:hover,.main-navigation .main-nav > ul > li[class*="current-menu-"].sfHover > a' );
- $css->add_property( 'background-image', esc_url( $generate_settings['nav_item_current_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_current_repeat'] ) );
-
- $css->set_selector( '.main-navigation ul ul li a' );
- $css->add_property( 'background-image', esc_url( $generate_settings['sub_nav_item_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_repeat'] ) );
-
- $css->set_selector( '.main-navigation ul ul li > a:hover,.main-navigation ul ul li.sfHover > a' );
- $css->add_property( 'background-image', esc_url( $generate_settings['sub_nav_item_hover_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_hover_repeat'] ) );
-
- $css->set_selector( '.main-navigation ul ul li[class*="current-menu-"] > a,.main-navigation ul ul li[class*="current-menu-"] > a:hover,.main-navigation ul ul li[class*="current-menu-"].sfHover > a' );
- $css->add_property( 'background-image', esc_url( $generate_settings['sub_nav_item_current_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_current_repeat'] ) );
-
- $css->set_selector( '.separate-containers .inside-article,.separate-containers .comments-area,.separate-containers .page-header,.one-container .container,.separate-containers .paging-navigation,.separate-containers .inside-page-header' );
- $css->add_property( 'background-image', esc_url( $generate_settings['content_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['content_repeat'] ) );
- $css->add_property( 'background-size', esc_attr( $generate_settings['content_size'] ) );
- $css->add_property( 'background-attachment', esc_attr( $generate_settings['content_attachment'] ) );
- $css->add_property( 'background-position', esc_attr( $generate_settings['content_position'] ) );
-
- $css->set_selector( '.sidebar .widget' );
- $css->add_property( 'background-image', esc_url( $generate_settings['sidebar_widget_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['sidebar_widget_repeat'] ) );
- $css->add_property( 'background-size', esc_attr( $generate_settings['sidebar_widget_size'] ) );
- $css->add_property( 'background-attachment', esc_attr( $generate_settings['sidebar_widget_attachment'] ) );
- $css->add_property( 'background-position', esc_attr( $generate_settings['sidebar_widget_position'] ) );
-
- $css->set_selector( '.footer-widgets' );
- $css->add_property( 'background-image', esc_url( $generate_settings['footer_widget_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['footer_widget_repeat'] ) );
- $css->add_property( 'background-size', esc_attr( $generate_settings['footer_widget_size'] ) );
- $css->add_property( 'background-attachment', esc_attr( $generate_settings['footer_widget_attachment'] ) );
- $css->add_property( 'background-position', esc_attr( $generate_settings['footer_widget_position'] ) );
-
- $css->set_selector( '.site-info' );
- $css->add_property( 'background-image', esc_url( $generate_settings['footer_image'] ), 'url' );
- $css->add_property( 'background-repeat', esc_attr( $generate_settings['footer_repeat'] ) );
- $css->add_property( 'background-size', esc_attr( $generate_settings['footer_size'] ) );
- $css->add_property( 'background-attachment', esc_attr( $generate_settings['footer_attachment'] ) );
- $css->add_property( 'background-position', esc_attr( $generate_settings['footer_position'] ) );
-
- return apply_filters( 'generate_backgrounds_css_output', $css->css_output() );
- }
-}
-
-if ( ! function_exists( 'generate_background_scripts' ) ) {
- add_action( 'wp_enqueue_scripts', 'generate_background_scripts', 70 );
- /**
- * Enqueue scripts and styles.
- *
- * @since 0.1
- */
- function generate_background_scripts() {
- if ( 'inline' === generate_get_css_print_method() ) {
- wp_add_inline_style( 'generate-style', generate_backgrounds_css() );
- }
- }
-}
-
-add_filter( 'generate_external_dynamic_css_output', 'generate_backgrounds_add_external_css' );
-/**
- * Add to external stylesheet.
- *
- * @since 1.11.0
- *
- * @param string $css Existing CSS.
- */
-function generate_backgrounds_add_external_css( $css ) {
- if ( 'inline' === generate_get_css_print_method() ) {
- return $css;
- }
-
- $css .= generate_backgrounds_css();
-
- return $css;
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/secondary-nav-backgrounds.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/secondary-nav-backgrounds.php
deleted file mode 100644
index fdc17f1d..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/secondary-nav-backgrounds.php
+++ /dev/null
@@ -1,420 +0,0 @@
-get_section( 'secondary_nav_section' ) ) {
- return;
- }
-
- $defaults = generate_secondary_nav_get_defaults();
-
- if ( method_exists( $wp_customize, 'register_control_type' ) ) {
- $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' );
- }
-
- require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php';
-
- $wp_customize->add_section(
- 'secondary_bg_images_section',
- array(
- 'title' => __( 'Secondary Navigation', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'description' => '',
- 'panel' => 'generate_backgrounds_panel',
- 'priority' => 21,
- )
- );
-
- $wp_customize->add_control(
- new GeneratePress_Section_Shortcut_Control(
- $wp_customize,
- 'generate_secondary_navigation_background_image_shortcuts',
- array(
- 'section' => 'secondary_bg_images_section',
- 'element' => __( 'Secondary Navigation', 'gp-premium' ),
- 'shortcuts' => array(
- 'layout' => 'secondary_nav_section',
- 'colors' => 'secondary_navigation_color_section',
- 'typography' => 'secondary_font_section',
- ),
- 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
- 'priority' => 1,
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_image]',
- array(
- 'default' => $defaults['nav_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_secondary_backgrounds-nav-image',
- array(
- 'section' => 'secondary_bg_images_section',
- 'settings' => 'generate_secondary_nav_settings[nav_image]',
- 'priority' => 750,
- 'label' => __( 'Navigation', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_repeat]',
- array(
- 'default' => $defaults['nav_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'generate_premium_sanitize_choices',
- )
- );
-
- $wp_customize->add_control(
- 'generate_secondary_nav_settings[nav_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'secondary_bg_images_section',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_secondary_nav_settings[nav_repeat]',
- 'priority' => 800,
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_item_image]',
- array(
- 'default' => $defaults['nav_item_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_secondary_backgrounds-nav-item-image',
- array(
- 'section' => 'secondary_bg_images_section',
- 'settings' => 'generate_secondary_nav_settings[nav_item_image]',
- 'priority' => 950,
- 'label' => __( 'Navigation Item', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_item_repeat]',
- array(
- 'default' => $defaults['nav_item_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'generate_premium_sanitize_choices',
- )
- );
-
- $wp_customize->add_control(
- 'generate_secondary_nav_settings[nav_item_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'secondary_bg_images_section',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_secondary_nav_settings[nav_item_repeat]',
- 'priority' => 1000,
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_item_hover_image]',
- array(
- 'default' => $defaults['nav_item_hover_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_secondary_backgrounds-nav-item-hover-image',
- array(
- 'section' => 'secondary_bg_images_section',
- 'settings' => 'generate_secondary_nav_settings[nav_item_hover_image]',
- 'priority' => 1150,
- 'label' => __( 'Navigation Item Hover', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_item_hover_repeat]',
- array(
- 'default' => $defaults['nav_item_hover_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'generate_premium_sanitize_choices',
- )
- );
-
- $wp_customize->add_control(
- 'generate_secondary_nav_settings[nav_item_hover_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'secondary_bg_images_section',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_secondary_nav_settings[nav_item_hover_repeat]',
- 'priority' => 1200,
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_item_current_image]',
- array(
- 'default' => $defaults['nav_item_current_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_secondary_backgrounds-nav-item-current-image',
- array(
- 'section' => 'secondary_bg_images_section',
- 'settings' => 'generate_secondary_nav_settings[nav_item_current_image]',
- 'priority' => 1350,
- 'label' => __( 'Navigation Item Current', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[nav_item_current_repeat]',
- array(
- 'default' => $defaults['nav_item_current_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'generate_premium_sanitize_choices',
- )
- );
-
- $wp_customize->add_control(
- 'generate_secondary_nav_settings[nav_item_current_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'secondary_bg_images_section',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_secondary_nav_settings[nav_item_current_repeat]',
- 'priority' => 1400,
- )
- );
-
- $wp_customize->add_section(
- 'secondary_subnav_bg_images_section',
- array(
- 'title' => __( 'Secondary Sub-Navigation', 'gp-premium' ),
- 'capability' => 'edit_theme_options',
- 'description' => '',
- 'panel' => 'generate_backgrounds_panel',
- 'priority' => 22,
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[sub_nav_item_image]',
- array(
- 'default' => $defaults['sub_nav_item_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_secondary_backgrounds-sub-nav-item-image',
- array(
- 'section' => 'secondary_subnav_bg_images_section',
- 'settings' => 'generate_secondary_nav_settings[sub_nav_item_image]',
- 'priority' => 1700,
- 'label' => __( 'Sub-Navigation Item', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[sub_nav_item_repeat]',
- array(
- 'default' => $defaults['sub_nav_item_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'generate_premium_sanitize_choices',
- )
- );
-
- $wp_customize->add_control(
- 'generate_secondary_nav_settings[sub_nav_item_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'secondary_subnav_bg_images_section',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_secondary_nav_settings[sub_nav_item_repeat]',
- 'priority' => 1800,
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[sub_nav_item_hover_image]',
- array(
- 'default' => $defaults['sub_nav_item_hover_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_secondary_backgrounds-sub-nav-item-hover-image',
- array(
- 'section' => 'secondary_subnav_bg_images_section',
- 'settings' => 'generate_secondary_nav_settings[sub_nav_item_hover_image]',
- 'priority' => 2000,
- 'label' => __( 'Sub-Navigation Item Hover', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[sub_nav_item_hover_repeat]',
- array(
- 'default' => $defaults['sub_nav_item_hover_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'generate_premium_sanitize_choices',
- )
- );
-
- $wp_customize->add_control(
- 'generate_secondary_nav_settings[sub_nav_item_hover_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'secondary_subnav_bg_images_section',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_secondary_nav_settings[sub_nav_item_hover_repeat]',
- 'priority' => 2100,
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[sub_nav_item_current_image]',
- array(
- 'default' => $defaults['sub_nav_item_current_image'],
- 'type' => 'option',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'esc_url_raw',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Image_Control(
- $wp_customize,
- 'generate_secondary_backgrounds-sub-nav-item-current-image',
- array(
- 'section' => 'secondary_subnav_bg_images_section',
- 'settings' => 'generate_secondary_nav_settings[sub_nav_item_current_image]',
- 'priority' => 2300,
- 'label' => __( 'Sub-Navigation Item Current', 'gp-premium' ),
- )
- )
- );
-
- $wp_customize->add_setting(
- 'generate_secondary_nav_settings[sub_nav_item_current_repeat]',
- array(
- 'default' => $defaults['sub_nav_item_current_repeat'],
- 'type' => 'option',
- 'sanitize_callback' => 'generate_premium_sanitize_choices',
- )
- );
-
- $wp_customize->add_control(
- 'generate_secondary_nav_settings[sub_nav_item_current_repeat]',
- array(
- 'type' => 'select',
- 'section' => 'secondary_subnav_bg_images_section',
- 'choices' => array(
- '' => __( 'Repeat', 'gp-premium' ),
- 'repeat-x' => __( 'Repeat x', 'gp-premium' ),
- 'repeat-y' => __( 'Repeat y', 'gp-premium' ),
- 'no-repeat' => __( 'No Repeat', 'gp-premium' ),
- ),
- 'settings' => 'generate_secondary_nav_settings[sub_nav_item_current_repeat]',
- 'priority' => 2400,
- )
- );
- }
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/generate-backgrounds.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/generate-backgrounds.php
deleted file mode 100644
index d9cd1055..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/generate-backgrounds.php
+++ /dev/null
@@ -1,19 +0,0 @@
-post_count ) {
- $columns = false;
- }
- }
-
- // Return the result.
- return apply_filters( 'generate_blog_columns', $columns );
- }
-}
-
-if ( ! function_exists( 'generate_blog_get_masonry' ) ) {
- /**
- * Check if masonry is enabled.
- * This function is a mess with strings as bools etc.. Will re-write in a big upate to get lots of testing.
- */
- function generate_blog_get_masonry() {
- $generate_blog_settings = wp_parse_args(
- get_option( 'generate_blog_settings', array() ),
- generate_blog_get_defaults()
- );
-
- // If masonry is enabled via option or filter, enable it.
- // phpcs:ignore -- non-strict comparison allowed.
- if ( $generate_blog_settings['masonry'] || 'true' == apply_filters( 'generate_blog_masonry', 'false' ) ) {
- $masonry = 'true';
- } else {
- $masonry = 'false';
- }
-
- // Allow masonry to be turned off using a boolean.
- if ( false === apply_filters( 'generate_blog_masonry', 'false' ) ) {
- $masonry = 'false';
- }
-
- return $masonry;
- }
-}
-
-if ( ! function_exists( 'generate_blog_add_columns_container' ) ) {
- add_action( 'generate_before_main_content', 'generate_blog_add_columns_container' );
- /**
- * Add columns container
- *
- * @since 1.0
- */
- function generate_blog_add_columns_container() {
- if ( ! generate_blog_get_columns() ) {
- return;
- }
-
- $columns = generate_blog_get_column_count();
-
- printf(
- '-
Author name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"2540358d","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row-reverse","flexDirectionMobile":"row","alignItems":"center","columnGap":"20px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlignMobile":"left"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSource":"next-post","imageSize":"thumbnail","linkTo":"single-post","imageWidth":100,"imageHeight":100,"avatarSize":100} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"daa456b5","isDynamic":true,"blockVersion":4,"sizing":{"width":"75%","widthMobile":"75%","height":"","maxWidth":""},"typography":{"textAlign":"right","textAlignMobile":"left"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2883b2a4","element":"p","blockVersion":3,"spacing":{"marginBottom":"5px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Next post title","gpDynamicSource":"next-post"} --\x3eNext post title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3d2e07c6","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author name","gpDynamicSource":"next-post","gpDynamicTextBefore":"by "} --\x3eAuthor name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_2:{label:(0,p._x)("Two columns with arrows","label","gp-premium"),thumbnail:"post-navigation-arrows-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"d1dd99b1","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"20px","paddingRight":"0px","paddingBottom":"20px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"8878e700","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","alignItems":"center","justifyContent":"space-between","rowGapMobile":"10px","sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9c89f761","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","columnGap":"30px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":"","marginBottomMobile":"10px"},"gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9cf413a8","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"bec8d56e","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px"},"backgroundColor":"#000000","backgroundColorHover":"#abb8c3","textColor":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1.5em","height":"1.5em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"625f3305","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"a6f36397","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Previous post title","gpDynamicSource":"previous-post"} --\x3ePrevious post title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3d262c0b","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicSource":"previous-post","gpDynamicDateUpdated":true} --\x3eDate
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"5d70717c","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","justifyContentMobile":"flex-start","columnGap":"30px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlign":"right","textAlignMobile":"left"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"78f3ead4","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"643cf12f","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Next post title","gpDynamicSource":"next-post"} --\x3eNext post title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8ac35083","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicSource":"next-post","gpDynamicDateUpdated":true} --\x3eDate
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"780c810b","isDynamic":true,"blockVersion":4,"orderMobile":-1,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"122d9fa4","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px"},"backgroundColor":"#000000","backgroundColorHover":"#abb8c3","textColor":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1.5em","height":"1.5em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"next-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_3:{label:(0,p._x)("Two columns with background overlays","label","gp-premium"),thumbnail:"post-navigation-overlay.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"aadd0a6f","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"3642451a","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"59edc08b","backgroundColor":"#000000","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#e3e3e3","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"pseudo-element","opacity":0.4,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"innerZindex":1,"isDynamic":true,"blockVersion":4,"position":"relative","overflowX":"hidden","overflowY":"hidden","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"40px","paddingRight":"40px","paddingBottom":"40px","paddingLeft":"40px"},"paddingSyncUnits":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"a510c6c2","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8d3d4c12","element":"p","blockVersion":3,"display":"inline-block","typography":{"fontSize":"14px","textTransform":"uppercase"},"spacing":{"paddingTop":"5px","paddingRight":"10px","paddingBottom":"5px","paddingLeft":"10px"},"inlineWidth":true,"backgroundColor":"#cf2e2e"} --\x3ePrevious
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"352592d1","element":"h3","blockVersion":3,"typography":{"fontSize":"25px"},"spacing":{"marginBottom":"0px"},"className":"","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3eNext
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"6ba8079e","element":"h3","blockVersion":3,"typography":{"fontSize":"25px"},"spacing":{"marginBottom":"0px"},"className":"","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3eComments number
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7af8fa61","backgroundColor":"#0366d6","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","justifyContent":"space-between","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"30px","paddingRight":"25px","paddingBottom":"25px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"045e1698","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"typography":{},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"557abb73","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"15px","paddingRight":"20px","paddingBottom":"15px","paddingLeft":"20px"},"backgroundColor":"#ffffff","backgroundColorHover":"#222222","textColor":"#0693e3","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"next-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9ad09f6f","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"typography":{},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":"","paddingLeftMobile":"10px","marginTopMobile":"20px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9ba9e9d1","element":"h3","blockVersion":3,"typography":{},"spacing":{"marginBottom":"10px"},"textColor":"#ffffff","linkColor":"#ffffff","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3eComments number
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]},template_5:{label:(0,p._x)("Two columns with featured image offset","label","gp-premim"),thumbnail:"post-navigation-offset.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"52018004","innerContainer":"full","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":"","marginRight":"30px","marginLeft":"30px","marginLeftTablet":"30px","marginRightMobile":"25px","marginLeftMobile":"25px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e54982d5","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"7bdd6853","columns":4,"horizontalGap":0,"verticalGapMobile":0,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4138dd74","isGrid":true,"gridId":"7bdd6853","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"verticalAlignment":"center","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","justifyContent":"center","sizing":{"width":"25%","widthTablet":"50%","widthMobile":"50%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"borders":{"borderBottomLeftRadius":"10px","borderTopLeftRadius":"10px","borderBottomLeftRadiusTablet":"0px","borderBottomLeftRadiusMobile":"0px","borderTopLeftRadiusMobile":"5px"},"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"83fd48c9","isDynamic":true,"blockVersion":4,"typography":{"textAlign":"left"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a3aaad4c","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"15px","paddingRight":"15px","paddingBottom":"15px","paddingLeft":"15px","marginRight":"1.5em","marginLeft":"-1.5em"},"borders":{"borderTopWidth":"7px","borderTopStyle":"solid","borderTopColor":"#f9f9f9","borderRightWidth":"7px","borderRightStyle":"solid","borderRightColor":"#f9f9f9","borderBottomWidth":"7px","borderBottomStyle":"solid","borderBottomColor":"#f9f9f9","borderLeftWidth":"7px","borderLeftStyle":"solid","borderLeftColor":"#f9f9f9","borderTopRightRadius":"100%","borderBottomRightRadius":"100%","borderBottomLeftRadius":"100%","borderTopLeftRadius":"100%"},"backgroundColor":"#b5b5b5","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","widthMobile":"0.8em","heightMobile":"0.8em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"18430adf","isGrid":true,"gridId":"7bdd6853","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"position":"relative","zindex":2,"sizing":{"width":"25%","widthTablet":"50%","widthMobile":"50%","height":"100%","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"30px","paddingRight":"30px","paddingBottom":"30px","paddingLeft":"30px","marginRight":"10px","marginRightTablet":"0px","paddingTopMobile":"10px","paddingRightMobile":"10px","paddingBottomMobile":"10px","paddingLeftMobile":"10px","marginRightMobile":"0px"},"paddingSyncUnits":true,"borders":{"borderTopRightRadius":"10px","borderBottomRightRadius":"10px","borderBottomRightRadiusTablet":"0px","borderTopRightRadiusMobile":"5px","borderBottomRightRadiusMobile":"0px"},"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2acc62a4","element":"h3","blockVersion":3,"typography":{"fontSize":"25px","textAlign":"left","fontSizeMobile":"17px"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","marginBottom":"0em","marginLeft":"-4em","marginLeftMobile":"-3em"},"paddingSyncUnits":true,"borders":{"borderBottomLeftRadius":"10px","borderTopLeftRadius":"10px","borderTopRightRadiusMobile":"5px","borderBottomRightRadiusMobile":"5px","borderBottomLeftRadiusMobile":"5px","borderTopLeftRadiusMobile":"5px"},"backgroundColor":"#ffffff","textColor":"#000000","linkColor":"#000000","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3eAuthor Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"759ebd2f","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3eDate
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"after-post-title"},{key:"_generate_disable_primary_post_meta",value:!0}]},basic_3:{label:(0,p._x)("Term buttons","label","gp-premium"),thumbnail:"post-meta-term-buttons.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"7134d7c2","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","columnGap":"10px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"e378fc0b","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"13px","textAlign":"center"},"fontSize":"","spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","marginTop":"","marginRight":"","marginBottom":"","marginLeft":""},"borders":{"borderTopRightRadius":"","borderBottomRightRadius":"","borderBottomLeftRadius":"","borderTopLeftRadius":""},"backgroundColor":"#000000","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e Terms \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"before-post-title"},{key:"_generate_disable_primary_post_meta",value:!1}]}},Q={template_1:{label:(0,p._x)("Full footer 1","label","gp-premium"),thumbnail:"site-footer-full-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"73cd57e1","backgroundColor":"#1b1b42","shapeDividers":[],"isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"140px","paddingRight":"30px","paddingBottom":"60px","paddingLeft":"30px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7d9550dd","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"b76f312f","columns":3,"horizontalGap":80,"verticalAlignment":"center","verticalGapTablet":40,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"53cb46e2","isGrid":true,"gridId":"b76f312f","isDynamic":true,"blockVersion":4,"sizing":{"width":"60%","widthTablet":"100%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"aa19f1fb","element":"h3","blockVersion":3,"textColor":"#ffffff"} --\x3eSemper blandit suspendisse faucibus metus lobortis morbi magna vivamus per risus fermentum dapibus imperdiet praesent magnis.
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"529d5dda","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontWeight":"600","textAlign":"center"},"spacing":{"paddingTop":"10px","paddingRight":"20px","paddingBottom":"10px","paddingLeft":"20px","marginRight":"20px","marginBottomMobile":"20px"},"borders":{"borderTopWidth":"3px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"rgba(242, 245, 250, 0.8)","borderRightWidth":"3px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"rgba(242, 245, 250, 0.8)","borderBottomWidth":"3px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"rgba(242, 245, 250, 0.8)","borderLeftWidth":"3px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"rgba(242, 245, 250, 0.8)","borderTopRightRadius":"2px","borderBottomRightRadius":"2px","borderBottomLeftRadius":"2px","borderTopLeftRadius":"2px"},"backgroundColorHover":"#6212b3","backgroundColorHoverOpacity":0,"textColor":"#ffffff","textColorHover":"#f2f5fa"} --\x3e Contact Us \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e1bd60bb","isGrid":true,"gridId":"b76f312f","removeVerticalGapTablet":true,"isDynamic":true,"blockVersion":4,"sizing":{"width":"20%","widthTablet":"50%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"37420255","element":"p","blockVersion":3,"textColor":"#ffffff"} --\x3eCompany Name
Address Here
Address Here
+1 000 000 0000
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"c762d353","isGrid":true,"gridId":"b76f312f","removeVerticalGapTablet":true,"removeVerticalGapMobile":true,"isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","columnGap":"10px","sizing":{"width":"20%","widthTablet":"50%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"13c371f8","hasUrl":true,"ariaLabel":"instagram link","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"6px","paddingRight":"6px","paddingBottom":"6px","paddingLeft":"6px","marginRight":""},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"#f2f5fa","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"#f2f5fa","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"#f2f5fa","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"#f2f5fa","borderTopRightRadius":"50px","borderBottomRightRadius":"50px","borderBottomLeftRadius":"50px","borderTopLeftRadius":"50px"},"backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#f2f5fa","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"926332bd","hasUrl":true,"ariaLabel":"twitter link","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"6px","paddingRight":"6px","paddingBottom":"6px","paddingLeft":"6px","marginRight":""},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"#f2f5fa","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"#f2f5fa","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"#f2f5fa","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"#f2f5fa","borderTopRightRadius":"50px","borderBottomRightRadius":"50px","borderBottomLeftRadius":"50px","borderTopLeftRadius":"50px"},"backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#f2f5fa","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"d957854e","hasUrl":true,"ariaLabel":"facebook link","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"6px","paddingRight":"6px","paddingBottom":"6px","paddingLeft":"6px"},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"#f2f5fa","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"#f2f5fa","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"#f2f5fa","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"#f2f5fa","borderTopRightRadius":"50px","borderBottomRightRadius":"50px","borderBottomLeftRadius":"50px","borderTopLeftRadius":"50px"},"backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#f2f5fa","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"0f87c806","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column-reverse","alignItems":"center","justifyContent":"space-between","rowGapMobile":"20px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"60px","paddingRight":"0px","paddingBottom":"60px","paddingLeft":"0px","marginTop":"60px"},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#ffffff"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e6861bde","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"97c10964","element":"p","blockVersion":3,"typography":{"fontSize":"17px"},"spacing":{"marginBottom":"0px"},"textColor":"#ffffff"} --\x3e© Company Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7c528044","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","alignItems":"center","alignItemsMobile":"flex-start","columnGap":"20px","rowGapMobile":"10px","sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"907cc664","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"17px","textAlign":"center"},"fontSize":"","spacing":{"marginRight":""},"textColor":"#ffffff","textColorHover":"#f2f5fa"} --\x3e Privacy Policy \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a6a340bc","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"17px","textAlign":"center"},"fontSize":"","textColor":"#ffffff","textColorHover":"#f2f5fa"} --\x3e Terms of Service \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e'},template_2:{label:(0,p._x)("Full footer 2","label","gp-premium"),thumbnail:"site-footer-full-2.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"e224c1dd","backgroundColor":"#fafbfc","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"80px","paddingRight":"20px","paddingBottom":"80px","paddingLeft":"20px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"0836612c","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"34307d45","element":"p","blockVersion":3,"typography":{"fontSize":"14px","letterSpacing":"0.3em","fontWeight":"bold","textTransform":"uppercase","textAlign":"center"},"spacing":{"marginTop":"10px"},"textColor":"#2e3d4d"} --\x3eYour Company Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4068688a","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","alignItems":"center","rowGapMobile":"20px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"60px","paddingRight":"20px","paddingBottom":"60px","paddingLeft":"20px","marginTop":"60px","marginBottom":"60px"},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#5c7a99","borderBottomWidth":"1px","borderBottomStyle":"solid","borderBottomColor":"#5c7a99"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"12d457ad","isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"0px","paddingRight":"20px","paddingBottom":"0px","paddingLeft":"20px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8818b435","element":"p","blockVersion":3,"typography":{"fontSize":"13px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase"},"spacing":{"marginBottom":"0px"}} --\x3ePH +1 000 000 0000
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"68ec175a","isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"0px","paddingRight":"20px","paddingBottom":"0px","paddingLeft":"20px"},"borders":{"borderRightWidth":"1px","borderRightStyle":"solid","borderRightColor":"#5c7a99","borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#5c7a99","borderTopWidthMobile":"0px","borderTopStyleMobile":"solid","borderTopColorMobile":"#5c7a99","borderRightWidthMobile":"0px","borderRightStyleMobile":"solid","borderRightColorMobile":"#5c7a99","borderBottomWidthMobile":"0px","borderBottomStyleMobile":"solid","borderBottomColorMobile":"#5c7a99","borderLeftWidthMobile":"0px","borderLeftStyleMobile":"solid","borderLeftColorMobile":"#5c7a99"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"cf4dcfab","element":"p","blockVersion":3,"typography":{"fontSize":"13px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase"},"spacing":{"marginBottom":"0px"}} --\x3e24 M Drive
East Hampton, NY 11937
© Your Copyright Message
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b706d851","removeVerticalGapMobile":true,"isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","justifyContentMobile":"center","columnGap":"20px","rowGap":"10px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"typography":{},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"373aae0d","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"12px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase","textAlign":"center"},"fontSize":"","spacing":{"marginRight":""},"textColor":"#2e3d4d","textColorHover":"#5c7a99"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"3cd1cf71","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"12px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase","textAlign":"center"},"fontSize":"","textColor":"#2e3d4d","textColorHover":"#5c7a99"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e'}},ee={template_1:{label:(0,p._x)("Basic layout with term buttons","label","gp-premium"),thumbnail:"content-template-basic.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"d2cafe96","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"75c01790","isDynamic":true,"blockVersion":4} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"38620841","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"13px","textAlign":"center"},"fontSize":"","spacing":{"paddingTop":"5px","paddingRight":"10px","paddingBottom":"5px","paddingLeft":"10px"},"backgroundColor":"#000000","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e Terms \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"f593ba8c","blockVersion":3,"typography":{"fontWeight":"bold"},"spacing":{"marginBottom":"30px"},"linkColor":"#000000","linkColorHover":"#858585","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Post Title"} --\x3eAuthor name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ec93a944","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"af8af68e","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3ePost date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b70b46a6","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginTop":"30px","marginBottom":"30px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"medium_large","linkTo":"single-post"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"750"},{key:"_generate_use_theme_post_container",value:!0}]},template_2:{label:(0,p._x)("Layout with offset content","label","gp-premium"),thumbnail:"content-template-offset.jpg",content:'\x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large","linkTo":"single-post"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"05e7d83e","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px","marginTop":"-65px","marginRight":"40px","marginBottom":"20px","marginLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"83898f1c","element":"p","blockVersion":3,"typography":{"fontSize":"14px","fontWeight":"700","textTransform":"uppercase"},"spacing":{"marginBottom":"20px"},"linkColor":"#000000","linkColorHover":"#abb8c3","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3eCategory
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"98a0e67b","blockVersion":3,"typography":{"fontSize":"28px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3ePost author name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"dd34513e","element":"p","blockVersion":3,"typography":{"fontSize":"12px"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"borders":{"borderBottomWidth":"0px","borderBottomStyle":"solid"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3eDate
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"6d144082","verticalAlignment":"center","isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"33.33%","height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginTop":"15px"},"gpInlinePostMetaJustify":"flex-end"} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"7c89fc64","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontWeight":"700","textTransform":"uppercase","textAlign":"center"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"textColor":"#000000","textColorHover":"#abb8c3","gpDynamicLinkType":"single-post"} --\x3e More \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_3:{label:(0,p._x)("Layout with featured image overlay","label","gp-premim"),thumbnail:"content-template-overlay.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"99e0f8fe","gradient":true,"gradientDirection":180,"gradientColorOne":"#000000","gradientColorOneOpacity":0.62,"gradientColorTwo":"#000000","gradientColorTwoOpacity":0,"gradientSelector":"pseudo-element","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#ffffff","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"innerZindex":1,"isDynamic":true,"blockVersion":4,"position":"relative","overflowX":"hidden","overflowY":"hidden","sizing":{"minHeight":"420px","height":"","maxWidth":""},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px"},"borders":{"borderTopRightRadius":"12px","borderBottomRightRadius":"12px","borderBottomLeftRadius":"12px","borderTopLeftRadius":"12px"},"gpDynamicImageBg":"featured-image"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"95ce0971","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"864271b1","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"space-between","columnGap":"5px","rowGap":"5px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginBottom":"10px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"bc0ec4fa","element":"p","blockVersion":3,"typography":{"fontSize":"13px","fontWeight":"700","textTransform":"uppercase"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category","gpDynamicTextTaxonomySeparator":" / "} --\x3eCategory
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"5e2dac4c","element":"p","blockVersion":3,"display":"flex","alignItems":"center","justifyContent":"flex-end","typography":{"fontSize":"12px","textAlign":"right"},"spacing":{"marginBottom":"0px"},"hasIcon":true,"iconStyles":{"width":"1.4em","height":"1.4em","paddingRight":"0.5em"},"gpDynamicTextType":"comments-number","gpDynamicTextReplace":"COMMENTS","gpDynamicNoCommentsText":"0","gpDynamicSingleCommentText":"1","gpDynamicMultipleCommentsText":"%"} --\x3eCOMMENTS
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"b1e898af","blockVersion":3,"typography":{"fontSize":"24px"},"marginUnit":"%","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3ePost date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"a8ee15fd","blockVersion":3,"typography":{"fontSize":"30px"},"spacing":{"marginBottom":"15px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3eTerms
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"29491daa","blockVersion":3,"typography":{"fontSize":"30px"},"spacing":{"marginBottom":"15px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3ePost date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9bb8c373","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"0fcad1cd","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textTransform":"uppercase","textAlign":"center"},"spacing":{"paddingTop":"8px","paddingRight":"12px","paddingBottom":"8px","paddingLeft":"12px"},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#0693e3","borderTopColorHover":"#222222","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#0693e3","borderRightColorHover":"#222222","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#0693e3","borderBottomColorHover":"#222222","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#0693e3","borderLeftColorHover":"#222222","borderTopRightRadius":"2px","borderBottomRightRadius":"2px","borderBottomLeftRadius":"2px","borderTopLeftRadius":"2px"},"backgroundColorHover":"#222222","textColor":"#0693e3","textColorHover":"#ffffff","gpDynamicLinkType":"single-post"} --\x3e Read more \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_7:{label:(0,p._x)("Landscape layout","label","gp-premium"),thumbnail:"content-template-landscape.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"918d68ce","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"ae18e4a9","columns":2,"horizontalGap":30,"verticalGapMobile":10,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ff15641f","isGrid":true,"gridId":"ae18e4a9","isDynamic":true,"blockVersion":4,"sizing":{"width":"40%","widthTablet":"40%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-featured-image"} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"medium_large","linkTo":"single-post"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"64596747","isGrid":true,"gridId":"ae18e4a9","verticalAlignment":"center","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","justifyContent":"center","sizing":{"width":"60%","widthTablet":"60%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"20px","paddingBottom":"10px","paddingLeft":"0px","paddingTopMobile":"10px","paddingRightMobile":"10px","paddingBottomMobile":"10px","paddingLeftMobile":"10px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ce3f6f48","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginBottom":"10px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"fdbba1f9","element":"p","blockVersion":3,"typography":{"fontSize":"14px","fontWeight":"900","textTransform":"uppercase"},"spacing":{"paddingRight":"10px","marginRight":"10px","marginBottom":"0px"},"borders":{"borderRightWidth":"1px","borderRightStyle":"solid"},"className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3eCategory
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"6df4d39e","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3eDate
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"84923e14","blockVersion":3,"typography":{"fontSize":"28px"},"spacing":{"marginBottom":"20px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3eAuthor name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"dedbe2c8","element":"p","blockVersion":3,"spacing":{"paddingLeft":"20px","marginBottom":"0px","marginLeft":"20px"},"borders":{"borderLeftWidth":"1px","borderLeftStyle":"solid"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3ePost date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_header"},{key:"_generate_disable_title",value:!0},{key:"_generate_disable_featured_image",value:!0},{key:"_generate_disable_primary_post_meta",value:!0}]},template_2:{label:(0,p._x)("Single post hero with excerpt","label","gp-premium"),thumbnail:"page-hero-excerpt.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"70385d72","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"80px","paddingRight":"40px","paddingBottom":"80px","paddingLeft":"40px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"01bfa731","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"5dc55b95","columns":2,"horizontalGap":80,"verticalGap":20,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"579e5b87","isGrid":true,"gridId":"5dc55b95","verticalAlignment":"center","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","justifyContent":"center","sizing":{"width":"45%","widthTablet":"60%","widthMobile":"100%","height":"100%","maxWidth":""},"typography":{"fontSize":"14px"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"d909e043","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginBottom":"10px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9fdb86dc","element":"p","blockVersion":3,"typography":{"fontSize":"14px","fontWeight":"900","textTransform":"uppercase"},"spacing":{"paddingRight":"10px","marginRight":"10px","marginBottom":"0px"},"borders":{"borderRightWidth":"1px","borderRightStyle":"solid"},"textColor":"#000000","linkColor":"#000000","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3eCategory
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"1ee4cbcf","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3eDate
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"56c7eb13","blockVersion":3,"spacing":{"marginBottom":"10px"},"gpDynamicTextType":"title","gpDynamicTextReplace":"Title"} --\x3e%s
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar ligula augue, quis bibendum tellus scelerisque venenatis. Pellentesque porta nisi mi. In hac habitasse platea dictumst. Etiam risus elit, molestie non volutpat ac, pellentesque sed eros. Nunc leo odio, sodales non tortor at, porttitor posuere dui.
- - | -- - | -
- - | -- - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -- - DISALLOW_FILE_EDIT' - ); - ?> - - /> - - | -
- - | -- - | -
- - ? - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -- /> - | -
- - | -- - | -
- - | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- - | -- - | -
- - | -
- >
-
-
-
-
-
- %s',
- esc_html__( 'Change', 'gp-premium' )
- );
-
- printf(
- ' %s',
- esc_html__( 'Remove', 'gp-premium' )
- );
- ?>
- >
- %s',
- sprintf(
- /* translators: Upload Custom Image or Fallback image */
- esc_html__( 'Upload %s', 'gp-premium' ),
- '' . esc_html( $image_text ) . ''
- )
- );
- ?>
-
- |
-
- - | -- - | -
- - | -- /> - | -
- - ? - | -- /> - | -
- - ? - | -- /> - | -
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - ? - | -- - | -
- - ? - | -
-
-
-
-
-
-
-
-
-
- px
-
- |
-
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -
-
-
-
- ';
- }
- ?>
-
-
- />
-
-
- |
-
- - | -
-
-
-
- ';
- }
- ?>
-
-
- />
-
-
- |
-
- - | -
-
-
-
- ';
- }
- ?>
-
-
- />
-
-
- |
-
- - | -
-
-
-
- ';
- }
- ?>
-
-
- />
-
-
- |
-
- - | -- - | -
- - | -- /> - | -
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -- - | -
- - | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- - | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- - | -- /> - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -- /> - | -
- - | -
-
-
-
-
-
-
-
-
-
-
-
- |
-
- - | -- - px - | -
- -
- - -- -
- - -- -
- - -- -
- - -- -
- _x( 'Elements', 'Post Type General Name', 'gp-premium' ), - 'singular_name' => _x( 'Element', 'Post Type Singular Name', 'gp-premium' ), - 'menu_name' => __( 'Elements', 'gp-premium' ), - 'all_items' => __( 'All Elements', 'gp-premium' ), - 'add_new' => __( 'Add New Element', 'gp-premium' ), - 'add_new_item' => __( 'Add New Element', 'gp-premium' ), - 'new_item' => __( 'New Element', 'gp-premium' ), - 'edit_item' => __( 'Edit Element', 'gp-premium' ), - 'update_item' => __( 'Update Element', 'gp-premium' ), - 'search_items' => __( 'Search Element', 'gp-premium' ), - 'featured_image' => __( 'Background Image', 'gp-premium' ), - 'set_featured_image' => __( 'Set background image', 'gp-premium' ), - 'remove_featured_image' => __( 'Remove background image', 'gp-premium' ), - 'item_published' => __( 'Element published.', 'gp-premium' ), - 'item_updated' => __( 'Element updated.', 'gp-premium' ), - 'item_scheduled' => __( 'Element scheduled.', 'gp-premium' ), - 'item_reverted_to_draft' => __( 'Element reverted to draft.', 'gp-premium' ), - ); - - $args = array( - 'labels' => $labels, - 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'revisions' ), - 'hierarchical' => true, - 'public' => false, - 'show_ui' => true, - 'show_in_menu' => false, - 'can_export' => true, - 'has_archive' => false, - 'exclude_from_search' => true, - 'show_in_rest' => true, - ); - - register_post_type( 'gp_elements', $args ); - } - - /** - * Disable editor and show_in_rest support for non-Block Elements. - * - * @since 1.11.0 - * @param array $args The existing args. - * @param string $post_type The current post type. - */ - public function set_standard_element( $args, $post_type ) { - if ( 'gp_elements' === $post_type ) { - $post_id = false; - $type = false; - - if ( isset( $_GET['post'] ) ) { // phpcs:ignore -- No processing happening. - $post_id = absint( $_GET['post'] ); // phpcs:ignore -- No processing happening. - } - - if ( $post_id ) { - $type = get_post_meta( $post_id, '_generate_element_type', true ); - } elseif ( isset( $_GET['element_type'] ) ) { // phpcs:ignore -- No processing happening. - $type = esc_html( $_GET['element_type'] ); // phpcs:ignore -- No processing happening. - } - - if ( ! $type ) { - return $args; - } - - if ( 'block' !== $type ) { - $args['supports'] = array( 'title', 'thumbnail' ); - $args['show_in_rest'] = false; - $args['hierarchical'] = false; - } - - if ( 'block' === $type ) { - $args['supports'] = array( 'title', 'editor', 'custom-fields', 'page-attributes', 'revisions' ); - } - - if ( 'layout' === $type ) { - $args['labels']['add_new_item'] = __( 'Add New Layout', 'gp-premium' ); - $args['labels']['edit_item'] = __( 'Edit Layout', 'gp-premium' ); - } - - if ( 'hook' === $type ) { - $args['labels']['add_new_item'] = __( 'Add New Hook', 'gp-premium' ); - $args['labels']['edit_item'] = __( 'Edit Hook', 'gp-premium' ); - } - - if ( 'header' === $type ) { - $args['labels']['add_new_item'] = __( 'Add New Header', 'gp-premium' ); - $args['labels']['edit_item'] = __( 'Edit Header', 'gp-premium' ); - } - } - - return $args; - } - - /** - * Register custom post type columns. - * - * @since 1.7 - * - * @param array $columns Existing CPT columns. - * @return array All our CPT columns. - */ - public function register_columns( $columns ) { - $columns['element_type'] = esc_html__( 'Type', 'gp-premium' ); - $columns['location'] = esc_html__( 'Location', 'gp-premium' ); - $columns['exclusions'] = esc_html__( 'Exclusions', 'gp-premium' ); - $columns['users'] = esc_html__( 'Users', 'gp-premium' ); - - $new_columns = array(); - - // Need to do some funky stuff to display these columns before the date. - foreach ( $columns as $key => $value ) { - if ( 'date' === $key ) { - $new_columns['element_type'] = esc_html__( 'Type', 'gp-premium' ); - $new_columns['location'] = esc_html__( 'Location', 'gp-premium' ); - $new_columns['exclusions'] = esc_html__( 'Exclusions', 'gp-premium' ); - $new_columns['users'] = esc_html__( 'Users', 'gp-premium' ); - } - - $new_columns[ $key ] = $value; - } - - return $new_columns; - } - - /** - * Add a filter select input to the admin list. - * - * @since 1.7 - */ - public function build_element_type_filter() { - $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; - - if ( ! $screen ) { - return; - } - - if ( ! isset( $screen->post_type ) || 'gp_elements' !== $screen->post_type ) { - return; - } - - $values = array( - 'block' => esc_html__( 'Blocks', 'gp-premium' ), - 'header' => esc_html__( 'Headers', 'gp-premium' ), - 'hook' => esc_html__( 'Hooks', 'gp-premium' ), - 'layout' => esc_html__( 'Layouts', 'gp-premium' ), - ); - - $current_element_type = isset( $_GET['gp_element_type_filter'] ) ? esc_html( $_GET['gp_element_type_filter'] ) : ''; // phpcs:ignore -- No processing happening. - $current_block_type = isset( $_GET['gp_elements_block_type_filter'] ) ? esc_html( $_GET['gp_elements_block_type_filter'] ) : ''; // phpcs:ignore -- No processing happening. - ?> - - - - is_main_query() && '' !== $type ) { - $meta_query[] = array( - 'key' => '_generate_element_type', - 'value' => esc_attr( $type ), - 'compare' => '=', - ); - - $block_type = isset( $_GET['gp_elements_block_type_filter'] ) ? $_GET['gp_elements_block_type_filter'] : ''; // phpcs:ignore -- No processing happening. - - if ( 'block' === $type && '' !== $block_type ) { - $meta_query['relation'] = 'AND'; - - $meta_query[] = array( - 'key' => '_generate_block_type', - 'value' => esc_attr( $block_type ), - 'compare' => '=', - ); - } - - $query->set( 'meta_query', $meta_query ); - } - } - - /** - * Add content to our custom post type columns. - * - * @since 1.7 - * - * @param string $column The name of the column. - * @param int $post_id The ID of the post row. - */ - public function add_columns( $column, $post_id ) { - switch ( $column ) { - case 'element_type': - $type = get_post_meta( $post_id, '_generate_element_type', true ); - $hook_location = get_post_meta( $post_id, '_generate_hook', true ); - - if ( 'block' === $type ) { - echo esc_html__( 'Block', 'gp-premium' ); - - $block_type = get_post_meta( $post_id, '_generate_block_type', true ); - - if ( $block_type ) { - echo ' - ' . esc_html( GeneratePress_Elements_Helper::get_element_type_label( $block_type ) ); - - if ( 'hook' === $block_type && $hook_location ) { - echo 'smooth-scroll
class.', 'gp-premium' ),
- 'section' => 'generate_general_section',
- )
- );
-}
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/gp-premium.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/gp-premium.php
deleted file mode 100644
index 750727ec..00000000
--- a/wp-content/upgrade-temp-backup/plugins/gp-premium/gp-premium.php
+++ /dev/null
@@ -1,307 +0,0 @@
-=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) {
- require_once GP_PREMIUM_DIR_PATH . 'site-library/class-site-library-rest.php';
- require_once GP_PREMIUM_DIR_PATH . 'site-library/class-site-library-helper.php';
-}
-
-if ( is_admin() ) {
- require_once GP_PREMIUM_DIR_PATH . 'inc/deprecated-admin.php';
-
- if ( generatepress_is_module_active( 'generate_package_site_library', 'GENERATE_SITE_LIBRARY' ) && version_compare( PHP_VERSION, '5.4', '>=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) {
- require_once GP_PREMIUM_DIR_PATH . 'site-library/class-site-library.php';
- }
-}
-
-if ( ! function_exists( 'generate_premium_updater' ) ) {
- add_action( 'admin_init', 'generate_premium_updater', 0 );
- /**
- * Set up the updater
- **/
- function generate_premium_updater() {
- if ( ! class_exists( 'GeneratePress_Premium_Plugin_Updater' ) ) {
- include GP_PREMIUM_DIR_PATH . 'library/class-plugin-updater.php';
- }
-
- $license_key = get_option( 'gen_premium_license_key' );
-
- $edd_updater = new GeneratePress_Premium_Plugin_Updater(
- 'https://generatepress.com',
- __FILE__,
- array(
- 'version' => GP_PREMIUM_VERSION,
- 'license' => trim( $license_key ),
- 'item_name' => 'GP Premium',
- 'author' => 'Tom Usborne',
- 'url' => home_url(),
- 'beta' => apply_filters( 'generate_premium_beta_tester', false ),
- )
- );
- }
-}
-
-add_filter( 'edd_sl_plugin_updater_api_params', 'generate_premium_set_updater_api_params', 10, 3 );
-/**
- * Add the GeneratePress version to our updater params.
- *
- * @param array $api_params The array of data sent in the request.
- * @param array $api_data The array of data set up in the class constructor.
- * @param string $plugin_file The full path and filename of the file.
- */
-function generate_premium_set_updater_api_params( $api_params, $api_data, $plugin_file ) {
- /*
- * Make sure $plugin_file matches your plugin's file path. You should have a constant for this
- * or can use __FILE__ if this code goes in your plugin's main file.
- */
- if ( __FILE__ === $plugin_file ) {
- // Dynamically retrieve the current version number.
- $api_params['generatepress_version'] = defined( 'GENERATE_VERSION' ) ? GENERATE_VERSION : '';
- }
-
- return $api_params;
-}
-
-if ( ! function_exists( 'generate_premium_setup' ) ) {
- add_action( 'after_setup_theme', 'generate_premium_setup' );
- /**
- * Add useful functions to GP Premium
- **/
- function generate_premium_setup() {
- // This used to be in the theme but the WP.org review team asked for it to be removed.
- // Not wanting people to have broken shortcodes in their widgets on update, I added it into premium.
- add_filter( 'widget_text', 'do_shortcode' );
- }
-}
-
-if ( ! function_exists( 'generate_premium_theme_information' ) ) {
- add_action( 'admin_notices', 'generate_premium_theme_information' );
- /**
- * Checks whether there's a theme update available and lets you know.
- * Also checks to see if GeneratePress is the active theme. If not, tell them.
- *
- * @since 1.2.95
- **/
- function generate_premium_theme_information() {
- $theme = wp_get_theme();
-
- if ( 'GeneratePress' === $theme->name || 'generatepress' === $theme->template ) {
-
- // Get our information on updates.
- // @see https://developer.wordpress.org/reference/functions/wp_prepare_themes_for_js/.
- $updates = array();
- if ( current_user_can( 'update_themes' ) ) {
- $updates_transient = get_site_transient( 'update_themes' );
- if ( isset( $updates_transient->response ) ) {
- $updates = $updates_transient->response;
- }
- }
-
- $screen = get_current_screen();
-
- // If a GeneratePress update exists, and we're not on the themes page.
- // No need to tell people an update exists on the themes page, WP does that for us.
- if ( isset( $updates['generatepress'] ) && 'themes' !== $screen->base ) {
- printf(
- '%1$s %3$s
-%1$s %2$s
-%1$s %2$s
- ', - esc_html__( 'DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks.', 'gp-premium' ), - esc_html__( 'Learn how', 'gp-premium' ) - ); - } - } -} - -if ( ! function_exists( 'generate_hooks_setup' ) ) { - function generate_hooks_setup() { - // Just to verify that we're activated. - } -} - -if ( ! class_exists( 'Generate_Hooks_Settings' ) ) { - class Generate_Hooks_Settings { - private $dir; - private $file; - private $assets_dir; - private $assets_url; - private $settings_base; - private $settings; - - public function __construct( $file ) { - $this->file = $file; - $this->dir = dirname( $this->file ); - $this->assets_dir = trailingslashit( $this->dir ) . 'assets'; - $this->assets_url = esc_url( trailingslashit( plugins_url( '/assets/', $this->file ) ) ); - $this->settings_base = ''; - - // Initialise settings - add_action( 'admin_init', array( $this, 'init' ) ); - - // Register plugin settings - add_action( 'admin_init' , array( $this, 'register_settings' ) ); - - // Add settings page to menu - add_action( 'admin_menu' , array( $this, 'add_menu_item' ) ); - - // Add settings link to plugins page - add_filter( 'plugin_action_links_' . plugin_basename( $this->file ) , array( $this, 'add_settings_link' ) ); - } - - /** - * Initialise settings - * @return void - */ - public function init() { - $this->settings = $this->settings_fields(); - } - - /** - * Add settings page to admin menu - * @return void - */ - public function add_menu_item() { - $page = add_theme_page( __( 'GP Hooks', 'gp-premium' ) , __( 'GP Hooks', 'gp-premium' ) , apply_filters( 'generate_hooks_capability','manage_options' ) , 'gp_hooks_settings' , array( $this, 'settings_page' ) ); - add_action( 'admin_print_styles-' . $page, array( $this, 'settings_assets' ) ); - } - - /** - * Load settings JS & CSS - * @return void - */ - public function settings_assets() { - wp_enqueue_script( 'gp-cookie', $this->assets_url . 'js/jquery.cookie.js', array( 'jquery' ), GENERATE_HOOKS_VERSION ); - wp_enqueue_script( 'gp-hooks', $this->assets_url . 'js/admin.js', array( 'jquery', 'gp-cookie' ), GENERATE_HOOKS_VERSION ); - wp_enqueue_style( 'gp-hooks', $this->assets_url . 'css/hooks.css' ); - } - - /** - * Add settings link to plugin list table - * @param array $links Existing links - * @return array Modified links - */ - public function add_settings_link( $links ) { - $settings_link = '' . __( 'GP Hooks', 'gp-premium' ) . ''; - array_push( $links, $settings_link ); - return $links; - } - - /** - * Build settings fields - * @return array Fields to be displayed on settings page - */ - private function settings_fields() { - - $settings['standard'] = array( - 'title' => '', - 'description' => '', - 'fields' => array( - array( - "name" => __( 'wp_head', 'gp-premium' ), - "id" => 'generate_wp_head', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Header', 'gp-premium' ), - "id" => 'generate_before_header', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Header Content', 'gp-premium' ), - "id" => 'generate_before_header_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Header Content', 'gp-premium' ), - "id" => 'generate_after_header_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Header', 'gp-premium' ), - "id" => 'generate_after_header', - "type" => 'textarea' - ), - - array( - "name" => __( 'Inside Content Container', 'gp-premium' ), - "id" => 'generate_before_main_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Content', 'gp-premium' ), - "id" => 'generate_before_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Entry Title', 'gp-premium' ), - "id" => 'generate_after_entry_header', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Content', 'gp-premium' ), - "id" => 'generate_after_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Right Sidebar Content', 'gp-premium' ), - "id" => 'generate_before_right_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Right Sidebar Content', 'gp-premium' ), - "id" => 'generate_after_right_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Left Sidebar Content', 'gp-premium' ), - "id" => 'generate_before_left_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Left Sidebar Content', 'gp-premium' ), - "id" => 'generate_after_left_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Footer', 'gp-premium' ), - "id" => 'generate_before_footer', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Footer Widgets', 'gp-premium' ), - "id" => 'generate_after_footer_widgets', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Footer Content', 'gp-premium' ), - "id" => 'generate_before_footer_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Footer Content', 'gp-premium' ), - "id" => 'generate_after_footer_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'wp_footer', 'gp-premium' ), - "id" => 'generate_wp_footer', - "type" => 'textarea' - ) - ) - ); - - $settings = apply_filters( 'gp_hooks_settings_fields', $settings ); - - return $settings; - } - - /** - * Register plugin settings - * @return void - */ - public function register_settings() { - if ( is_array( $this->settings ) ) { - foreach( $this->settings as $section => $data ) { - - // Add section to page - add_settings_section( $section, $data['title'], array( $this, 'settings_section' ), 'gp_hooks_settings' ); - - foreach( $data['fields'] as $field ) { - - // Sanitizing isn't possible, as hooks allow any HTML, JS or PHP to be added. - // Allowing PHP can be a security issue if you have admin users who you don't trust. - // In that case, you can disable the ability to add PHP in hooks like this: define( 'GENERATE_HOOKS_DISALLOW_PHP', true ); - $validation = ''; - if( isset( $field['callback'] ) ) { - $validation = $field['callback']; - } - - // Register field - $option_name = $this->settings_base . $field['id']; - register_setting( 'gp_hooks_settings', 'generate_hooks', $validation ); - - // Add field to page - add_settings_field( 'generate_hooks[' . $field['id'] . ']', $field['name'], array( $this, 'display_field' ), 'gp_hooks_settings', $section, array( 'field' => $field ) ); - } - } - } - } - - public function settings_section( $section ) { - $html = ''; - echo $html; - } - - /** - * Generate HTML for displaying fields - * @param array $args Field data - * @return void - */ - public function display_field( $args ) { - - $field = $args['field']; - - $html = ''; - - $option_name = $this->settings_base . $field['id']; - $option = get_option( 'generate_hooks' ); - - $data = ''; - if( isset( $option[$option_name] ) ) { - $data = $option[$option_name]; - } elseif( isset( $field['default'] ) ) { - $data = $field['default']; - } - - - switch( $field['type'] ) { - - case 'textarea': - $checked = ''; - $checked2 = ''; - if( isset( $option[$field['id'] . '_php'] ) && 'true' == $option[$field['id'] . '_php'] ){ - $checked = 'checked="checked"'; - } - if( isset( $option[$field['id'] . '_disable'] ) && 'true' == $option[$field['id'] . '_disable'] ){ - $checked2 = 'checked="checked"'; - } - $html .= ''; - - if ( ! defined( 'GENERATE_HOOKS_DISALLOW_PHP' ) ) { - $html .= '
-
-
-
{{{ data.description }}}
- - <# } #> - json['palette'] = $this->palette; - $this->json['defaultValue'] = $this->setting->default; - $this->json[ 'link' ] = $this->get_link(); - $this->json[ 'show_opacity' ] = $this->show_opacity; - - if ( is_array( $this->json['palette'] ) ) { - $this->json['palette'] = implode( '|', $this->json['palette'] ); - } else { - // Default to true. - $this->json['palette'] = ( false === $this->json['palette'] || 'false' === $this->json['palette'] ) ? 'false' : 'true'; - } - - // Support passing show_opacity as string or boolean. Default to true. - $this->json[ 'show_opacity' ] = ( false === $this->json[ 'show_opacity' ] || 'false' === $this->json[ 'show_opacity' ] ) ? 'false' : 'true'; - } - - /** - * Render the control. - */ - public function render_content() {} - - public function content_template() { - ?> - <# if ( data.label && '' !== data.label ) { #> - {{ data.label }} - <# } #> - - json[ 'position_title' ] = esc_html__( 'left top, x% y%, xpos ypos (px)', 'gp-premium' ); - $this->json[ 'position_placeholder' ] = esc_html__( 'Position', 'gp-premium' ); - - foreach ( $this->settings as $setting_key => $setting_id ) { - $this->json[ $setting_key ] = array( - 'link' => $this->get_link( $setting_key ), - 'value' => $this->value( $setting_key ), - 'default' => isset( $setting_id->default ) ? $setting_id->default : '', - 'id' => isset( $setting_id->id ) ? $setting_id->id : '' - ); - - if ( 'repeat' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_repeat_choices(); - } - - if ( 'size' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_size_choices(); - } - - if ( 'attachment' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_attachment_choices(); - } - } - } - - public function content_template() { - ?> - <# if ( '' !== data.label ) { #> - {{ data.label }} - <# } #> - - <# if ( 'undefined' !== typeof ( data.repeat ) ) { #> -%current_year%
to update year automatically.', 'gp-premium' );
- $this->json[ 'copyright' ] = __( '%copy%
to include the copyright symbol.', 'gp-premium' );
- $this->json[ 'html' ] = __( 'HTML is allowed.', 'gp-premium' );
- $this->json[ 'shortcodes' ] = __( 'Shortcodes are allowed.', 'gp-premium' );
- }
- /**
- * Render the control's content.
- *
- * Allows the content to be overriden without having to rewrite the wrapper.
- *
- * @since 10/16/2012
- * @return void
- */
- public function content_template() {
- ?>
-
- json[ 'link' ] = $this->get_link();
- $this->json[ 'value' ] = $this->value();
- $this->json[ 'id' ] = $this->id;
- $this->json[ 'default_value' ] = $this->default_value;
- $this->json[ 'reset_title' ] = esc_attr__( 'Reset','generate-spacing' );
- $this->json[ 'unit' ] = $this->unit;
- $this->json[ 'edit_field' ] = $this->edit_field;
- }
-
- public function content_template() {
- ?>
-
-
- <# if ( '' !== data.default_value ) { #> <# } #>
- json[ 'link' ] = $this->get_link();
- $this->json[ 'value' ] = absint( $this->value() );
- $this->json[ 'description' ] = esc_html( $this->description );
- }
-
- public function content_template() {
- ?>
-
- type ) {
- default:
- case 'text' : ?>
-
- label ) ) echo '' . esc_html( $this->label ) . '';
- if ( ! empty( $this->description ) ) echo '' . esc_html( $this->description ) . '';
- if ( ! empty( $this->areas ) ) :
- echo '';
- foreach ( $this->areas as $value => $label ) :
- echo '' . esc_html( $label ) . '';
- endforeach;
- endif;
- break;
-
- case 'line' :
- echo '{{{ data.description }}}
- <# } #> - - <# if ( data.notice ) { #> -