Skip to content

Commit

Permalink
release: fixes
Browse files Browse the repository at this point in the history
- Fixed issue with Revive Social menu item being visible to match user permissions
- Fixed PHP deprecation error showing in the console
- Updated dependencies
  • Loading branch information
vytisbulkevicius authored Nov 11, 2024
2 parents bc3a70a + 473ce67 commit 30092ab
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Upload tests artifacts
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: artifact
path: ./artifacts
Expand Down
Binary file added assets/img/black-friday.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 8 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ public function enqueue_scripts() {
if ( empty( $page ) ) {
return;
}

wp_enqueue_media();
wp_register_script( $this->plugin_name . '-dashboard', ROP_LITE_URL . 'assets/js/build/dashboard.js', array('wp-url'), ( ROP_DEBUG ) ? time() : $this->version, false );
wp_register_script( $this->plugin_name . '-exclude', ROP_LITE_URL . 'assets/js/build/exclude.js', array(), ( ROP_DEBUG ) ? time() : $this->version, false );
Expand Down Expand Up @@ -421,6 +422,9 @@ public function enqueue_scripts() {
}

$this->register_survey();
if ( ! defined( 'ROP_PRO_VERSION' ) ) {
do_action( 'themeisle_sdk_load_banner', 'rop' );
}
}

/**
Expand Down Expand Up @@ -661,11 +665,13 @@ function () {
);

global $submenu;
$submenu['TweetOldPost'][2] = array(
$rss_to_social,
'manage_options',
tsdk_utmify( self::RN_LINK, 'admin', 'admin_menu' ),
);
if ( isset( $submenu['TweetOldPost'] ) ) {
$submenu['TweetOldPost'][2] = array(
$rss_to_social,
'manage_options',
tsdk_utmify( self::RN_LINK, 'admin', 'admin_menu' ),
);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions includes/admin/class-rop-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ private function exclude_post( $data ) {
private function exclude_post_batch( $data ) {
$search = sanitize_text_field( $data['search'] );
$post_selector = new Rop_Posts_Selector_Model();
$available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $search, $data['exclude'], false, false );
$available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $data['exclude'], $search, false, false );
$post_ids = wp_list_pluck( $available_posts, 'value' );

$settings_model = new Rop_Settings_Model();
Expand All @@ -576,7 +576,7 @@ private function exclude_post_batch( $data ) {
*/
private function get_posts( $data ) {
$post_selector = new Rop_Posts_Selector_Model();
$available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $data['search_query'], $data['exclude'], $data['show_excluded'], $data['page'] );
$available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $data['exclude'], $data['search_query'], $data['show_excluded'], $data['page'] );

$this->response->set_code( '200' )
->set_data(
Expand Down
4 changes: 2 additions & 2 deletions includes/admin/models/class-rop-posts-selector-model.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ public function ignore_taxonomies( $taxes ) {
*
* @param array $selected_post_types The selected post types.
* @param array $taxonomies The selected taxonomies.
* @param string $search A search query.
* @param bool $exclude The exclude taxonomies flag.
* @param string $search A search query.
*
* @return array
* @since 8.0.0
* @access public
*/
public function get_posts( $selected_post_types, $taxonomies, $search = '', $exclude, $show_excluded_posts = false, $page = 1 ) {
public function get_posts( $selected_post_types, $taxonomies, $exclude, $search = '', $show_excluded_posts = false, $page = 1 ) {
$search = strval( $search );

$args = array(
Expand Down
12 changes: 12 additions & 0 deletions vue/src/vue-elements/main-page-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
</h1>
</div>
</div>
<div
id="tsdk_banner"
class="rop-banner"
/>
<toast />
<div
v-if=" is_rest_api_error "
Expand Down Expand Up @@ -380,6 +384,8 @@
}, 1000);
this.get_toast_message(false);
document.dispatchEvent(new Event('themeisle:banner:init'));
},
created() {
this.$root.$refs.main_page = this;
Expand Down Expand Up @@ -567,4 +573,10 @@
font-weight: bold;
text-decoration: underline;
}
.rop-banner:has(.tsdk-banner-cta) {
width: 100%;
margin-top: 15px;
margin-bottom: 30px;
}
</style>

0 comments on commit 30092ab

Please sign in to comment.