Skip to content

Commit

Permalink
Merge pull request #902 from warfare-plugins/staging
Browse files Browse the repository at this point in the history
Staging v4.4.6
  • Loading branch information
warfare-plugins authored Mar 12, 2024
2 parents 2bfb335 + d176478 commit bf97e50
Show file tree
Hide file tree
Showing 74 changed files with 3,566 additions and 4,236 deletions.
1 change: 1 addition & 0 deletions .cache/phpcs.json

Large diffs are not rendered by default.

Binary file modified assets/fonts/sw-icon-font.eot
100755 → 100644
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/fonts/sw-icon-font.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fonts/sw-icon-font.ttf
100755 → 100644
Binary file not shown.
Binary file modified assets/fonts/sw-icon-font.woff
100755 → 100644
Binary file not shown.
52 changes: 26 additions & 26 deletions assets/js/post-editor/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@
* @since 3.4.0 | 26 NOV 2018 | Created.
* @since 3.4.2 | 10 DEC 2018 | Removed dependencies from wp_register_style
*/
function register_gutenberg_blocks() {
wp_register_style(
'social-warfare-block-css',
plugins_url( '/post-editor/dist/blocks.style.build.css', dirname( __FILE__ ) )
);
function register_gutenberg_blocks() {
wp_register_style(
'social-warfare-block-css',
plugins_url( '/post-editor/dist/blocks.style.build.css', __DIR__ )
);

wp_register_script(
'social-warfare-block-js',
plugins_url( '/post-editor/dist/blocks.build.js', dirname( __FILE__ ) ),
plugins_url( '/post-editor/dist/blocks.build.js', __DIR__ ),
array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor' ),
true
);

wp_enqueue_style('social-warfare-block-css');
wp_enqueue_style( 'social-warfare-block-css' );

//* All of our block scripts are compiled to a single, common file.
$scripts = array(
'editor_script' => 'social-warfare-block-js',
'block_script' => 'social-warfare-block-js'
);
'editor_script' => 'social-warfare-block-js',
'block_script' => 'social-warfare-block-js',
);

register_block_type( 'social-warfare/social-warfare', $scripts);
register_block_type( 'social-warfare/click-to-tweet', $scripts);
register_block_type( 'social-warfare/pinterest-image', $scripts);
}
register_block_type( 'social-warfare/social-warfare', $scripts );
register_block_type( 'social-warfare/click-to-tweet', $scripts );
register_block_type( 'social-warfare/pinterest-image', $scripts );
}

/**
* Create the custom Social Warfare category for Gutenberg blocks.
Expand All @@ -50,15 +50,15 @@ function register_gutenberg_blocks() {
* @param Object $post The WP post being edited, to optionally conditionally load blocks.
* @since 3.4.0 | 26 NOV 2018 | Created.
*/
function add_block_category( $categories, $post ) {
return array_merge(
$categories,
array(
array(
'slug' => 'social-warfare',
'title' => __( 'Social Warfare', 'social-warfare' ),
'icon' => '<i className="mce-ico mce-i-sw sw sw-social-warfare" />',
),
)
);
}
function add_block_category( $categories, $post ) {
return array_merge(
$categories,
array(
array(
'slug' => 'social-warfare',
'title' => __( 'Social Warfare', 'social-warfare' ),
'icon' => '<i className="mce-ico mce-i-sw sw sw-social-warfare" />',
),
)
);
}
5 changes: 3 additions & 2 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1644,15 +1644,16 @@ window.socialWarfare = window.socialWarfare || {};
* are therefore spread out, and don't hit the rate limits.
*
* @since 4.3.0 | 17 AUG 2023 | Updated Graph API endpoint to v17.0
* @since 4.4.6 | 17 JAN 2024 | Updated Graph API endpoint to v18.0
* @param void
* @return void
*
*/
socialWarfare.fetchFacebookShares = function() {

// Compile the API links
var url1 = 'https://graph.facebook.com/v17.0/?fields=og_object{engagement}&id=' + swp_post_url;
var url2 = swp_post_recovery_url ? 'https://graph.facebook.com/v17.0/?fields=og_object{engagement}&id=' + swp_post_recovery_url : '';
var url1 = 'https://graph.facebook.com/v18.0/?fields=og_object{engagement}&id=' + swp_post_url;
var url2 = swp_post_recovery_url ? 'https://graph.facebook.com/v18.0/?fields=og_object{engagement}&id=' + swp_post_recovery_url : '';

// Record the tested URL's
console.log('Facebook Share API: ' + url1 );
Expand Down
2 changes: 1 addition & 1 deletion assets/js/script.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit bf97e50

Please sign in to comment.