first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
/**
* Post formats related scripts
* @use CherryJsCore
*/
( function($, CherryJsCore){
'use strict';
CherryJsCore.utilites.namespace( 'post_formats' );
CherryJsCore.post_formats = {
init: function () {
var self = this;
if ( CherryJsCore.status.document_ready ) {
self.render( self );
} else {
CherryJsCore.variable.$document.on( 'ready', self.render( self ) );
}
},
render: function ( self ) {
// Init slider scripts
self.initalize( 'slider' );
// Init popup scripts
self.initalize( 'popup' );
},
initalize: function( object ) {
$(window).load(function () {
$( '*[data-cherry' + object + '="1"]' ).each( function() {
var plugin = $( this ).data( object ),
init = $( this ).data( 'init' );
$( this ).data( 'initalized', false );
$( this ).trigger({
type: 'cherry-post-formats-custom-init',
item: $( this ),
object: object
});
if ( true === $( this ).data( 'initalized' ) ) {
return 1;
}
if ( ! plugin ) {
return !1;
}
if ( ! $.isFunction( jQuery.fn[ plugin ] ) ) {
return !1;
}
$( this )[ plugin ]( init );
});
});
}
};
CherryJsCore.post_formats.init();
} (jQuery, window.CherryJsCore) );

View File

@@ -0,0 +1 @@
!function(t,i){"use strict";i.utilites.namespace("post_formats"),i.post_formats={init:function(){var t=this;i.status.document_ready?t.render(t):i.variable.$document.on("ready",t.render(t))},render:function(t){t.initalize("slider"),t.initalize("popup")},initalize:function(i){t(window).load(function(){t("*[data-cherry"+i+'="1"]').each(function(){var n=t(this).data(i),e=t(this).data("init");return t(this).data("initalized",!1),t(this).trigger({type:"cherry-post-formats-custom-init",item:t(this),object:i}),!0===t(this).data("initalized")?1:n?t.isFunction(jQuery.fn[n])?(t(this)[n](e),void 0):!1:!1})})}},i.post_formats.init()}(jQuery,window.CherryJsCore);

View File

@@ -0,0 +1,81 @@
<?php
/**
* Facebook embed
*
* @package Cherry_Framework
* @subpackage Class
* @author Cherry Team <cherryframework@gmail.com>
* @copyright Copyright (c) 2012 - 2017, Cherry Team
* @link http://www.cherryframework.com/
* @license http://www.gnu.org/licenses/gpl-3.0.en.html
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( ! class_exists( 'Cherry_Facebook_Embed' ) ) {
/**
* Define Cherry_Facebook_Embed class
*/
class Cherry_Facebook_Embed {
/**
* A reference to an instance of this class.
*
* @since 1.0.0
* @var object
*/
private static $instance = null;
/**
* Constructor for the class
*/
function __construct() {
add_filter( 'init', array( $this, 'add_facebook' ) );
}
/**
* Register Facebook provider
*
* @since 1.0.0
* @param array $providers Existing providers.
*/
public function add_facebook( $providers ) {
$endpoints = array(
'#https?://www\.facebook\.com/video.php.*#i' => 'https://www.facebook.com/plugins/video/oembed.json/',
'#https?://www\.facebook\.com/.*/videos/.*#i' => 'https://www.facebook.com/plugins/video/oembed.json/',
'#https?://www\.facebook\.com/.*/posts/.*#i' => 'https://www.facebook.com/plugins/post/oembed.json/',
'#https?://www\.facebook\.com/.*/activity/.*#i' => 'https://www.facebook.com/plugins/post/oembed.json/',
'#https?://www\.facebook\.com/photo(s/|.php).*#i' => 'https://www.facebook.com/plugins/post/oembed.json/',
'#https?://www\.facebook\.com/permalink.php.*#i' => 'https://www.facebook.com/plugins/post/oembed.json/',
'#https?://www\.facebook\.com/media/.*#i' => 'https://www.facebook.com/plugins/post/oembed.json/',
'#https?://www\.facebook\.com/questions/.*#i' => 'https://www.facebook.com/plugins/post/oembed.json/',
'#https?://www\.facebook\.com/notes/.*#i' => 'https://www.facebook.com/plugins/post/oembed.json/',
);
foreach ( $endpoints as $pattern => $endpoint ) {
wp_oembed_add_provider( $pattern, $endpoint, true );
}
}
/**
* Returns the instance.
*
* @since 1.0.0
* @return object
*/
public static function get_instance() {
// If the single instance hasn't been set, set it now.
if ( null == self::$instance ) {
self::$instance = new self;
}
return self::$instance;
}
}
}